options ls=78; title "Factor Analysis - Principal Component Method - Places Rated"; /* After reading in the places data, the (base 10) log transformations are taken. * This is an optional step and not required for the factor analysis. */ data places; infile "D:\Statistics\STAT 505\data\places.csv" firstobs=2 delimiter=','; input climate housing health crime trans educate arts recreate econ id; climate=log10(climate); housing=log10(housing); health=log10(health); crime=log10(crime); trans=log10(trans); educate=log10(educate); arts=log10(arts); recreate=log10(recreate); econ=log10(econ); run; /* Options for the factor statement are * method= specifes the estimation method from principal components * nfactors= specifies the number of factors to work with * rotate=varimax specifies the rotation type varimax * simple outputs several statistics, such as means and std deviations * scree displays a scree plot of the eigenvalues * ev outputs the eigenvectors * preplot displays a scatterplot of the factor pattern before rotation */ proc factor data=places method=principal nfactors=3 rotate=varimax simple scree ev preplot plot residuals; var climate housing health crime trans educate arts recreate econ; run;