PSY 817: SAS-lab #22
April 11, 1997

Objectives:

     1) Exploratory Factor Analysis with SAS

     2) Confirmatory Factor Analysis with program CFA

Objective 1: Exploratory Factor Analysis with SAS

1) Create a SAS data set for the following data.

   (Note that this is the same data that was provided for the CFA, last week)



                                             5700  12.8  2500  270  25000

                                             1000  10.9   600   10  10000

                                             3400   8.8  1000   10   9000

                                             3800  13.6  1700  140  25000

                                             4000  12.8  1600  140  25000

                                             8200   8.3  2600   60  12000

                                             1200  11.4   400   10  16000

                                             9100  11.5  3300   60  14000

                                             9900  12.5  3400  180  18000

                                             9600  13.7  3600  390  25000

                                             9600   9.6  3300   80  12000

                                             9400  11.4  4000  100  13000



The variables, in order, are POPULATION, # OF YEARS IN SCHOOL, # OF EMPLOYMENT

OPPORTUNITIES, SOCIAL SERVICES, and  HOUSEVAR (price of house).



2) Get correlations for all of the variables (you'll need them for objective 2)

3) Run an exploratory factor analysis (SAS code is provided below)



               PROC FACTOR DATA=FACTOR1

               SIMPLE

               METHOD= PRIN

               PRIORS=SMC

               SCREE

               ROTATE=VARIMAX

               ROUND

               FLAG=.60

               SCORE OUTSTAT=FACTSCOR;

               RUN;



4) Look at the eigenvalues and the scree plot.  How many factors are there?

   (Use an eigenvalue cut-off of 1.0)



5) Look at the Varimax ouput (after the rotation).  Examine the factor loadings and determine

   which items load on which factors (use .6 as the cut-off)

Objective 2: Confirmatory Factor Analysis with program CFA

Note 1: You will need to get program CFA from me, in order to do this objective.
Note 2: Make sure you write down the names and locations of all the files that you will make.
 

1) Make a data file, using the correlation matrix from the PROC CORR output in objective 1.

2) Run program CFA.EXE and request normal analysis.

3) Go ahead and ask for a sampling error analysis.

4) Do not reflect any of the items.

5) There are two factors.

   a) Factor 1 is made up of  # OF YEARS IN SCHOOL, SOCIAL SERVICES, and HOUSEVAR

   b) Factor 2 is made up of  POPULATION and # OF EMPLOYMENT OPPORTUNITIES

6) You will need to select the option "check out the instruction file just made" in order to name

   the instruction file and use it in the analysis.