Hi!
For my project, I'm simulating covariance matrices using the correlation matrix from the publications, and then I run models on these simulated matrices. In some simulations, I want to examine how changing the sample size might affect the results. For instance, I'm curious about how the results would differ with a smaller or larger sample size.
Now, my question is: Can I modify the code below to adjust the sample size as needed in this specific context (e.g., 200 when the true sample size was 2000 or 2000 when the true sample size was 250)?
fit <- lavaan::sem(model, sample.cov = as.matrix(dat.cov), sample.nobs = samplesize, std.lv = TRUE)
What does exactly “sample.nobs” do?
Thanks in advance for your response.
Best,
Alodie