(View the complete code for this example.)
This example uses the same data set that is used in Example 33.1 and estimates the means and covariances. Use the MSTRUCT model specification as shown in the following statements:
proc calis data=sales meanstr nostand;
mstruct var=q1-q4;
run;
In the PROC CALIS statement, specify the MEANSTR option to request the mean structure analysis in addition to the default covariance structure analysis. If you are not interested in the standardized solution, specify the NOSTAND option in the PROC CALIS statement to suppress computation of the standardized estimates. Without further model specification (such as the MATRIX statement), PROC CALIS assumes a saturated structural model with all means, variances, and covariances as model parameters.
Output 33.2.1 shows the modeling information. With the MEANSTR option specified in the PROC CALIS statement, the current analysis type is Means and Covariances, instead of the default Covariances in Example 33.1.
Output 33.2.1: Modeling Information of the Saturated Mean and Covariance Structure Model for the Sales Data
| Saturated Means and Covariance Structures Using MSTRUCT |
| Modeling Information | |
|---|---|
| Maximum Likelihood Estimation | |
| Data Set | WORK.SALES |
| N Records Read | 14 |
| N Records Used | 14 |
| N Obs | 14 |
| Model Type | MSTRUCT |
| Analysis | Means and Covariances |
| Variables in the Model |
|---|
| q1 q2 q3 q4 |
| Number of Variables = 4 |
Output 33.2.2 shows the fit summary of the current model. Again, this is a perfect model fit with 0 chi-square value and 0 degrees of freedom.
Output 33.2.2: Fit Summary of the Saturated Mean and Covariance Structure Model for the Sales Data
| Fit Summary | |
|---|---|
| Chi-Square | 0.0000 |
| Chi-Square DF | 0 |
| Pr > Chi-Square | . |
Output 33.2.3 shows the estimates of the means, together with the standard error estimates and the t values. These estimated means are exactly the same as the sample means, which are not shown here.
Output 33.2.3: Mean Estimates for the Sales Data
| MSTRUCT _Mean_ Vector | ||||
|---|---|---|---|---|
| Variable | Estimate | Standard Error |
t Value | Pr > |t| |
| q1 | 1.36714 | 0.16132 | 8.4749 | <.0001 |
| q2 | 2.07429 | 0.13146 | 15.7790 | <.0001 |
| q3 | 2.20286 | 0.21596 | 10.2001 | <.0001 |
| q4 | 3.65500 | 0.45281 | 8.0718 | <.0001 |
Output 33.2.4 shows the variance and covariance estimates. These estimates are exactly the same as the elements in the sample covariance matrix. In addition, these estimates match the estimates in Output 33.1.5 of Example 33.1, where only the covariance structures are analyzed.
Output 33.2.4: Variance and Covariance Estimates for the Sales Data
| MSTRUCT _COV_ Matrix: Estimate/StdErr/t-value/p-value | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| q1 | q2 | q3 | q4 | |||||||||||||||||
| q1 |
|
|
|
|
||||||||||||||||
| q2 |
|
|
|
|
||||||||||||||||
| q3 |
|
|
|
|
||||||||||||||||
| q4 |
|
|
|
|
||||||||||||||||
These estimates are essentially the same as the sample means, variances, and covariances. This kind of analysis is much easier using PROC CORR with the NOMISS option. However, the main purpose of Example 33.1 and Example 33.2 is to introduce the MSTRUCT modeling language and some basic but important options in PROC CALIS. You can apply the MSTRUCT modeling language to more sophisticated situations that are beyond the saturated mean and covariance structure models. Example 33.3 and Example 33.4 fit some patterned covariance models that are nonsaturated. Also, options such as NOSTDERR, NOSTAND, and MEANSTR are useful for all modeling languages in PROC CALIS.