Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proc import datafile='/home/wngamou/multivariate_stats/surveydata2.txt'
- out=mydataA1 dbms=tab replace;
- run;
- data mydataA2;
- set mydataA1;
- label X1='Feminists' X2='Conservatives'
- X3='Blacks' X4='The Women''s Movement' X5='Liberals' X6='Hispanic-Americans'
- X7='Lawyers' X8='Southerners' X9='Whites' X10='Jews' X11='Immigrants' X12='Asian-Americans';
- run;
- /* Principal component analysis with covariance and varimax. */
- Title 'Principal Component Factoring';
- proc factor data=mydataA2
- msa
- method=principal
- cov
- scree
- score
- corr
- preplot
- plots(flip)=all
- rotate=v;
- var x:;
- run;
- /* Principal Axis Factoring with covariance and varimax. */
- Title 'Principal Axis Factoring';
- proc factor data=mydataA2
- msa
- method=prinit
- priors=one
- cov
- maxiter=100
- scree
- score
- corr
- preplot
- plots(flip)=all
- rotate=v
- ;
- var x:;
- run;
- /* Image factoring with covariance and varimax. */
- Title 'Image Analysis';
- proc factor data=mydataA2
- msa
- method=prinit
- priors=smc
- cov
- maxiter=100
- scree
- score
- corr
- preplot
- plots(flip)=all
- rotate=v
- ;
- var x:;
- run;
- title "Principal Component Factoring";
- proc factor data=mydataA2 method=principal n=3 priors=one plot plots(flip)=all residuals;
- run;
- title "Principal Axis Factoring";
- proc factor data= mydataA2 method=prinit n=3 priors=one plot plots(flip)=all residuals ;
- run;
- title "Image Analysis";
- proc factor data=mydataA2 method=prinit priors=smc plot plots(flip)=all residuals ;
- run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement