Abstract
Multiple-group analysis in covariance-based structural equation modeling (SEM) is an important technique to ensure the invariance of latent construct measurements and the validity of theoretical models across different subpopulations. However, not all SEM software packages provide multiple-group analysis capabilities. The sem package for the R system, which holds an important position as the only open-source SEM software, does not currently offer multigroup analysis. This article offers an alternative to true multigroup modeling that is easy to understand and apply in the R software. It is limited, however, by the constraint that groups require equal sample size.
Notes
1All scripts and model specification files are available from the author by e-mail.
2Comma-separated values, a common file format for spreadsheets and similar data.
3The mardia() function does not report the actual coefficients (eqs. 2.23 and 3.12 in Mardia, 1970), but the test statistics (eqs. 2.26 and 3.20 in Mardia, 1970) and reports the p values of a significance test.
4Readers will, of course, find slightly different values when they generate their own data set using the simulation script in .
5If the estimation does not converge, the sem() function provides an option to set the start values of the free parameters, using the par.size='startvalues' option. Alternatively, start values can be provided in the model specification file. See Fox (2006) for further details.
6Specifically, p is the probability that, if the specified model constraints and estimated parameter values hold in the population, the sample will have the observed covariances.
7For the sake of brevity, I omit many of the R commands that are similar to previous sections.
8See www.graphviz.org