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

simulateData with standardized=TRUE #46

Open
jtextor opened this issue Jan 13, 2016 · 5 comments
Open

simulateData with standardized=TRUE #46

jtextor opened this issue Jan 13, 2016 · 5 comments
Labels

Comments

@jtextor
Copy link

jtextor commented Jan 13, 2016

The function "simulateData" is currently not able to provide standardized output in the general case, as the following example demonstrates:

lav <- lavaanify( "
    y ~ (-.5) * x + (.25) * z
    x ~ .5*U
    z ~ .5*U
")
diag(cov(simulateData( lav, standardized=TRUE, sample.nobs=100000 )))

The variance of y far exceeds 1.

@ylenio
Copy link

ylenio commented Jan 14, 2016

Also, the skewness and kurtosis arguments in simulateData produce empirical skewness and kurtosis that do not always match the simulated values. For example, often empirical skewness and kurtosis values are much lower than the expected (i.e. simulated) values.

@philchalmers
Copy link
Contributor

@ylenio that property may be related to this pull request: #79. But in general this data generation method isn't perfect.

@yrosseel yrosseel added the bug label Jun 20, 2022
@yrosseel
Copy link
Owner

5 years later, this is still not fixed. In that period, two people told me they would take this up, but nothing happened so far. It would seem I have to fix this myself.

@TDJorgensen
Copy link
Contributor

I thought the simstandard package addressed this

https://cran.r-project.org/web/packages/simstandard/vignettes/simstandard_tutorial.html

@yrosseel
Copy link
Owner

Indeed. So maybe lavaan should just remove the standardized= argument in simulateData() (for now).

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

No branches or pull requests

5 participants