Simulate Data From CFA with regression between Latent Factors

44 zobrazení
Preskočiť na prvú neprečítanú správu

Chiel Mues

neprečítané,
25. 2. 2020, 12:13:2225. 2. 2020
komu: lavaan
Hello,

I would like to simulate data from a CFA (well technically it would be a SEM I suppose) where the latent variables follow a prespecified relationship.

sim_model <- '
V1 =~ X1 + X2 + X3 + X4
V2 =~ X5 + X6 + X7 + X8
V2 ~ abs(V1)'

Put in words, I would like to simulate from a SEM where V2 is regressed on the absolute value of V1. Preferably also assuming categorical variables.

Is this possible?

jpma...@gmail.com

neprečítané,
25. 2. 2020, 12:57:2225. 2. 2020
komu: lav...@googlegroups.com

Hi Chiel,

Yes, it is. It is this easy:

 

set.seed(123)

pop.data <- simulateData(model=sim_model, standardized = TRUE, sample.nobs=10^5, skewness = 0, kurtosis = 0)

 

see the simulateData function…

 

best,

João Marôco

--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/9505dce7-3774-4f95-a3ef-1f4cfdbab3ef%40googlegroups.com.

Chiel

neprečítané,
25. 2. 2020, 13:02:0225. 2. 2020
komu: lav...@googlegroups.com
I know about this function, but V2 ~ abs(V1) is not syntax Lavaan accepts. 

You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/VrnacPvgCcs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/003901d5ec05%2406cf05c0%24146d1140%24%40gmail.com.

Terrence Jorgensen

neprečítané,
27. 2. 2020, 16:09:2127. 2. 2020
komu: lavaan
I know about this function, but V2 ~ abs(V1) is not syntax Lavaan accepts. 

lavaan (and most SEM software) only model linear effects.  

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Odpovedať všetkým
Odpovedať autorovi
Poslať ďalej
0 nových správ