On 02/29/2016 10:35 PM,
tom...@rhsmith.umd.edu wrote:
> Hi, I've been trying to do an CFA on my dataset in R to replicate what
> my professor did in Lisrel (he's old-school and doesn't believe R can
> handle SEM and CFA).
The problem is the the lisrel model is not identified. The 'Perf' latent
variable gets (by default) a free variance, and a free residual variance
for its single indicator 'perform'. As a result, LISREL says:
W_A_R_N_I_N_G: TD 13,13 may not be identified.
Standard Errors, T-Values, Modification Indices,
and Standardized Residuals cannot be computed.
Unlike lavaan, it still reports fit indices in this case.
To mimic this underidentified model in lavaan, you can use:
model <- '
Perf =~ 0.948683*perform
Perf ~~ NA*Perf
perform ~~ perform
Tnp =~ tnp1 + tnp2 + tnp3
Con =~ conp1 + conp2 + conp3
Snp =~ snap1 + snap2 + snap3
Effp =~ effp1 + effp2 + effp3
'
fit <- sem(model, data = Data,
std.lv = TRUE, mimic = "EQS")
To get an identified model in lavaan: remove either the second (Perf ~~
NA*Perf) or third (perform ~~ perform) line. IN LISREL: either fix the
variance of 'Perf' to unity, or fix the residual variance (in the
theta-delta matrix) to zero.
> Also another question I couldn't figure out is
> how to constrain theta-delta (error variance) in lavaan. In Lisrel you
> can do "Set the Error Covariance of perform to 18.749", for example.
To fix the residual variance of, say, 'conp2' to 18.749, you should add
a line like this:
conp2 ~~ 18.749*conp2
Hope this helps,
Yves.