[R] Error in structural equation model - "The model has negative degrees of freedom"
Sunil W
sunnyw at hotmail.com
Thu Dec 1 04:07:44 CET 2005
Hi
I am running a structural equation model with R using the sem command; am
getting the following error:
"Error in sem.default : The model has negative degrees of freedom = -4"
My model is as follows:
s_model = specify.model()
x1->m1, b1,NA
x2->m1, b2,NA
x3->m2, b3,NA
x4->m2, b4,NA
x5->m2, b5,NA
x6->m2, b6,NA
m1->y, a1,NA
m2->y, a2,NA
m1<->m1, v1,NA
m2<->m2, v2,NA
y<->y, v3,NA
x1-x6 are observed independent variables, m1 and m2 are the latent variables
and y is the observed dependent variable. I use the raw.moments command for
calculating the covariance matrix, based on a data with 147 observations.
The command that I use is as follows:
s = sem(s_model,S=R,obs.variables=colnames(R),
fixed.x=c('x1','x2','x3','x4','x5','x6'), raw=TRUE)
I would appreciate any help on this; I am new to structural equation models
and realize that I may be making a silly error.
Thanks
Sunil
More information about the R-help
mailing list