N/A
Posts: 0

# Comput component score using Proc Factor

Hi, everyone,

I have question regarding the principle component analysis. In Example 27.2: Principal Factor Analysis from SAS online documentation, I tried to understand how SAS estimated component score for each study subject as it was listed in SAS output. Do they use Standardized Score Coefficient times each observed variable and sum it up? The following is my SAS program for Example 27.2, please help me understand how to obtain the FACTOR1 value of "0.76987
" for the 1st observation in the dataset.

data SocioEconomics;
title 'Five Socioeconomic Variables';
title2 'See Page 14 of Harman: Modern Factor Analysis, 3rd Ed';
input Population School Employment Services HouseValue;
datalines;
5700 12.8 2500 270 25000
1000 10.9 600 10 10000
3400 8.8 1000 10 9000
3800 13.6 1700 140 25000
4000 12.8 1600 140 25000
8200 8.3 2600 60 12000
1200 11.4 400 10 16000
9100 11.5 3300 60 14000
9900 12.5 3400 180 18000
9600 13.7 3600 390 25000
9600 9.6 3300 80 12000
9400 11.4 4000 100 13000
;
proc factor data=SocioEconomics
priors=smc msa scree residual preplot
rotate=promax reorder plot
outstat=fact_all;
title3 'Principal Factor Analysis with Promax Rotation';
run;
proc print;
title3 'Factor Output Data Set';
run;
data fact2(type=factor);
set fact_all;
if _TYPE_ in('PATTERN' 'FCORR') then delete;
if _TYPE_='UNROTATE' then _TYPE_='PATTERN';
proc factor rotate=hk norm=weight reorder plot;
title3 'Harris-Kaiser Rotation with Cureton-Mulaik Weights';
run;
*Calculate component score;
PROC FACTOR DATA=SocioEconomics
SIMPLE
METHOD=PRIN
PRIORS=ONE
NFACT=5
ROTATE=VARIMAX
ROUND
FLAG=.40
OUT=compScore;
VAR Population School Employment Services HouseValue;
RUN;
data test;
set compScore (obs=10);
run;
proc print data =test;run;

The component score for observation 1 is listed in SAS output as following:
Population school employment service houseValue factor1 factor2 factor3 facter4 factor5
5700 12.8 2500 270 25000 0.76987 -0.20496 1.2855 0.67961 1.33417

The SAS output of Standardized Scoring Coefficients

Factor1 Factor2 Factor3 Factor4 Factor5

Population 0.09886764 0.5598077 -0.4006813 -0.0498285 -5.5993237
School 0.77866749 0.05231297 -0.6982606 -1.7458917 -1.217467
Employment 0.00332548 0.53971542 -0.321521 0.41719804 5.64611296
Services -0.3286512 -0.2256072 1.95666459 -0.8228717 0.0481919
HouseValue 0.49310482 0.05074813 -0.5914782 2.39673246 0.44369771

Thanks for your help.

Hui
Discussion stats
• 0 replies
• 118 views
• 0 likes
• 1 in conversation