Error Message for Multiple Group Path Analysis with a Single Outcome

66 views
Skip to first unread message

Dan Laxman

unread,
Feb 14, 2019, 7:20:09 PM2/14/19
to lavaan
Hello,

I'm conducting a path analysis in which I predict a single outcome from 10 predictors. There are two groups and I'm interested in whether the effect of each predictor is equivalent across groups. I've added constraints forcing paths to be equivalent across groups, testing one or more paths at a time. One one path differed between groups.

Here is my syntax for the final model:

Model_9 <- '

ImpPhen ~      c(MPC, MPC)*MPC +
                      c(MBC, MBC)*MBC +
                      MHP +
                      c(FPC, FPC)*FPC +
                      c(FBC, FBC)*FBC +
                      c(FHP, FHP)*FHP +
                      c(GSE, GSE)*GSE +
                      c(SE, SE)*SE +
                      c(Age, Age)*Age +
                      # Cores is categorical recoded as numeric (0,1)
                      c(Cores,Cores)*Coresidence

MPC ~~ MBC
MPC ~~ MHP
MPC ~~ FPC
MPC ~~ FBC
MPC ~~ FHP
MPC ~~ GSE
MPC ~~ SE
MPC ~~ Age
MPC ~~ Coresidence

MBC ~~ MHP
MBC ~~ FPC
MBC ~~ FBC
MBC ~~ FHP
MBC ~~ GSE
MBC ~~ SE
MBC ~~ Age
MBC ~~ Coresidence

MHP ~~ FPC
MHP ~~ FBC
MHP ~~ FHP
MHP ~~ GSE
MHP ~~ SE
MHP ~~ Age
MHP ~~ Coresidence

FPC ~~ FBC
FPC ~~ FHP
FPC ~~ GSE
FPC ~~ SE
FPC ~~ Age
FPC ~~ Coresidence

FBC ~~ FHP
FBC ~~ GSE
FBC ~~ SE
FBC ~~ Age
FBC ~~ Coresidence

FHP ~~ GSE
FHP ~~ SE
FHP ~~ Age
FHP ~~ Coresidence

GSE ~~ SE
GSE ~~ Age
GSE ~~ Coresidence

SE ~~ Age
SE ~~ Coresidence

Age ~~ Coresidence

'



fit_9 <- lavaan::sem(Model_9,
           data=I.Data_clean.cc.rev,
           group = "Group",
           estimator = "MLR")

summary(fit_9,
        fit.measures = TRUE,
        standardized=TRUE)

When I indicate "standardized=TRUE", I receive the following warning:
lavaan WARNING:
    The variance-covariance matrix of the estimated parameters (vcov)
    does not appear to be positive definite! The smallest eigenvalue
    (= 3.520778e-15) is close to zero. This may be a symptom that the
    model is not identified.

This model has 9 df. The initial model (i.e., with no across group constraints) has 0 df, and, I believe, is just-identified, but still gave the warning. I don't think the problem is an issue of identification, but perhaps because some predictors are weakly associated with one another. Is this a correct interpretation?

In a path analysis, exogenous covariates are generally allowed to covary. It's not necessary for my model since it is essentially a multiple regression model (i.e., the inclusion of covariances among predictors does not alter the estimates of the paths from predictors to outcome) and my interest is in differences in the effect of predictors by group membership. My hypotheses do not directly relate to covariances among predictors. However, constraining covariances to be equivalent across groups might increase power to test my hypotheses...but I'm not sure how to test whether the 10! = 55 covariances are equivalent across groups in a way that is not at high risk of Type I errors. All of this is to say that one way of addressing the problem is to not estimate covariances. Another may be to constrain covariances to be equivalent across groups where appropriate (i.e., model fit is not significantly worse) because the error does not appear when the model is fit to the data as a single group.

Thanks,

Dan

Daniel J. Laxman, PhD
Postdoctoral Fellow
Department of Human Development and Family Studies
Utah State University

Preferred email address:
Dan.J....@gmail.com

Office:
FCHD West (FCHDW) 001

Mailing address:
2705 Old Main Hill
Logan, UT 84322-2705

Terrence Jorgensen

unread,
Feb 19, 2019, 4:12:02 PM2/19/19
to lavaan
There are two groups and I'm interested in whether the effect of each predictor is equivalent across groups. I've added constraints forcing paths to be equivalent across groups, testing one or more paths at a time.

Careful.  When slopes differ across groups, that is equivalent to the predictor interacting with group (i.e., a product term in a single-group regression).  So when you test equivalence of 1 slope, your results might differ depending on whether other slopes are constrained or not.  This is analogous to the differences between tests using Types I, II, or III SS.

When I indicate "standardized=TRUE", I receive the following warning:
lavaan WARNING:
    The variance-covariance matrix of the estimated parameters (vcov)
    does not appear to be positive definite! The smallest eigenvalue
    (= 3.520778e-15) is close to zero. This may be a symptom that the
    model is not identified.

That argument has nothing to do with the fitting of the model.  Are you sure you don't get it before printing the summary()?  Try fitting model, then just printing fit_9 to the Console.

Your model is identified.  It is just multiple regression, there is nothing funny going on.  But you can make your syntax a lot simpler by leaving out the exogenous covariances and letting fixed.x=TRUE simply grab the observed sample statistics for you.  That frees you from the assumption that they are all normal (one of them is a dummy code, and MLR was only meant to resolve nonnormality of continuous variables).

but perhaps because some predictors are weakly associated with one another. Is this a correct interpretation?

If anything, I would expect severe multicollinearity to be a culprit.  But the interpretation is that there is linear dependency among the parameter estimates, so one of them is redundant with another (or a set of others).  If you run your regressions with lm(), you could use the car package's vif() function to investigate the multicollinearity possibility.
 
However, constraining covariances to be equivalent across groups might increase power to test my hypotheses...

Only if they are estimated (but fixed.x=TRUE is more appropriate in your situation).
 
but I'm not sure how to test whether the 10! = 55 covariances are equivalent across groups in a way that is not at high risk of Type I errors.

You could simultaneously constrain the covariance matrix among predictors to do an omnibus test.

exoNames <- lavNames(fit_9, "ov.x") # get predictor names
## specify all (co)variances
covstruc
<- outer(exoNames, exoNames, function(x, y) paste(x, "~~", y))
satMod
<- c(covstruc[lower.tri(covstruc, diag = TRUE)], # omit redundant
            paste
(exoNames, "~ 1")) # mean structure
## constrained
fit0
<- lavaan(satMod, data = I.Data_clean.cc.rev, group = "Group",
               
group.equal = c("residual.covariances","residuals"))
## unconstrained
fit1
<- lavaan(satMod, data = I.Data_clean.cc.rev, group = "Group")
## compare
anova
(fit0, fit1)


All of this is to say that one way of addressing the problem is to not estimate covariances. Another may be to constrain covariances to be equivalent across groups where appropriate (i.e., model fit is not significantly worse) because the error does not appear when the model is fit to the data as a single group.

If you are also willing to assume the residual variance of the outcome is equal across groups, you could just use OLS regression

## no group moderation (each group has their own intercept)
mod0
<- lm(ImpPhen ~ as.factor(Group) + (MPC + MBC + ... + age), data=I.Data_clean.cc.rev)
## all effects moderated (each group also has their own slope)
mod1
<- lm(ImpPhen ~ as.factor(Group) + as.factor(Group):(MPC + MBC + ... + age), data=I.Data_clean.cc.rev)
anova
(mod0, mod1)


Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Dan Laxman

unread,
Feb 19, 2019, 4:54:00 PM2/19/19
to lav...@googlegroups.com


There are two groups and I'm interested in whether the effect of each predictor is equivalent across groups. I've added constraints forcing paths to be equivalent across groups, testing one or more paths at a time.

Careful.  When slopes differ across groups, that is equivalent to the predictor interacting with group (i.e., a product term in a single-group regression).  So when you test equivalence of 1 slope, your results might differ depending on whether other slopes are constrained or not.  This is analogous to the differences between tests using Types I, II, or III SS.

Is there a procedure for testing equivalence of slopes that avoids this problem?

Your model is identified.  It is just multiple regression, there is nothing funny going on.  But you can make your syntax a lot simpler by leaving out the exogenous covariances and letting fixed.x=TRUE simply grab the observed sample statistics for you.  That frees you from the assumption that they are all normal (one of them is a dummy code, and MLR was only meant to resolve nonnormality of continuous variables).

I'll do that. Is this model still considered a path analysis, or would it be "multiple group multiple regression analysis" (or another term)? I think it would still technically be a path analysis, but I'm wondering if there is a more specific term.


If anything, I would expect severe multicollinearity to be a culprit.  But the interpretation is that there is linear dependency among the parameter estimates, so one of them is redundant with another (or a set of others).  If you run your regressions with lm(), you could use the car package's vif() function to investigate the multicollinearity possibility.

I checked for multicollinearity as part of my preliminary analyses, but found no concerns.

Thank you for your response.

Dan

Daniel J. Laxman, PhD
Postdoctoral Fellow
Department of Human Development and Family Studies
Utah State University

Preferred email address:
Dan.J....@gmail.com

Office:
FCHD West (FCHDW) 001

Mailing address:
2705 Old Main Hill
Logan, UT 84322-2705
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

Terrence Jorgensen

unread,
Feb 19, 2019, 5:03:55 PM2/19/19
to lavaan
Is there a procedure for testing equivalence of slopes that avoids this problem?

No, when you constrain a parameter to equality, other parameters either will or will not be constrained.  It just depends on what other effects you want to control for when you test each interaction (i.e., do you want to control for other possible interactions? then leave them in the model).
 
I'll do that. Is this model still considered a path analysis, or would it be "multiple group multiple regression analysis" (or another term)?

multiple regression is just a special case of path analysis, when all predictors are exogenous and all outcome(s) do not predict other other outcomes. 

Dan Laxman

unread,
Mar 2, 2019, 3:29:07 AM3/2/19
to lav...@googlegroups.com

Thanks. I've set the model up with fixed.x=TRUE, two groups (multiple group analysis), a single outcome, and estimator = "MLR." Before adding constraints, RMSEA is 0.000 (I believe because of perfect fit since it's essentially a multiple regression model). Once I add constraints (e.g., effect of a predictor constrained to equality across groups), RMSEA is no longer necessarily 0.000 and df increases with each constraint. Does it make sense to examine RMSEA for this model? I would think that it would, but the 90% CI for RMSEA indicates potential poor fit (e.g., [0.000, 0.134]) when I add a constraint even though the Chi-squared difference test is not significant.

The results of my analyses are pretty consistent in that adding across-group constraints to the model results in: (1) a non-significant chi-squared difference test, (2) an estimate for RMSEA that is 0 or very small (e.g., 0.029), and (3) a 90% CI for RMSEA that includes some larger numbers on the high end (e.g., [0.000, 0.155]). I'm not sure how to interpret # 3. It seems odd that RMSEA would indicate potential poor model fit when the Chi-squared difference test has not. Perhaps the 90% CI for RMSEA is not as useful for an analysis like the one I'm doing because the estimate is so imprecise?

Thanks,

Dan

Daniel J. Laxman, PhD

Preferred Email: Dan.J....@gmail.com

Terrence Jorgensen

unread,
Mar 6, 2019, 2:38:09 PM3/6/19
to lavaan

Does it make sense to examine RMSEA for this model?


I tend to ignore RMSEA for models with small df, because the CI tends to be so wide as to make it uninformative.  As in your case, you cannot reject the null hypothesis of perfect, close, adequate, mediocre, or poor fit, so it seems to add no information to your investigation.  This occurs whenever you have small df and/or N.


But Keith Markus and Rex Kline might disagree.  If your N does not provide a sufficiently powerful robust chi-squared test, the RMSEA CI might provide an indication of misfit that chi-squared is less likely to detect.  So you could check the correlation residuals in the constrained model to see if any differences are large (e.g., > 0.1 in absolute magnitude).

resid(fit, type = "cor")
Reply all
Reply to author
Forward
0 new messages