Published on :
Statistical CREATION_INTERNE

Factor analysis with ordinal constraints via PROC CALIS

This code is also available in: Deutsch Español Français
Awaiting validation
This script analyzes the data matrix of Kinzer & Kinzer (Guttman, 1957) using the COSAN modeling language in PROC CALIS. The model specifies a factor structure where loadings are subject to ordinal constraints via the LINCON statement. Built-in SAS© programming statements are used to define the error variances (Psi) as a function of the factor loadings to maintain the correlation structure.
Data Analysis

Type : CREATION_INTERNE


The data is defined directly in the script (Datalines) as a correlation matrix (TYPE=CORR) named 'Kinzer'.

1 Code Block
DATA STEP Data
Explanation :
Creation of a 'CORR' type dataset (correlation matrix) containing variables var1 to var6, with 326 assumed observations (used later via NOBS).
Copied!
1DATA Kinzer(TYPE=CORR);
2Title "Data Matrix of Kinzer & Kinzer, see GUTTMAN (1957)";
3 _TYPE_ = 'CORR'; INPUT _NAME_ $ var1-var6;
4 DATALINES;
5var1 1.00 . . . . .
6var2 .51 1.00 . . . .
7var3 .46 .51 1.00 . . .
8var4 .46 .47 .54 1.00 . .
9var5 .40 .39 .49 .57 1.00 .
10var6 .33 .39 .47 .45 .56 1.00
11;
2 Code Block
PROC CALIS
Explanation :
Execution of PROC CALIS for model fitting. The COSAN statement defines the covariance structure. Matrices B, Psi, and D are explicitly defined. LINCON imposes ordinal constraints on the coefficients of matrix B. The 'psi' calculations ensure that the diagonal of the correlation matrix remains equal to 1.
Copied!
1PROC CALIS DATA=Kinzer nobs=326 nose;
2 cosan
3 var= var1-var6,
4 D(6,DIA) * B(2,GEN) + D(6,DIA) * Psi(6,DIA);
5 matrix B
6 [ ,1]= b11 b21 b31 b41 b51 b61,
7 [ ,2]= 0. b22 b32 b42 b52 b62;
8 matrix Psi
9 [1,1]= psi1-psi6;
10 matrix D
11 [1,1]= d1-d6 ;
12 lincon
13 b61 <= b51,
14 b51 <= b41,
15 b41 <= b31,
16 b31 <= b21,
17 b21 <= b11,
18 0. <= b22,
19 b22 <= b32,
20 b32 <= b42,
21 b42 <= b52,
22 b52 <= b62;
23 
24 /* SAS Programming Statements */
25 /* 6 Constraints on Correlation structures */
26 psi1 = 1. - b11 * b11;
27 psi2 = 1. - b21 * b21 - b22 * b22;
28 psi3 = 1. - b31 * b31 - b32 * b32;
29 psi4 = 1. - b41 * b41 - b42 * b42;
30 psi5 = 1. - b51 * b51 - b52 * b52;
31 psi6 = 1. - b61 * b61 - b62 * b62;
32 vnames
33 B = [factor1 factor2],
34 Psi = [var1-var6],
35 D = Psi;
36RUN;
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 : SAS SAMPLE LIBRARY