Hy,
I want to calculate by formula instead of using Proc Factor and Proc Score in SAS EG.
I want CSAT score from avbailable Varibales i.e positive behaviour, positive bribe and positive service,
i have attached one examnple by the name of Example1 and Example 2
help me what will be the formula to get this score
Thank You
Shakti
What exactly is the problem with the code you are showing? Why isn't PROC SCORE sufficient in this case?
Proc factor and Proc score both are not accessible in my system.
I just want formula instead of proc score and Proc factor
So what is wrong with the formula you typed?
which formula calculate the factor. I have used that Varibales-(mean(Variables)/Std). is it calculating the Factor/Score?
You probably need to center the raw data as well. See if this helps:
title 'PROC FACTOR';
proc factor data=sashelp.class method=prin nfact=2 outstat=outstat out=out ;
var height weight;
run;
proc print data=out;
run;
title 'PROC SCORE';
/*The PROC SCORE statement does not contain the NOSTD option,
so the data in the input data set are standardized before scoring.*/
proc score data=sashelp.class score=outstat out=scored;
var height weight;
run;
proc print data=scored;
run;
title 'BY HAND';
proc print data=outstat;
run;
/*
Obs _TYPE_ _NAME_ Height Weight
1 MEAN 62.3368 100.026
2 STD 5.1271 22.774
3 N 19.0000 19.000
4 CORR Height 1.0000 0.878
5 CORR Weight 0.8778 1.000
6 COMMUNAL 1.0000 1.000
7 PRIORS 1.0000 1.000
8 EIGENVAL 1.8778 0.122
9 PATTERN Factor1 0.9690 0.969
10 PATTERN Factor2 0.2472 -0.247
11 SCORE Factor1 0.5160 0.516
12 SCORE Factor2 2.0227 -2.023
*/
data scores_by_hand;
set sashelp.class;
MeanHeight= 62.3368 ;
MeanWeight=100.026 ;
StdHeight=5.1271;
StdWeight= 22.774 ;
F1_StdScoringCoeff_Height=0.51601467;
F1_StdScoringCoeff_Weight=0.51601467;
F2_StdScoringCoeff_Height=2.02266093;
F2_StdScoringCoeff_Weight=-2.02266093;
Factor1=F1_StdScoringCoeff_Height*(Height-MeanHeight)/StdHeight +
F1_StdScoringCoeff_Weight*(Weight-MeanWeight)/StdWeight ;
Factor2=F2_StdScoringCoeff_Height*(Height-MeanHeight)/StdHeight +
F2_StdScoringCoeff_Weight*(Weight-MeanWeight)/StdWeight ;
drop MeanHeight MeanWeight StdHeight StdWeight
F1_StdScoringCoeff_Height F1_StdScoringCoeff_Weight
F2_StdScoringCoeff_Height F2_StdScoringCoeff_Weight ;
run;
proc print data=scores_by_hand;
run;
Thank You
But How to calculate by formula of F1_StdScoringCoeff_Height and F1_StdScoringCoeff_Weight ??
I don't have access for SAS/STAT. that's why I am Unable to use Proc Factor and Proc score. So I want to do by Formula instead of Proc factor and proc score.
I don't understand. Your first post shows output from PROC FACTOR, so someplace along the line it was available. Could you explain your situation further?
SteveDenham
Hy,
other system have access Proc factor. but in my system don't have an access of SAS/STAT. so I want to calculate by formula..
Thank you
I misunderstood the question. Let me regroup...
If you want to derive the factor scoring coefficients outside of SAS, you would still need a matrix algebra software package. Here is an example (which I did not write) using PROC IML:
proc corr data=sashelp.class outp=corr;
var age height weight;
run;
proc factor data=corr method=prin;
ods select eigenvalues;
run;
proc iml;
R= {1.0000 0.8114 0.7409,
0.8114 1.0000 0.8778,
0.7409 0.8778 1.000};
priors={1 1 1};
d=diag(priors);
r1 = R-i(3) +d;
print r r1;
call eigen(e1,e2,r1);
print e1;
quit;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.