Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SAS 1.74 KB | None | 0 0
  1. proc import datafile='/home/wngamou/multivariate_stats/surveydata2.txt'
  2. out=mydataA1 dbms=tab replace;
  3. run;
  4. data mydataA2;
  5. set mydataA1;
  6. label X1='Feminists' X2='Conservatives'
  7.     X3='Blacks' X4='The Women''s Movement' X5='Liberals' X6='Hispanic-Americans'
  8.     X7='Lawyers' X8='Southerners' X9='Whites' X10='Jews' X11='Immigrants' X12='Asian-Americans';
  9.     run;
  10.  
  11. /* Principal component analysis with covariance and varimax. */
  12. Title 'Principal Component Factoring';
  13. proc factor data=mydataA2
  14.         msa
  15.         method=principal
  16.         cov
  17.         scree
  18.         score
  19.         corr
  20.         preplot
  21.         plots(flip)=all
  22.         rotate=v;
  23.         var x:;
  24.         run;
  25.  
  26. /* Principal Axis Factoring with covariance and varimax. */
  27. Title 'Principal Axis Factoring';
  28. proc factor data=mydataA2
  29.         msa
  30.         method=prinit
  31.         priors=one
  32.         cov
  33.         maxiter=100
  34.         scree
  35.         score
  36.         corr
  37.         preplot
  38.         plots(flip)=all
  39.         rotate=v
  40.         ;
  41.         var x:;
  42.         run;
  43.  
  44. /* Image factoring with covariance and varimax. */
  45. Title 'Image Analysis';
  46. proc factor data=mydataA2
  47.         msa
  48.         method=prinit
  49.         priors=smc
  50.         cov
  51.         maxiter=100
  52.         scree
  53.         score
  54.         corr
  55.         preplot
  56.         plots(flip)=all
  57.         rotate=v
  58.         ;
  59.         var x:;
  60.  
  61. run;
  62.  
  63.  
  64.  
  65. title "Principal Component Factoring";
  66. proc factor data=mydataA2 method=principal n=3 priors=one plot plots(flip)=all residuals;
  67. run;
  68.  
  69.  
  70. title "Principal Axis Factoring";
  71. proc factor data= mydataA2 method=prinit n=3 priors=one plot plots(flip)=all residuals ;
  72. run;
  73.  
  74.  
  75. title "Image Analysis";
  76. proc factor data=mydataA2 method=prinit priors=smc plot plots(flip)=all residuals ;
  77. run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement