# Chapter 4: Structural Equation Models

### Introduction

In factor analysis, the focus of interest is on how observed indicators act as measures of latent factors, on average levels and variability of the factors, and on assigning values to the factors for individuals. In structural equation models (SEMs), the focus is extended and shifted toward answering questions about relationships (associations) between the constructs of interest, both latent and observed, rather than their measurement. This is illustrated by Figure 4.1, which shows a path diagram for the SEM which is considered in the examples of this chapter. This model has two core elements:

First, the structural model describes the relationships between the constructs of interest. Here those constructs are the five latent variables in the model, and the structural model for them is given by the substantive theoretical model introduced in Chapter 1 (see Figure 1.1). In the diagram, one-headed arrows indicate conditional distributions (regression relationships) where a response variable depends on an explanatory variable, while two-headed arrows indicate correlations (or residual correlations) for variables which are considered to be on an equal footing. Here the two factors Effectiveness and Procedural Fairness are on an equal footing and are used as only explanatory variables (such variables are also known as exogenous variables), while the factors Obligation to Obey, Moral Alignment and Co-operation are response variables to the exogenous variables and/or to each other (i.e. they are endogenous variables). Note that here Obligation to Obey and Moral Alignment are "intervening" or "mediating" variables which are response variables in some relationships (here given the exogenous variables) and explanatory variables in others (here for Co-operation). This kind of ordering of the variables and the assignment of different roles for them in the structural model is derived from substantive theory for the constructs.

Second, the measurement model describes how any latent constructs are measured by observed indicators. Here we use the fifteen survey indicators introduced in Chapter 1, and assume that each latent factor is measured by three of the indicators as shown in Figure 4.1. The measurement model for each factor is a factor analysis model for its three indicators.

More generally, some or even all of the explanatory and/or response variables in the structural model of a SEM may be observed rather than latent variables. For example, here we might have included the respondents' age or ethnic group as additional explanatory variables for the latent factors. For such variables a separate measurement model is redundant and is omitted, because the constructs are assumed to be directly observable.

Figure 4.1: Path diagram for a structural equation model considered in the examples in this chapter.

Page 1

# Chapter 4: Structural Equation Models

### Research questions

The main focus in analyzing structural equation models is usually on answering questions about the structural model, such as the following:

• What are the signs and strengths of the relationships between the variables in the model?
• Are any of these relationships absent (i.e. can they be set to 0)?
• If substantive theory hypothesizes that some relationships are absent, is this justified?

We may also want to know how answers to these questions vary between groups such as countries. This can be assessed using multigroup structural equation modelling. It is discussed at the end of this chapter.

It is also important to remember that these relationships, as estimated from a SEM fitted to observed data, are estimated statistical associations, not causal effects. The substantive theory which informs the specification of the form of the structural model will often include hypotheses about causal relationships between the constructs, which in part determine the ordering of the variables and their relationships in the structural model. However, the act of specifying such a model, drawing a path diagram for it, and estimating its parameters does not in itself imply that the results can then be interpreted as estimated causal effects. For such a claim to be justified, the data and the research design that produced them will always need to satisfy additional assumptions which cannot be checked from the analysis of the data alone. In this respect the situation for a SEM remains the same as it is for any inference on causal effects from any kind of statistical analysis on observed data.

Page 2

# Chapter 4: Structural Equation Models

### Specification of a SEM

In conventional structural equation modelling – and in standard SEM software – all the variables in the structural model are treated as continuous and normally distributed, and all models for response variables are specified as linear regression models. (The only exception to these assumptions is that any observed variables which are used only as explanatory variables, such as age and gender of a respondent, can be of any type, just like in standard regression modelling.) In principle this is not essential, as the structure and ideas of SEMs can be generalized, for example to cases where some of the variables in the model are treated as categorical. Doing so would involve replacing assumptions of normal distributions and linear models with other assumptions where necessary. Some examples of doing so are discussed in Chapter 5 of this module. In practice, however, the use of such models is constrained by what can be conveniently implemented with current computer software. This is more limited for more general models than it is for the linear SEMs for continuous variables which are the topic of this chapter.

In a conventional linear SEM, all the measurement models are factor analysis models, so they are specified in the way that was described in Chapter 2. Distributions of exogenous latent variables are also specified as in factor analysis, as multivariate normal distributions. So the only new element which remains to be described here are regression models for endogenous variables. These are all specified as linear regression models.

To illustrate this model specification in a specific situation, consider the example shown in Figure 4.1. Let η1 and η2 denote the factors Effectiveness and Procedural Fairness respectively, and η3, η4, and η5 Obligation to Obey, Moral Alignment and Co-operation respectively (often different Greek letters are used for exogenous and endogenous latent variables, but we do not do that here). The joint distribution of η1 and η2 is specified as a bivariate normal distribution, as in factor analysis. The models for the other latent factors are specified as:

η3 = α3 + β31η1 + β32η2 + ζ3,
η4 = α4 + β41η1 + β42η2 + ζ4, and
η5 = α5 + β51η1 + β52η2 + β53η3 + β54η4 + ζ4.

Here the ζ's are normally distributed random residuals, each with mean 0 and variances var(ζ1) = ψ1, var(ζ2) = ψ2 and var(ζ3) = ψ3. Each ζ is assumed to be uncorrelated with the explanatory variables in the model where it appears, and all the ζ's are uncorrelated with all the measurement errors (ε's) in the measurement models for the η's. The residuals for η3 and η4 are here assumed to be correlated, with covariance cov(ζ3,ζ4)= ψ34 (this corresponds to the two-headed arrow between Obey and ProcFair in Figure 4.1), but both are assumed to be uncorrelated with ζ5.

These models for the endogenous η's are linear regression models. Their parameters are the intercepts (α's), residual variances and covariances (ψ's), and regression coefficients (β's). The regression coefficients are usually the parameters of main interest. They are interpreted in the same way as in standard linear regression modelling, as partial associations between explanatory variables and response variables. For example, here β51 can be interpreted as the expected change in Co-operation (in its units of measurement) that is associated with a one-unit increase in effectiveness, controlling for the other three latent factors. Note also that each β describes the strength of one regression path (one-headed arrow) in the path diagram for the model, and a value of 0 for a β would be indicated by omitting that path from the diagram.

Page 3

# Chapter 4: Structural Equation Models

### Identification of SEMs

Conditions for a (single-group) structural equation model to be identified are an extension of the corresponding conditions for factor analysis models. First, to identify the latent scales, it is sufficient to assume that the means and variances of all exogenous latent variables are set to 0 and 1 respectively, and all intercept terms (α's) and residual variances (ψ's) of structural regression models are also set at 0 and 1 respectively. Once this is assumed, remaining conditions for identification depend on the structure of the model. However, the following two-step condition is sufficient and usually easy to check:

1. Re-express the model as a confirmatory factor analysis (CFA) model, by replacing all paths in the structural model (whether covariances or regressions) with covariances (two-headed arrows). Then use identification rules for CFA (see Chapter 2) to check whether this model is identified. If it is, the measurement model of the SEM is identified.
2. Consider then the structural model on its own, and replace each latent variable in it with a single observed variable. If this model would be identified and if condition 1 holds, the whole SEM is identified.

A sufficient condition for requirement 2. to hold is that the structural model should be recursive. This means, roughly, that the model should not contain feedback loops. Such loops might take the form of regression models in both directions between two variables, a regression and a residual correlation between two variables, or longer chains of variables which imply similar loops which would allow us to start from a variable and return back to it by following the arrows in the path diagram. Non-recursive structural models are conceptually and practically complicated even when they are identified, so they should be avoided unless substantive theory gives very strong reasons to consider them.

[Bol89] gives a more detailed account of identification conditions for SEMs.

Page 4

# Chapter 4: Structural Equation Models

### Model selection and model assessment for SEMs

An identified structural equation model can be estimated using the same principles as for factor analysis models: the SEM implies also a model for the joint distribution of the observed variables, and the estimated parameters of the fitted model are chosen so as to give the best match between the model-implied distribution and the observed distribution of the sample data. Most often this is done using the method of maximum likelihood (ML) estimation. Examples of the computer commands for fitting SEMs are given in Examples 1 and 2 of this chapter.

For model selection for SEMs, we recommend the following two-step approach:

1. Identify a sufficiently well-fitting and interpretable measurement model separately for each set of observed indicators which you expect on theoretical grounds to be measures of one or more common factors. In other words, indicators which are definitely regarded as measures of different constructs, and which you would never consider combining together in one summary measure of anything, are examined separately at this stage. This step is carried out using methods of model assessment for factor analysis models, as discussed in Chapter 2.
2. Using the forms of the measurement models identified in Step 1 (i.e. fixing their patterns of zero and non-zero factors loadings to specify which indicators measure which factors), fit full structural equation models to estimate the parameters of both the measurement and structural models. Use likelihood ratio tests or z-tests of coefficients to compare different specifications for the structural model, in particular to test whether some paths (regression coefficients) in this model may be set to 0.

This approach avoids the common but rather unhelpful approach of using the kinds of overall goodness of fit statistics which were discussed in Chapter 2 (RMSEAs, CFIs, overall goodness of fit statistics, and so on) to assess the fit of the whole SEM at once. The problem with this approach is that if the model already includes all structural paths and adequate measurement models for all sets of indicators which belong together, and if model assessment statistics still appear unsatisfactory, the only way to improve the "fit" of the model would be to add factor loadings or error correlations between factors and/or indicators which refer to theoretically distinct constructs (quantities such as a factor loading between, say, effectiveness of the police and an indicator of co-operation in our example). This is not something that we would or should actually do in practice, so model assessment which could lead to it is not very constructive.

Page 5

# Chapter 4: Structural Equation Models

### Multigroup structural equation models

Like factor analysis models, SEMs can be generalized to a multigroup version to examine how parameters of the model may vary between groups such as countries. For the measurement models and the distribution of exogenous latent factors this is done as in multigroup factor analysis, in the ways that were explained in Chapter 3. So the only new element that needs to be explained here is the multigroup extension of structural regression models for endogenous factors. To illustrate this step, consider the model for factor η5 (willingness to co-operate with the police) in our example. The multigroup version of this model is

η5 = α5(g) + β51(g)η1 + β52(g)η2 + β53(g)η3 + β54(g)η4 + ζ5

for a respondent in group g = 1, ..., G where ζ5 is normally distributed with mean 0 and variance ψ5(g). In other words, all the parameters of this model may vary between the groups. The intercept and residual variance again need to be fixed in one group (for example, by fixing α5(1) = 0 and ψ5(1) = 1) but can be freely estimated in the other groups.

Likelihood ratio tests can be used to compare models where parameters do and do not vary between the groups, for example to test the model above against one where ψ5(g) = ψ5 in all groups g, (i.e. where the residual variance for η5 is the same across the groups).

Typically the most interesting parameters are the regression coefficients β. Cross-group variation in them indicates that associations between a response variable (e.g. η5 above) and its explanatory variables are of different strengths in different groups. In the language of regression models, such variation thus indicates an interaction between the group and the explanatory variables in a model. An illustration of the estimation and testing such interactions in a cross-national analysis is given in Example 2 of this chapter.

Page 6

# Chapter 4: Structural Equation Models

### Example 1 on Structural equation modelling: A model for one country

Fit the structural equation model shown in Figure 4.1, for ESS data on respondents from the United Kingdom only. Interpret the signs of the regression coefficients in the structural model. Are all of these coefficients significantly different from 0?

// Example of structural equation modelling
// A model for one country (UK) only:
set matsize 1000
* First, fit the measurement models separately to
* obtain good starting values for fitting the full model
quietly: sem ///
(Effective -> plcpvcr plccbrg plcarcr) ///
(ProcFair -> plcrspc plcfrdc plcexdc) ///
if cntry=="GB", var(Effective@1) var(ProcFair@1) ///
method(mlmv)
matrix b=e(b)
quietly: sem ///
(Obey -> bplcdc doplcsy dpcstrb) ///
(MoralAlign -> plcrgwr plcipvl gsupplc) ///
if cntry=="GB", var(Obey@1) var(MoralAlign@1) ///
method(mlmv)
matrix b1=e(b)
matrix b=b,b1
quietly: sem ///
(Cooperation -> caplcst widprsn wevdct) ///
if cntry=="GB", var(Cooperation@1) method(mlmv)
matrix b1=e(b)
matrix b=b,b1
* Fit the full model:
sem ///
(Effective -> plcpvcr plccbrg plcarcr) ///
(ProcFair -> plcrspc plcfrdc plcexdc) ///
(Obey -> bplcdc doplcsy dpcstrb) ///
(MoralAlign -> plcrgwr plcipvl gsupplc) ///
(Cooperation -> caplcst widprsn wevdct) ///
(Effective ProcFair -> Obey MoralAlign) ///
(Effective ProcFair Obey MoralAlign -> Cooperation) ///
if cntry=="GB", ///
var(Effective@1) var(ProcFair@1) ///
var(e.Obey@1) var(e.MoralAlign@1) var(e.Cooperation@1) ///
cov(e.Obey*e.MoralAlign) ///
method(mlmv) from(b,skip)

# Example of structural equation modelling
# A model for one country (UK) only:
library(lavaan)
#
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
'
FittedModel.sem <- sem(model = ModelSyntax,
data = ESS5Police[ESS5Police\$cntry=="GB",],
std.lv = TRUE, meanstructure = TRUE,missing="ml")
summary(FittedModel.sem)

Figure 4.2 shows a path diagram of the structural model, with estimated values of the regression coefficients associated with each of the paths. All of the coefficients are significantly different from 0 (at the 5% level of significance), with the exception that the association between Moral alignment and Co-operatione is not significant in this model which also includes the other three factors as explanatory variables. With one exception the estimated regression coefficients are positive, indicating that higher levels of positive assessment of and co-operation with the police tend to go together. The exception is the coefficient of Effectiveness in the model for Co-operation; this is negative, indicating that individuals who feel that the police are effective in their work tend to be less likely to express willingness to co-operate with the police, at least after we control for the individuals’ assessment of Procedural fairness, Obligation to obey and Moral alignment with the police.

Figure 4.2: Estimated regression coefficients in the structural model in Example 1, fitted to data on UK respondents.

Page 7

# Chapter 4: Structural Equation Models

### Example 2 on Structural equation modelling: The same model fitted separately for different countries

Fit the model considered in Example 1 separately for data from each of the countries in the ESS, and compare the results.

// Fitting the same structural equation model separately for
// each country, and collecting some of the results in a table.
// After fitting the model for one country,
// as in the previous exercise, this command reveals the
// labels of the coefficients, which are used below:
sem, coeflegend // Reveal the coefficient labels, used below
//
levelsof cntry, clean local(countries)
local n_c: word count `countries'
matrix results = J(`n_c',8,.)
matrix rownames results = `countries'
matrix colnames results = bEff pbEff bFair ///
pbFair bObey pbObey bMoral pbMoral
local i = 0
foreach c of local countries {
local ++i
display "Country: " "`c'"
quietly: sem ///
(Effective -> plcpvcr plccbrg plcarcr) ///
(ProcFair -> plcrspc plcfrdc plcexdc) ///
if cntry=="`c'", ///
var(Effective@1) var(ProcFair@1) ///
method(mlmv)
matrix b=e(b)
quietly: sem ///
(Obey -> bplcdc doplcsy dpcstrb) ///
(MoralAlign -> plcrgwr plcipvl gsupplc) ///
if cntry=="`c'", ///
var(Obey@1) var(MoralAlign@1) ///
method(mlmv)
matrix b1=e(b)
matrix b=b,b1
quietly: sem ///
(Cooperation -> caplcst widprsn wevdct) ///
if cntry=="`c'", ///
var(Cooperation@1) ///
method(mlmv)
matrix b1=e(b)
matrix b=b,b1
sem ///
(Effective -> plcpvcr plccbrg plcarcr) ///
(ProcFair -> plcrspc plcfrdc plcexdc) ///
(Obey -> bplcdc doplcsy dpcstrb) ///
(MoralAlign -> plcrgwr plcipvl gsupplc) ///
(Cooperation -> caplcst widprsn wevdct) ///
(Effective ProcFair -> Obey MoralAlign) ///
(Effective ProcFair Obey MoralAlign -> Cooperation) ///
if cntry=="`c'", ///
var(Effective@1) var(ProcFair@1) ///
var(e.Obey@1) var(e.MoralAlign@1) var(e.Cooperation@1) ///
cov(e.Obey*e.MoralAlign) method(mlmv) ///
from(b,skip) iter(100) nolog satopts(nolog) baseopts(nolog)
//
local converged=e(converged)
if(`converged'==1){
matrix results[`i',1] = _b[Cooperation:Effective]
quietly: test _b[Cooperation:Effective]==0
matrix results[`i',2] = r(p)
matrix results[`i',3] = _b[Cooperation:ProcFair]
quietly: test _b[Cooperation:ProcFair]==0
matrix results[`i',4] = r(p)
matrix results[`i',5] = _b[Cooperation:Obey]
quietly: test _b[Cooperation:Obey]==0
matrix results[`i',6] = r(p)
matrix results[`i',7] = _b[Cooperation:MoralAlign]
quietly: test _b[Cooperation:MoralAlign]==0
matrix results[`i',8] = r(p)
}
}
//
matlist results, format(%7.3f)

R commands:

# Fitting the same structural equation model separately for
# each country, and collecting some of the results in a table.
library(lavaan)
#
countries <- unique(ESS5Police\$cntry)
results <- matrix(NA,length(countries),8)
rownames(results) <- countries
colnames(results) <- c("bEff","pbEff","bFair","pbFair","bObey","pbObey","bMoral","pbMoral")
#
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
'
# Loop over the countries, and collect results:
i <- 0
for(cntry in countries){
i <- i+1
cat("Country: ", cntry, "\n")
FittedModel.sem <- sem(model = ModelSyntax,
data = ESS5Police[ESS5Police\$cntry==cntry,],
std.lv = TRUE, meanstructure = TRUE,missing="ml")
print(summary(FittedModel.sem))
conv.tmp <- inspect(FittedModel.sem,"converged")
if(conv.tmp){
res.tmp <- parameterEstimates(FittedModel.sem)
res.tmp <- res.tmp[res.tmp\$lhs=="Cooperation"&res.tmp\$op=="~",]
results[i,1] <- res.tmp[res.tmp\$rhs=="Effective","est"]
results[i,2] <- res.tmp[res.tmp\$rhs=="Effective","pvalue"]
results[i,3] <- res.tmp[res.tmp\$rhs=="ProcFair","est"]
results[i,4] <- res.tmp[res.tmp\$rhs=="ProcFair","pvalue"]
results[i,5] <- res.tmp[res.tmp\$rhs=="Obey","est"]
results[i,6] <- res.tmp[res.tmp\$rhs=="Obey","pvalue"]
results[i,7] <- res.tmp[res.tmp\$rhs=="MoralAlign","est"]
results[i,8] <- res.tmp[res.tmp\$rhs=="MoralAlign","pvalue"]
}
}
print(round(results,3))

As one illustration of the results from this analysis, Table 4.1 shows the estimated regression coefficients and their levels of significance for the structural model for Co-operation with the police. Because these models were estimated separately for each of the countries rather than in one multigroup model, the scales of the latent variables are not here fixed to be comparable. The exact values of the regression coefficients can thus not be compared between the countries. However, we can compare the qualitative patterns of the results, for example the signs and levels of significance of the same coefficient in different countries.

There is a fair amount of variation in the levels of significance of the coefficients, in that each of the explanatory factors is a significant predictor of willingness to co-operate in many countries, but none of them in all countries. The variable which is significant in the largest number of countries is the person’s trust in the procedural fairness of the police. The directions of the associations are consistent in the sense that where a coefficient is significant it has the same sign in all the countries, with the one exception of trust in the effectiveness of the police which has a significantly negative coefficient in some countries and a significantly positive one in others.

Table 4.1: Estimated coefficients for the structural model for the factor on Willingness to co-operate with the police, estimated as part of the structural equation model shown in Figure 4.1, separately for each country in the ESS.

Coefficients in the model for
Co-operation:
Country Effectiveness Procedural
fairness
Obligation
to obey
Moral
alignment
Belgium (BE) -0.005 0.089 0.007 0.047
Bulgaria (BG) -0.028 0.148** 0.024 0.075**
Switzerland (CH) -0.078 0.197** 0.004 0.028
Cyprus (CY) -0.124* 0.249*** -0.050 -0.063
Czech Republic (CZ) 0.012 0.123** 0.023 0.086**
Germany (DE) 0.030 0.130*** -0.001 0.053*
Denmark (DK) -0.126** 0.123* 0.123*** 0.063
Estonia (EE) -0.091 0.243*** 0.054 0.102**
Spain (ES) -0.040 0.141* 0.046 -0.021
Finland (FI) -0.125** 0.137** 0.144*** 0.098**
France (FR) -0.163** 0.174** 0.071* 0.051
United Kingdom (GB) -0.089* 0.222*** 0.106*** -0.022
Greece (GR) 0.091* 0.074 -0.018 0.012
Croatia (HR) 0.066 0.138* -0.019 -0.034
Hungary (HU) -0.049 0.073 0.113*** 0.090*
Ireland (IE) 0.010 0.126** 0.013 0.124***
Israel (IL) -0.045 0.100* 0.137*** 0.008
Lithuania (LT) 0.107* -0.007 0.016 0.039
Netherlands (NL) -0.049 0.135** 0.104*** -0.005
Norway (NO) -0.115** 0.116 0.050 0.130**
Poland (PL) -0.094* 0.094 0.027 0.047
Portugal (PT) -0.029 0.023 0.005 -0.012
Russia (RU) 0.063 0.094* 0.016 0.022
Sweden (SE) -0.088* 0.166* 0.077* 0.047
Slovenia (SI) 0.137** 0.027 -0.100** -0.025
Slovakia (SK) -0.004 0.248*** 0.023 -0.054
Ukraine (UA) -0.052 0.106* -0.023 0.096**

Note: ***: p<0.001; **: p<0.01; *:p<0.05

Page 8

# 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.

// 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

# 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",
## 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",
# 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)

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.

Page 9
• [Bol89] Bollen, K. A. (1989). Structural equations with latent variables. Wiley.