# Introduction to Structural Equation Modeling with Latent Variables

### Multiple-Group Analysis

PROC CALIS supports multiple-group multiple-model analysis. You can fit the same covariance (and mean) structure model to several independent groups (data sets). Or, you can fit several different but constrained models to the independent groups (data sets). In PROC CALIS, you can use the GROUP statements to define several independent groups and the MODEL statements to define several different models. For example, the following statements show a multiple-group analysis by PROC CALIS:

```proc calis;
group 1 / data=set1;
group 2 / data=set2;
group 3 / data=set3;
model 1 / group=1,2;
path
y <=== x   = beta ,
x <=== z   = gamma;
model 2 / group=3;
path
y <=== x   = beta,
x <=== z   = alpha;
run;
```

In this specification, you conduct a three-group analysis. You define two PATH models. You fit Model 1 to Groups 1 and 2 and Model 2 to Group 3. The two models are constrained for the `y <=== x` path because they use the same path coefficient parameter `beta`. Other parameters in the models are not constrained.

To facilitate model specification by model referencing, you can use the REFMODEL statement to specify models based on model referencing. For example, the previous example can be specified equivalently as the following statements:

```proc calis;
group 1 / data=set1;
group 2 / data=set2;
group 3 / data=set3;
model 1 / group=1,2;
path
y <=== x   = beta ,
x <=== z   = gamma;
model 2 / group=3;
refmodel 1;
renameparm gamma=alpha;
run;
```

The current specification differs from the preceding specification in the definition of Model 2. In the current specification, Model 2 is making reference to Model 1. Basically, this means that the explicit specification in Model 1 is transferred to Model 2. However, the RENAMEPARM statement requests a name change for `gamma`, which becomes a new parameter named `alpha` in Model 2. Hence, Model 2 and Model 1 are not the same. They are constrained by the same path coefficient `beta` for the `y <=== x` path, but they have different path coefficients for the `x <=== z` path.

Model referencing by the REFMODEL statement offers you an efficient and concise way to define models based on the similarities and differences between models. The advantages become more obvious when you have several large models in multiple-group analysis and each model differs just a little bit from each other.