Message/Author 

Greg Norman posted on Tuesday, March 11, 2008  1:36 pm



How are the degrees of freedom determined for a path analysis model? My model has 6 observed variables (5 dependent, 1 dependent) and I estimated 18 parameters (9 regression paths, 4 correlation paths, 5 residual variances). My model ChiSquare test has 2 degrees of freedom. I thought that with 6(7)/2 = 21 elements minus 18 parameters, I would have 3 degrees of freedom. Thanks, Greg 


The information available is different for dependent and independent variables. You have 5*6/2 = 15 variances and covariances for the dependent variables and five covariances between the independent variable and the five dependent variables. This is a total of 20 for 2 degrees of freedom. 

Greg Norman posted on Tuesday, March 11, 2008  2:22 pm



very helpful! Thanks, Greg 

Greg Norman posted on Wednesday, March 12, 2008  2:32 pm



After some further discussion with my colleague about the degrees of freedom in the path model we ran the same model in EQS. In EQS it estimated 19 parameters (rather than 18 in Mplus) with the one additional parameter being the variance of the observed independent variable. The model chisquare also had 2 degrees of freedom [2119] (rather than 2018 in Mplus). The chisquare value and the parameter estimates were very similar but not exact between the two programs. It looks like Mplus and EQS are taking different approaches to how the information in the variancecovariance matrix is used. Is this true? Is it the case that Mplus doesn’t use or estimate the variance of strictly exogenous independent variables since the variance isn’t technically part of the specified model? Thanks, Greg 


It seems that EQS is treating all variables as dependent variables and estimating the variance of the independent variable in this case. My guess is that the estimate is the same as the same variance. We do not do this because a model is estimated conditioned on covariates. Means, variances, and covariances are not estimated for independent variables as part of the model. The difference you see in chisquare is most likely due to Mplus using n and EQS using n1. 


I have a simple path model and tried following the above steps to determine how the degrees of freedom were calculated. I have 1 independent variable and 4 dependent variables. I applied the above formula and calculated (4*5)/2 = 10 variances and covariances for the DVs and 4 covariances between the IVs and the 4 DVs. This results in a total of 14 elements. I believe the following parameters should be estimated in the model: 4 regression paths (the IV to each of the DVs), 3 correlations(the 4DVs are autocorrelated repeated measures) and 4 residual variances for the DVs, for a total of 11. Therefore, the degrees of freedom should be 3, but I am getting a justidentified model with 0 dfs in my output. Am I missing some parameters in my calculation of df? Thank you very much. 


How many parameters does the output say are estimated? Which estimator are you using? 


I am not sure how to tell how many parameters are being estimated in the output. It says that there are 4 dependent variables and 1 independent variable and under information criteria the number of free parameters is 18. I do not think this is what you are asking for though. Would you mind directing me as to how to determine the number of parameters being estimated? I am using MLR. Thank you. 


Besides the fourteen parameters that you give, there are also four means of the dependent variables for a total of 18. If 18 parameters are being estimated, the degrees of freedom are zero. You can see the 18 parameters that are being estimated by looking at the Results or TECH1. If there are parameters being estimated as the default that you do not want in the model, you can fix them at zero. 


I am running a path model (i.e., a cross lagged panel design) and I have missing data. I approached this in two ways: 1) I used 10 imputed datasets and had mPlus run the path models and combine results appropriately (TYPE=IMPUTATION) and 2) I used mPlus with the dataset with missing data and used FIML. I wanted to be able to see if results did not differ much between the two methods. I have 9 observed variables, 22 paths, and 6 dependent variables. While as expected, results did not differ much, I am figuring out why there are differences in the degrees of freedom if I use the 10 imputed datasets and if I use the one dataset with FIML for the same, exact model. Why should the number of free parameters differ at all and how are the df's calculated? Using FIML:  number of free parameters: 36  degrees of freedom: 13 Using 10 imputed datasets:  number of free parameters: 34  degrees of freedom: 11 If I do not use FIML (and just use the model with listwise deletion), the free parameters is the same as the one using 10 imputed datasets (34 free). Also, I would have preferred to use the 10 imputed datasets but I also cannot get mplus to model indirect using imputed datasets (and I cannot see how using constraints actually 'tricks' mplus into doing it). Thank you. 


Please send the two outputs and your license number to support@statmodel.com. Be sure they both include TECH1. 

Tinchi Lin posted on Thursday, October 17, 2013  10:06 am



Hi Linda and Bengt, Example 3.1 has three observed variables; one DV and two IV's. Why is the model justidentified (0 df in chisquare test for goodness of fit)? How does MPLUS determine the number of known information in this special casewhy is it not (3*(3+1))/2 = 6? Or, referring to the first two posts in this thread, why isn't the number of known info 3, which = 1 (variance of the DV) + 2 ( covariances between y and the x's) ? Example 3.1 is a simple linear regression and four parameters are to be estimated, including the DV's mean. Sometimes MPLUS would estimate a DV's mean but sometimes not. How does MPLUS determine whether to estimate a DV's mean or not? Many thanks, 


The H1 model is a mean and variance for the dependent variable and two covariances between the dependent variable and the independent variables for a total of four parameters. Regression models are estimated conditioned on the covariates. The means, variances, and covariances of the observed exogenous independent variables are not model parameters. The H0 model has one intercept, one residual variance, and two regression coefficients for a total of four parameters so the degrees of freedom are zero. In a conditional model, the intercept of the dependent variable is always estimated unless TYPE=NOMEANSTRUCTURE is used. 


Hello, I would like help calculating degrees of freedom. I receive this error message: “THE DEGREES OF FREEDOM FOR THIS MODEL ARE NEGATIVE. THE MODEL IS NOT IDENTIFIED. NO CHISQUARE TEST IS AVAILABLE. CHECK YOUR MODEL.” I am trying to run a mediation model with all manifest variables: 1 predictor (X), 1 mediator (M), 1 outcome variable (Y), and 4 control variables (C14) which I have regressed on M and Y and correlated with X. I have missing data on C4 which I want to handle with FIML, so I specified its variance and covariances. I am also creating an indirect effect variable a*b for bootstrapping. Thus, I thought I would be estimating 23 parameters (see code below), and with 7(8)/2 = 28 elements, my degrees of freedom should be 5. However, the ChiSquare degrees of freedom in the output is 2 and number of free parameters = 37. I also noticed that means and intercepts are included in the output although I did not specify this. MODEL: M ON X (a); Y ON M (b); Y ON X; M ON C1 C2 C3 C4; Y ON C1 C1 C2 C3 C4; X WITH C1 C2 C3 C4; C4; ! Variance C4 WITH M Y C1 C2 C3; ! Covariances MODEL CONSTRAINT: NEW (ab1); ab1 = a*b; 


The same variables cannot be used in both an ON and WITH statement, for example, m ON c4 and m WITH c4. They cannot both be identified. 


Dear Linda, Thank you for your response. I removed M and Y from the C4 WITH statement and the model now converges. However, I am still wondering how degrees of freedom are calculated in this situation. I thought I had 7(8)/2 = 28 elements and am now specifying 21 parameters for a df of 7. But my output states the number of free parameters is 35 and the chi square df is 0. Thank you kindly 


Please send the full output and your license number to support@statmodel.com so I can see exactly what you are looking at. 

Back to top 