FACTOR ANALYSIS OF ECONOMIC PERCEPTION ITEMS

Size: px
Start display at page:

Download "FACTOR ANALYSIS OF ECONOMIC PERCEPTION ITEMS"

Transcription

1 Measurement, Scaling, and Dimensional Analysis Bill Jacoby Summer 2017 FACTOR ANALYSIS OF ECONOMIC PERCEPTION ITEMS This handout shows the log for a STATA session that performs a factor analysis on citizens responses to eight survey questions about their perceptions of personal financial conditions and the national economy. All variables are scored on scales ranging from 1 to 5, with larger values indicating more pessimistic economic perceptions. The data are taken from the 1992 CPS National Election Study and there are 1665 observations in the dataset. The variables and the acronyms used for variable names in the STATA session are as follows (Note that question wordings are paraphrased from the interview schedule): bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr Has your family been getting along better or worse over the past year? Has your family s income been keeping up with the cost of living over the past year? Do you think unemployment has been getting better or worse in the past year? Do you think inflation has been getting better or worse in the past year? Do you think the national economy has been getting better or worse in the past year? Do you think the national economy has been getting better or worse in the past few months? Do you think the national economy has been getting better or worse in the past 4 years? Are you worried about the possibility of losing your job? Part I: STATA Log log: e:\stata factor analysis, 1.smcl log type: smcl. Change delimiter to semicolon and set MORE condition off.. #delimit ; delimiter now ;. set more off; > Retrieve dataset on > 1992 public opinion > about economic conditions.. use econ;

2 Page 2. describe; Contains data from econ.dta obs: 1,665 vars: 9 size: 66,600 (93.6% of memory free) storage display value variable name type format label variable label caseid float %9.0g bet1yr float %9.0g FAMILY GETTING ALONG BETTER/WORSE? inccol float %9.0g INCOME KEEPING UP W COST OF LIVING? unem1yr float %9.0g UNEMPLT BETTER/WORSE IN PAST YR? infl1yr float %9.0g INFLTN BETTER/WORSE IN PAST YR? nec1yr float %9.0g NATL ECON BETTER/WORSE IN PAST YR? necmos float %9.0g NATL ECON BETT/WORSE IN PST FEW MOS? nec4yr float %9.0g NATL ECON BETT/WORSE IN PST 4 YRS? jobworr float %9.0g WORRIED ABOUT EMPLOYMENT STATUS? Sorted by: > Obtain summary statistics > and correlation matrix. summarize bet1yr inccol unem1yr infl1yr nec1yr > necmos nec4yr jobworr; Variable Obs Mean Std. Dev. Min Max bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr correlate bet1yr inccol unem1yr > infl1yr nec1yr necmos nec4yr jobworr; (obs=1665) bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr jobworr jobworr

3 Page 3 > Perform factor analysis, > specifying principal axis > factoring with iterated > communality estimation, > and two common factors. factor bet1yr inccol unem1yr > infl1yr nec1yr necmos nec4yr > jobworr, ipf factors(2); (obs=1665) Factor analysis/correlation Number of obs = 1665 Method: iterated principal factors Retained factors = 2 Rotation: (unrotated) Number of params = Factor Eigenvalue Difference Proportion Cumulative Factor Factor Factor Factor Factor Factor Factor Factor LR test: independent vs. saturated: chi2(28) = Prob>chi2 = Factor loadings (pattern matrix) and unique variances Variable Factor1 Factor2 Uniqueness bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr > The next command produces a scree plot > (illustrated below, in Figure 1). screeplot, > scheme(s1color) > xaxis (1 2) > yaxis (1 2) > ylabel(, axis(1) nogrid) > ylabel(, axis(2) nolabel) > xlabel(, axis(2) nolabel) > xsize(4) > xtitle("", axis(2)) > ytitle("", axis(2))

4 Page 4 > The next command > writes the scree plot > to an external file. graph export scree.wmf, replace; (file e:\scree.wmf written in Windows Metafile format) > The next command displays the > squared multiple correlations > between each variable and the > seven other variables- these > were used as the initial > communality estimates. estat smc; Squared multiple correlations of variables with all other variables Variable smc bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr > The next command displays the > residual correlation matrix. estat residuals; Raw residuals of correlations (observed-fitted) Variable bet1yr inccol unem1yr infl1yr nec1yr necmos bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr Variable nec4yr jobworr nec4yr jobworr > Next, perform an orthogonal, > varimax rotation

5 Page 5. rotate, varimax; Factor analysis/correlation Number of obs = 1665 Method: iterated principal factors Retained factors = 2 Rotation: orthogonal varimax (Horst off) Number of params = Factor Variance Difference Proportion Cumulative Factor Factor LR test: independent vs. saturated: chi2(28) = Prob>chi2 = Rotated factor loadings (pattern matrix) and unique variances Variable Factor1 Factor2 Uniqueness bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr Factor rotation matrix Factor1 Factor Factor Factor > The next command displays the > correlation matrix for the factors, > to verify that they are orthogonal. estat common; Correlation matrix of the varimax rotated common factors Factors Factor1 Factor Factor1 1 Factor2 0 1 > The next two commands estimate > the factor scores, and correlate > these estimated factors. predict factor1 factor2; (regression scoring assumed)

6 Page 6 Scoring coefficients (method = regression; based on varimax rotated factors) Variable Factor1 Factor bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr correlate factor1 factor2; (obs=1665) factor1 factor factor factor > The next command performs > an oblique, promax rotation. rotate, promax; Factor analysis/correlation Number of obs = 1665 Method: iterated principal factors Retained factors = 2 Rotation: oblique promax (Horst off) Number of params = Factor Variance Proportion Rotated factors are correlated Factor Factor LR test: independent vs. saturated: chi2(28) = Prob>chi2 = Rotated factor loadings (pattern matrix) and unique variances Variable Factor1 Factor2 Uniqueness bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr

7 Page 7 Factor rotation matrix Factor1 Factor Factor Factor > The next two commands display the > correlation matrix for the factors > and the factor structure matrix, giving > correlations between variables and > factors. estat common; Correlation matrix of the promax(3) rotated common factors Factors Factor1 Factor Factor1 1 Factor estat structure; Structure matrix: correlations between variables and promax(3) rotated common factors Variable Factor1 Factor bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr > The next two commands generate > factor scores for the oblique-rotated > factors, and correlate the estimated factors. predict factor1a factor2a; (regression scoring assumed)

8 Page 8 Scoring coefficients (method = regression; based on promax(3) rotated factors) Variable Factor1 Factor bet1yr inccol unem1yr infl1yr nec1yr necmos nec4yr jobworr correlate factor1a factor2a; (obs=1665) factor1a factor2a factor1a factor2a > Close the log and > end the STATA session. log close; log: e:\factor analysis\econ92\starting 2005\stata factor analysis, 1.s > mcl log type: smcl Figure 1: Scree plot showing the eigenvalues associated with each factor, in the order of extraction Scree plot of eigenvalues after factor Eigenvalues Number

9 Page 9 Figure 2: Plot of initial (unrotated) common factor space. 1.0 inccol Initial (unrotated) factor jobworr bet1yr infl1yr necmos unem1yr nec4yr nec1yr Initial (unrotated) factor 1 Figure 3: Plot of varimax rotated common factor space inccol Varimax rotated factor bet1yr 0.2 jobworr infl1yr unem1yr necmos nec1yr nec4yr Varimax rotated factor 1

10 Page 10 Figure 4: Plot of promax oblique factor space. Correlated factor axes are shown as dashed lines, and variable labels have been omitted from the vectors for clarity. 1.0 Factor Factor