[R] Error in structural equation model - "The model has negativedegrees of freedom"
sunnyw at hotmail.com
Sun Dec 4 17:02:48 CET 2005
Thanks a lot for the reply.
Could you suggest how I can correct this problem? I tried using a
correlation matrix instead of raw moments, but still got the same error. I
also fixed parameters v1,v2,v3,a1 at 1; then it gave me the error that the
system is exatly singular.
To answer the points that you raised:
1. x1-x6 are not causes; they are just indicatiors. Does that change my
2. Is the size of the dataset going to be a real limitation? How can I take
care of that?
Would appreciate your reply,
There are 7*8/2 = 28 raw moments among the 7 observed variables. Of these,
6*7/2 = 21 are used for the moments among the 6 fixed-exogenous variables,
leaving 28 - 21 = 7 df. You model has 11 free parameters. So df for the
model = 11 - 7 = -4.
Some additional comments:
If you're using raw moments, why isn't there a constant variable in the
Do you really intend x1 -- x6 to be causes, rather than indicators, of m1
Why are there no normalizing constraints on the latent variables?
Do you really want to fit a model like this to so small a data set?
I hope this helps,
Department of Sociology
Canada L8S 4M4
>From: r-help-bounces at stat.math.ethz.ch
>[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Sunil W
>Sent: Wednesday, November 30, 2005 10:08 PM
>To: r-help at stat.math.ethz.ch
>Subject: [R] Error in structural equation model - "The model
>has negativedegrees of freedom"
>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-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),
>I would appreciate any help on this; I am new to structural
>and realize that I may be making a silly error.
>R-help at stat.math.ethz.ch mailing list
>PLEASE do read the posting guide!
More information about the R-help