options ls=85 ps=65;

title 'SAS Factor Analysis Example 5 (Problem 9.19)';

 

data sales;

  infile 'D:\T9-12.DAT';

  input x1-x7;

run;

 

proc print data=sales;

run;

 

proc corr data=sales out=correl;

run;

/*create a data set to save time*/

 

proc factor data=correl method=ml n=1 res;

  title2 'MLE: nfactor=1';

run;

 

proc factor data=correl method=ml n=2 res;

  title2 'MLE: nfactor=2';

run;

 

proc factor data=correl method=ml n=3 res;

  title2 'MLE: nfactor=3';

run;

 

proc factor data=correl method=ml heywood n=2 res;

  title2 'MLE: nfactor=2, hey option';

run;

 

proc factor data=correl method=ml heywood n=3 res;

  title2 'MLE: nfactor=3, hey option';

run;

 

proc factor data=correl method=ml heywood n=4 res;

  title2 'MLE: nfactor=4 hey option';

run;

 

/*

proc factor data=correl method=ml heywood n=2 rotate=v preplot plot;

  title2 'MLE: nfactor=3, hey option, varimax';

run;

 

proc factor data=correl method=ml heywood n=2 rotate=HK preplot plot;

  title2 'MLE: nfactor=3, hey option, rotate HK';

run;

*/