options ls=84 ps=55;

title 'SAS Factor Analysis Example 3';

 

data spearman (type=factor);

 if _n_=1 then _type_='PRIORS';

 else if _n_=2 then _type_='N';

 else _type_='corr';

 infile cards missover;

 input _name_$ c f e m d mu;

 datalines;

 val .2 .3 .1 .1 .3

 N 33

 c 1.0

 f .83 1.0

 e .78 .67 1.0

 m .70 .67 .64 1.0

 d .66 .65 .54 .45 1.0

 mu .63 .57 .51 .51 .40 1.0

 ;

 

proc print data=spearman;

run;

 

proc factor data=spearman method=prin priors=input;

   var c f e m d mu;

   title2 'Princial Factor Method with input priors';

run;

 

proc factor data=spearman method=prin res nfact=2;

   title2 'PCM: Res matrix for nfact=2';

run;

 

data spearman (type=corr);

 _type_='corr';

 if _n_=1 then _type_='N';

 infile cards missover;

 input _name_$ c f e m d mu;

 lines;

 N 33

 c 1.0

 f .83 1.0

 e .78 .67 1.0

 m .70 .67 .64 1.0

 d .66 .65 .54 .45 1.0

 mu .63 .57 .51 .51 .40 1.0

 ;

 

proc print data=spearman;

run;

 

proc factor data=spearman method=prin res;* scree;

   var c f e m d mu;

   title2 'Princial Component Method';

run;

 

proc factor data=spearman method=prin res priors=smc;

   title2 'PFM: priors=smc';

run;

 

proc factor data=spearman method=prin res priors=smc nfact=3;

   title2 'PFM: priors=smc nfact=3';

run;

 

proc factor data=spearman method=prin res priors=max;

   title2 'PFM: priors=max';

run;

 

proc factor data=spearman method=prin res priors=max nfact=3;

   title2 'PFM: priors=max nfact=3';

run;