Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umxEFA takes 4 hours to calculate #103

Closed
AgnerF opened this issue Aug 31, 2019 · 1 comment
Closed

umxEFA takes 4 hours to calculate #103

AgnerF opened this issue Aug 31, 2019 · 1 comment
Assignees

Comments

@AgnerF
Copy link

AgnerF commented Aug 31, 2019

The umxEFA function took 4 hours to calculate on my data set with a 70x40 matrix with 40% missing values. The calculation time went down to 10 minutes when I removed the call to function umxSummary from umxEFA.

I don't think I need the umxSummary anyway. It does not affect the return value from umxEFA, but only prints something on the screen. I don't know why the umxSummary is so slow, but there should be a way to avoid calling it.

I general, I prefer that statistical functions put the calculated results in a return rather than print them on the screen. This will allow the user to decide what to do with the results: print, plot, save to a file, or combine with further calculations in a longer script. In the case of the umxEFA function, I will propose that this function should not print any results but just return the data set m1. The user can then print the loadings, umxSummary, or whatever is needed.

BTW. I compared the results of umxEFA with a factor analyses based on a covariance matrix calculated by package 'norm' or 'norm2'. The three results were very different. Any idea why, or which one is best?

Thanks for developing umx.

tbates added a commit that referenced this issue Aug 31, 2019
…t statistics of a model (default is FALSE) see #103

* TODO: `umxEFA` currently reports either the model or the loadings (or factor scores if requested).
Might be worth considering making scores a model attribute.... Not sure what this nicest UI is for a user just wanting scores.
@tbates tbates self-assigned this Aug 31, 2019
@tbates
Copy link
Owner

tbates commented Aug 31, 2019

Hi @AgnerF

The devtools version now has a summary =FALSE option. summary is slow because it computes the independence and saturated models and for 40 variables, that will take forever. SO, off by default now.

I also made a change so printing is suppressed if umx_set_silent(TRUE)

Users like models to run and print themselves but I get the benefit of chaining, so this seems a reasonable compromise?

Currently the output is either model, scores, or loadings. Might be useful to make scores a model attribute.... But then people might struggle to find them. Will consider the UI.

Thanks for your input!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants