Published on :
Statistical CREATION_INTERNE

PROC CALIS Documentation Example

This code is also available in: Deutsch Español Français
Awaiting validation
The SAS© program first creates an internal 'sales' dataset containing observations for four variables (q1 to q4). Then, it executes PROC CALIS multiple times with different configurations to analyze the data's covariance structure. The options `covpattern=diag` and `covpattern=sigsqi` are explored, as well as the effect of `chicorrect=0` on the chi-square test results. This demonstrates how to specify covariance matrix structures in the analysis.
Data Analysis

Type : CREATION_INTERNE


The data is created directly within the SAS script using a DATA STEP statement with `datalines`.

1 Code Block
DATA STEP Data
Explanation :
This DATA STEP block creates a dataset named 'sales' with four variables (q1, q2, q3, q4) using raw data provided directly in the script (datalines). This data will serve as input for subsequent CALIS analyses.
Copied!
1DATA sales;
2 INPUT q1 q2 q3 q4;
3 DATALINES;
41.03 1.54 1.11 2.22
51.23 1.43 1.65 2.12
63.24 2.21 2.31 5.15
71.23 2.35 2.21 7.17
8 .98 2.13 1.76 2.38
91.02 2.05 3.15 4.28
101.54 1.99 1.77 2.00
111.76 1.79 2.28 3.18
121.11 3.41 2.20 3.21
131.32 2.32 4.32 4.78
141.22 1.81 1.51 3.15
151.11 2.15 2.45 6.17
161.01 2.12 1.96 2.08
171.34 1.74 2.16 3.28
18;
2 Code Block
PROC CALIS
Explanation :
This PROC CALIS call performs a factor analysis or structural equation modeling on the 'sales' dataset. The `covpattern=diag` option specifies that error variances are modeled as independent and of the same value (diagonal covariance matrix for errors).
Copied!
1PROC CALIS DATA=sales covpattern=diag;
2RUN;
3 Code Block
PROC CALIS
Explanation :
Similar to the previous block, this PROC CALIS execution also uses `covpattern=diag`. The `chicorrect=0` option disables the Satorra-Bentler correction for the chi-square test, which may be relevant when data do not follow a multivariate normal distribution.
Copied!
1 
2PROC CALIS
3DATA=sales covpattern=diag chicorrect=0;
4RUN;
5 
4 Code Block
PROC CALIS
Explanation :
This block executes PROC CALIS with `covpattern=sigsqi`. This option models error variances as independent and different for each variable (diagonal covariance matrix with different elements on the diagonal).
Copied!
1PROC CALIS DATA=sales covpattern=sigsqi;
2RUN;
5 Code Block
PROC CALIS
Explanation :
This final PROC CALIS execution combines `covpattern=sigsqi` with `chicorrect=0`. It models independent and heterogeneous error variances, while disabling the Satorra-Bentler correction for the chi-square test, as explained previously.
Copied!
1 
2PROC CALIS
3DATA=sales covpattern=sigsqi chicorrect=0;
4RUN;
5 
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : S A S S A M P L E L I B R A R Y