Chapter 4: Structural Equation Models

Example 3 on Structural equation modelling: A multigroup model

Fit the structural equation model considered in the Examples 2 and 3, but now as a multigroup model fitted to the data from Denmark, Norway and Sweden (we limit the analysis to these countries to keep the example simple). Using likelihood ratio tests, examine if the regression coefficients in the structural model vary significantly between these countries.

Stata commands:

// A multigroup structural equation model, for three countries
gen DKNOSE=(cntry=="DK"|cntry=="NO"|cntry=="SE")
set matsize 5000
* First, fit the measurement models separately to
* obtain good starting values for fitting the full model
sem ///
(Effective -> plcpvcr plccbrg plcarcr) ///
(ProcFair -> plcrspc plcfrdc plcexdc) ///
if DKNOSE, ///
var(Effective@1) var(ProcFair@1) ///
method(mlmv)
matrix b=e(b)
sem ///
(Obey -> bplcdc doplcsy dpcstrb) ///
(MoralAlign -> plcrgwr plcipvl gsupplc) ///
if DKNOSE, ///
var(Obey@1) var(MoralAlign@1) ///
method(mlmv)
matrix b1=e(b)
matrix b=b,b1
sem ///
(Cooperation -> caplcst widprsn wevdct) ///
if DKNOSE, ///
var(Cooperation@1) ///
method(mlmv)
matrix b1=e(b)
matrix b=b,b1
// All structural parameters vary by country:
sem ///
(Effective -> plcpvcr@v1 plccbrg plcarcr) ///
(ProcFair -> plcrspc@v2 plcfrdc plcexdc) ///
(Obey -> bplcdc@v3 doplcsy dpcstrb) ///
(MoralAlign -> plcrgwr@v4 plcipvl gsupplc) ///
(Cooperation -> caplcst@v5 widprsn wevdct) ///
(Effective ProcFair -> Obey MoralAlign) ///
(20: _cons@v31 -> Obey) ///
(24: _cons@v32 -> Obey) ///
(20: _cons@v41 -> MoralAlign) ///
(24: _cons@v42 -> MoralAlign) ///
(Effective ProcFair Obey MoralAlign -> Cooperation) ///
(20: _cons@v51 -> Cooperation) ///
(24: _cons@v52 -> Cooperation) ///
if DKNOSE, ///
var(7: Effective@1) var(7: ProcFair@1) ///
var(7: e.Obey@1) var(7: e.MoralAlign@1) var(7: e.Cooperation@1) ///
cov(7: e.Obey*e.MoralAlign@v61) ///
cov(20: e.Obey*e.MoralAlign@v62) ///
cov(24: e.Obey*e.MoralAlign@v63) ///
method(mlmv) from(b,skip) ///
group(country) ginvariant(mcons mcoef merrvar)
estimates store allcoeffree
matrix b2=e(b)
// All structural regression coefficients are equal across countries:
sem ///
(Effective -> plcpvcr@v1 plccbrg plcarcr) ///
(ProcFair -> plcrspc@v2 plcfrdc plcexdc) ///
(Obey -> bplcdc@v3 doplcsy dpcstrb) ///
(MoralAlign -> plcrgwr@v4 plcipvl gsupplc) ///
(Cooperation -> caplcst@v5 widprsn wevdct) ///
(Effective ProcFair -> Obey MoralAlign) ///
(20: _cons@v31 -> Obey) ///
(24: _cons@v32 -> Obey) ///
(20: _cons@v41 -> MoralAlign) ///
(24: _cons@v42 -> MoralAlign) ///
(Effective ProcFair Obey MoralAlign-> Cooperation) ///
(20: _cons@v51 -> Cooperation) ///
(24: _cons@v52 -> Cooperation) ///
if DKNOSE, ///
var(7: Effective@1) var(7: ProcFair@1) ///
var(7: e.Obey@1) var(7: e.MoralAlign@1) var(7: e.Cooperation@1) ///
cov(7: e.Obey*e.MoralAlign@v61) ///
cov(20: e.Obey*e.MoralAlign@v62) ///
cov(24: e.Obey*e.MoralAlign@v63) ///
method(mlmv) from(b2,skip) ///
group(country) ginvariant(mcons mcoef merrvar scoef)
estimates store allcoefequal
// Comparing models where all coefficients vs. none vary by country:
lrtest allcoeffree allcoefequal

Stata output and notes

R commands:

# A multigroup structural equation model, for three countries
library(lavaan)
#
ind <- ESS5Police$cntry=="DK" | ESS5Police$cntry=="NO" | ESS5Police$cntry=="SE"
#
ModelSyntax <- '
Effective =~ plcpvcr + plccbrg + plcarcr
ProcFair =~ plcrspc + plcfrdc + plcexdc
Obey =~ bplcdc + doplcsy + dpcstrb
MoralAlign =~ plcrgwr + plcipvl + gsupplc
Cooperation =~ caplcst + widprsn + wevdct
#
Obey + MoralAlign ~ Effective + ProcFair
Cooperation ~ Effective + ProcFair + Obey + MoralAlign
#
Obey ~~ MoralAlign
# Free latent variances and resid. variances across groups:
Effective ~~ c(1,NA,NA)*Effective
ProcFair ~~ c(1,NA,NA)*ProcFair
Obey ~~ c(1,NA,NA)* Obey
MoralAlign ~~ c(1,NA,NA)* MoralAlign
Cooperation ~~ c(1,NA,NA)* Cooperation
'
# All structural parameters vary by country:
FittedModel.allcoeffree <- sem(model = ModelSyntax,
data = ESS5Police[ind,],group="cntry",
std.lv = TRUE, meanstructure = TRUE,missing="ml",
group.equal=c("intercepts","loadings","residuals"))
## Concise table of estimated structural regression coefficients:
p.tmp<-parameterEstimates(FittedModel.allcoeffree,fmi=F)
p.tmp[p.tmp$op=="~",]
# All structural regression coefficients are equal across countries:
FittedModel.allcoefequal <- sem(model = ModelSyntax,
data = ESS5Police[ind,],group="cntry",
std.lv = TRUE, meanstructure = TRUE,missing="ml",
group.equal=c("intercepts","loadings","residuals","regressions"))
# Comparing models where all coefficients vs. none vary by country:
anova(FittedModel.allcoeffree,FittedModel.allcoefequal)
## Estimates for the fully constrained model:
parameterEstimates(FittedModel.allcoefequal,fmi=F)
summary(FittedModel.allcoefequal,fmi=F)

R output and notes

The command and output files for Stata and R show examples of how these multigroup models can be fitted and likelihood ratio tests can be used to test cross-country constraints of equality for the regression coefficients. In all of these models we specify full cross-national invariance of measurement for all of the indicators of the factors. In the structural models, we allow free cross-national variation in the parameters of the distributions of the exogenous factors (Effectiveness and Procedural fairness) and in all the intercept terms and the residual variances and residual covariances of the models for the endogenous factors.

Consider for example the comparison between the most flexible and the most restrictive structural models here, that is the model where all of the regression coefficients vary between the countries, and the model where none of them do. The likelihood ratio test between these models has a p-value of p=0.56, which is not significant at any conventional level of significance. This means that we do not reject the null hypothesis that each of the coefficients are equal across the countries, i.e. that the associations between the latent factors in this model are of equal strengths in each of Denmark, Norway and Sweden. The common estimated coefficients from this model are shown in Figure 4.3. They are all statistically significant and all positive in sign, except that the coefficient of Effectiveness in the model for Co-operation is negative, as it was also for several other countries in Example 2 of this chapter.

Figure 4.3: Estimated regression coefficients in the structural model in Example 3, fitted to data on respondents from Denmark, Norway and Sweden, and with these coefficients constrained to be equal across the countries.

Go to next chapter >>