On 12/17/2014 08:52 AM, Kenny Yahir wrote:
> I'm working at a project about SEM in lavaan, but I have a few questions
> like, Why can't fit a second-order model?
There is no reason: lavaan can fit second-order factor models just fine.
> i.e. Let x1 ,... xn be variables which describes something and they
> have links with factors f_1,...,f_k , now these factors are connected with
> g1,g2 .. gp (really, just are 3). So the model is as follow:
>
> first-order latent variables
>
> f1 =~ x1 + x4 + ...
> f2 =~ x2 + x6 + ...
> .
> .
> .
> f7 =~ x20 + x30 + ...
>
> f1~~f2 + f3
> f7~~ f8 +f9
> ...
>
> second-order latent variables
>
> g1 =~ f1 + f2 + ...
> g2 =~ f3 + ..
> g3 =~ f5 + f7
>
> with a regression
>
> Y ~ g1 + g2 + g3
>
> where Y represents the score of a test.
In principle, this should work. We may help you better if you show us
your full R script, and if you also provide a snippet of your data. What
goes wrong? Do you get a warning/error?
With simulated data, this setup runs just fine:
library(lavaan)
# create data
pop.model <- '
f1 =~ x1 + x2 + x3
f2 =~ x4 + x5 + x6
f3 =~ x7 + x8 + x9
f4 =~ x10 + x11 + x12
f5 =~ x13 + x14 + x15
f6 =~ x16 + x17 + x18
f7 =~ x19 + x20 + x21
f8 =~ x22 + x23 + x24
f9 =~ x25 + x26 + x27
g1 =~ f1 + f2 + f3
g2 =~ f4 + f5 + f6
g3 =~ f7 + f8 + f9
Y ~ 0.5?g1 + 0.8?g2 + 1.5?g3
'
Data <- simulateData(pop.model, sample.nobs = 10000)
fit <- sem(pop.model, data = Data)
> Other question, if remove the second-order factors I obtain some results
> in the regression, but I don't know how to interpret these values.
They are ordinary regression coefficients. They give you the (predicted)
change in the dependent for a one-unit change in the predictor (say,
g1), if you keep the other predictors constant.
Yves.