Hi keith,Thanks for your quick reply!My script is:1) using SimulateData()
popModel <- '
i =~ 1*t1 + 1*t2 + 1*t3
s =~ 0*t1 + 1*t2 + 2*t3
i ~ 0
s ~ 20
i ~~ 1*i
s ~~ 0.2*s
i ~~ 0*s
t1 ~~ 1*t1
t2 ~~ 1.2*t2
t3 ~~ 1.8*t3
'set.seed(53487)
Data <- simulateData(popModel, sample.nobs=500, meanstructure=TRUE)
summary(Data)
t1 t2 t3
Min. :-3.958139 Min. :-5.60567 Min. :-5.43702
1st Qu.:-0.975398 1st Qu.:-1.07583 1st Qu.:-1.10160
Median :-0.008098 Median : 0.07261 Median :-0.01148
Mean : 0.003189 Mean :-0.02773 Mean : 0.05765
3rd Qu.: 0.966524 3rd Qu.: 1.01091 3rd Qu.: 1.30336
Max. : 4.662340 Max. : 5.40725 Max. : 5.68284
2) Using sim()
SModel <-'i =~ 1*t1 + 1*t2 + 1*t3
s =~ 0*t1 + 1*t2 + 2*t3'
Data1 <- sim(1, SModel, n=500, generate=popModel, lavaanfun="growth", meanstructure=TRUE, seed=53487, estimator="ml")
summary(Data1)
> summary(Data1)
RESULT OBJECT
Model Type
[1] "lavaan"
========= Fit Indices Cutoffs ============
Alpha
Fit Indices 0.1 0.05 0.01 0.001 Mean SD
chisq 0.505 0.505 0.505 0.505 0.505 NA
aic 5472.040 5472.040 5472.040 5472.040 5472.040 NA
bic 5505.757 5505.757 5505.757 5505.757 5505.757 NA
rmsea 0.000 0.000 0.000 0.000 0.000 NA
cfi 1.000 1.000 1.000 1.000 1.000 NA
tli 1.005 1.005 1.005 1.005 1.005 NA
srmr 0.008 0.008 0.008 0.008 0.008 NA
========= Parameter Estimates and Standard Errors ============
Estimate Average Estimate SD Average SE Power (Not equal 0) Std Est Std Est SD Std Ave SE Average Param Average Bias Coverage
t1~~t1 1.123 NA 0.188 1 0.569 NA 0.088 1.0 0.123 1
t2~~t2 1.245 NA 0.116 1 0.497 NA 0.034 1.2 0.045 1
t3~~t3 2.176 NA 0.274 1 0.551 NA 0.060 1.8 0.376 1
i~~i 0.850 NA 0.182 1 1.000 NA 0.000 1.0 -0.150 1
s~~s 0.052 NA 0.110 0 1.000 NA 0.000 0.2 -0.148 1
i~~s 0.179 NA 0.117 0 0.848 NA 1.455 0.0 0.179 1
i~1 -0.011 NA 0.060 0 -0.011 NA 0.065 0.0 -0.011 1
s~1 -0.020 NA 0.041 0 -0.087 NA 0.202 0.0 -0.020 1
================== Replications =====================
As you can see, I have a problem here and I'm not understanding what I'm doing wrong.Could you identify it, please ?
Thanks in advance.
Best,
Catarina
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+unsubscribe@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.