Docsity

Principal Components Analysis - Assignment 2 | EDMS 657, Assignments of Statistics

Toggle sidebar
bg1
EDMS 657
Assignment 2: Principal Components Analysis
Score: This assignment is worth a total of 31 (19+12) points.
Format: Word-processed work is strongly preferred, although neatly handwritten work may be
acceptable. Show all work and explain answers where required. Electronically or manually paste parts
of your computer printout into your homework in the appropriate places. As always, keep a back-up
copy of your work for your own protection.
Due date: This is to be submitted on or before _______________. Work should be submitted on time
for full earned credit. Late work will be accepted for full earned credit if and only if special
arrangements are made prior to the due date; otherwise 5% of the total points possible will be deducted
for each day the assignment is late.
____________________________________________________________________________________
Golding and Seidman (1974) studied the vocational interests of 231 undergraduate males. Each respondent
rated the strength of his interests in 22 vocational areas, listed below:
X1: public speaking (pubspeak) X12: nature (nature)
X2: law and politics (law) X13: agriculture (agric)
X3: business management (busmgmt) X14: adventure (adven)
X4: sales (sales) X15: recreational leadership (recldr)
X5: merchandising (merch) X16: medical service (medsrvc)
X6: office practice (office) X17: social service (socsrvc)
X7: military activities (military) X18: religious activities (relig)
X8: technical supervision (techsup) X19: teaching (teaching)
X9: mathematics (math) X20: music (music)
X10: science (science) X21: art (art)
X11: mechanical (mechanic) X22: writing (writing)
The correlation matrix appears below.
1.00
.77 1.00
.53 .50 1.00
.54 .44 .74 1.00
.54 .48 .91 .82 1.00
.30 .28 .72 .63 .75 1.00
.16 .20 .28 .19 .26 .31 1.00
.36 .34 .79 .56 .70 .63 .38 1.00
-.11 -.05 .08 .02 .05 .20 .03 .14 1.00
-.10 -.09 -.03 -.07 -.08 .02 .15 .05 .50 1.00
-.02 -.07 .22 .23 .21 .27 .29 .37 .44 .62 1.00
.14 -.02 .04 .05 .07 -.03 .23 .11 -.04 .37 .31 1.00
.09 -.01 .06 .10 .09 -.03 .24 .11 -.10 .08 .21 .73 1.00
.21 .18 .15 .15 .14 -.01 .16 .13 .13 .11 .28 .12 .31 1.00
.16 .21 .22 .22 .22 .23 .29 .18 .03 -.07 .09 .10 .32 .41 1.00
.23 .24 .09 .12 .12 .05 .19 .08 .08 .41 .24 .33 .05 .12 .10 1.00
.38 .36 .13 .21 .14 .10 .07 .00 -.19 -.04 -.07 .23 .09 -.01 .18 .29 1.00
.32 .17 .18 .22 .17 .27 .17 .13 -.01 .12 .14 .33 .19 .00 .19 .20 .47 1.00
.37 .23 .29 .35 .28 .30 .15 .20 -.03 .18 .16 .36 .12 -.02 .12 .22 .51 .41 1.00
.22 .04 -.01 .05 .06 -.05 -.22 -.06 .01 .22 .11 .31 .00 -.05 -.28 .26 .27 .37 .42 1.00
.19 -.01 -.06 .04 .05 -.13 -.15 -.10 .02 .22 .12 .49 .17 .02 -.22 .23 .26 .25 .34 .73 1.00
.49 .26 .04 .16 .10 -.08 -.10 -.06 -.23 -.04 -.12 .28 .09 .08 -.02 .15 .42 .31 .42 .57 .62 1.00
pf3
pf4
pf5

Partial preview of the text

Download Principal Components Analysis - Assignment 2 | EDMS 657 and more Assignments Statistics in PDF only on Docsity!

EDMS 657

Assignment 2: Principal Components Analysis

Score: This assignment is worth a total of 31 (19+12) points.

Format: Word-processed work is strongly preferred, although neatly handwritten work may be

acceptable. Show all work and explain answers where required. Electronically or manually paste parts

of your computer printout into your homework in the appropriate places. As always, keep a back-up

copy of your work for your own protection.

Due date: This is to be submitted on or before _______________. Work should be submitted on time

for full earned credit. Late work will be accepted for full earned credit if and only if special

arrangements are made prior to the due date ; otherwise 5% of the total points possible will be deducted

for each day the assignment is late.

____________________________________________________________________________________

Golding and Seidman (1974) studied the vocational interests of 231 undergraduate males. Each respondent

rated the strength of his interests in 22 vocational areas, listed below:

X1: public speaking ( pubspeak ) X12: nature ( nature )

X2: law and politics ( law ) X13: agriculture ( agric )

X3: business management ( busmgmt ) X14: adventure ( adven )

X4: sales ( sales ) X15: recreational leadership ( recldr )

X5: merchandising ( merch ) X16: medical service ( medsrvc )

X6: office practice ( office ) X17: social service ( socsrvc )

X7: military activities ( military ) X18: religious activities ( relig )

X8: technical supervision ( techsup ) X19: teaching ( teaching )

X9: mathematics ( math ) X20: music ( music )

X10: science ( science ) X21: art ( art )

X11: mechanical ( mechanic ) X22: writing ( writing )

The correlation matrix appears below.

Part A (20 points)

1) What is the maximum number of principal components that can be extracted from these data?

Explain. (1 point)

2) Run a PCA extracting all possible principal components (also request a scree plot), but without any

rotation. Also get a component score coefficient matrix. Append these results to the end of your

homework. Note that you will have to use SPSS syntax rather than raw data since raw data are not

available. (4 points)

3) How many units of variance does the first component explain in the original 22 (standardized)

variables? Explain the source of your answer. (1 point)

4) According to SPSS, what is the "recipe" for building the first component? Write out the equation for

Z 1 in terms of the X variables (which are assumed to be standardized). Because this equation

would have 22 predictors, write out the equation with only the first 5 variables ( pubspeak , law ,

busmgmt , sales , merch ). (1 point)

5) According to SPSS, what is the "recipe" for rebuilding pubspeak based on scores from the 22

principal components extracted? Write out the equation for pubspeak with only the first 5

components (Z 1 , Z 2 , …, Z 5 ), which are assumed to be standardized. (1 point)

6) Derive the first eigenvalue using the appropriate loadings. (1 point)

7) a. How many components would need to be extracted in order to extract 80% of the variance in the

original standardized X variables? (1 point)

b. How many components would be extracted using Kaiser's rule? (1 point)

c. Based on the scree plot, how many components do you think should be extracted? Paste scree plot

here and explain. (1 point)

d. Perform Velicer's Minimum Average Partial (MAP) procedure to see how many components

should be extracted. SPSS syntax with the full correlation matrix appears at the end of this

document. (3 points)

8) Assume the researcher wants the first six components. Based on the loadings on these six

components, compute the communality and uniqueness for pubspeak. (2 points)

9) Based on the loadings for the first six components, compute the reproduced correlation between

pubspeak and law. Compute the residual correlation not explained by these six components. (

points)

set printback=none width=80 seed = 1953125. matrix. compute cr = { 1, 0.77, 0.53, 0.54, 0.54, 0.3, 0.16, 0.36, -0.11, -0.1, -0.02, 0.14, 0.09, 0.21, 0.16, 0.23, 0.38, 0.32, 0.37, 0.22, 0.19, 0.49; 0.77, 1, 0.5, 0.44, 0.48, 0.28, 0.2, 0.34, -0.05, -0.09, -0.07, -0.02, -0.01, 0.18, 0.21, 0.24, 0.36, 0.17, 0.23, 0.04, -0.01, 0.26; 0.53, 0.5, 1, 0.74, 0.91, 0.72, 0.28, 0.79, 0.08, -0.03, 0.22, 0.04, 0.06, 0.15, 0.22, 0.09, 0.13, 0.18, 0.29, -0.01, -0.06, 0.04; 0.54, 0.44, 0.74, 1, 0.82, 0.63, 0.19, 0.56, 0.02, -0.07, 0.23, 0.05, 0.1, 0.15, 0.22, 0.12, 0.21, 0.22, 0.35, 0.05, 0.04, 0.16; 0.54, 0.48, 0.91, 0.82, 1, 0.75, 0.26, 0.7, 0.05, -0.08, 0.21, 0.07, 0.09, 0.14, 0.22, 0.12, 0.14, 0.17, 0.28, 0.06, 0.05, 0.1; 0.3, 0.28, 0.72, 0.63, 0.75, 1, 0.31, 0.63, 0.2, 0.02, 0.27, -0.03, -0.03, -0.01, 0.23, 0.05, 0.1, 0.27, 0.3, -0.05, -0.13, -0.08; 0.16, 0.2, 0.28, 0.19, 0.26, 0.31, 1, 0.38, 0.03, 0.15, 0.29, 0.23, 0.24, 0.16, 0.29, 0.19, 0.07, 0.17, 0.15, -0.22, -0.15, -0.1; 0.36, 0.34, 0.79, 0.56, 0.7, 0.63, 0.38, 1, 0.14, 0.05, 0.37, 0.11, 0.11, 0.13, 0.18, 0.08, 0, 0.13, 0.2, -0.06, -0.1, -0.06; -0.11, -0.05, 0.08, 0.02, 0.05, 0.2, 0.03, 0.14, 1, 0.5, 0.44, -0.04, -0.1, 0.13, 0.03, 0.08, -0.19, - 0.01, -0.03, 0.01, 0.02, -0.23; -0.1, -0.09, -0.03, -0.07, -0.08, 0.02, 0.15, 0.05, 0.5, 1, 0.62, 0.37, 0.08, 0.11, -0.07, 0.41, -0.04, 0.12, 0.18, 0.22, 0.22, -0.04; -0.02, -0.07, 0.22, 0.23, 0.21, 0.27, 0.29, 0.37, 0.44, 0.62, 1, 0.31, 0.21, 0.28, 0.09, 0.24, -0.07, 0.14, 0.16, 0.11, 0.12, -0.12; 0.14, -0.02, 0.04, 0.05, 0.07, -0.03, 0.23, 0.11, -0.04, 0.37, 0.31, 1, 0.73, 0.12, 0.1, 0.33, 0.23, 0.33, 0.36, 0.31, 0.49, 0.28; 0.09, -0.01, 0.06, 0.1, 0.09, -0.03, 0.24, 0.11, -0.1, 0.08, 0.21, 0.73, 1, 0.31, 0.32, 0.05, 0.09, 0.19, 0.12, 0, 0.17, 0.09; 0.21, 0.18, 0.15, 0.15, 0.14, -0.01, 0.16, 0.13, 0.13, 0.11, 0.28, 0.12, 0.31, 1, 0.41, 0.12, -0.01, 0, - 0.02, -0.05, 0.02, 0.08; 0.16, 0.21, 0.22, 0.22, 0.22, 0.23, 0.29, 0.18, 0.03, -0.07, 0.09, 0.1, 0.32, 0.41, 1, 0.1, 0.18, 0.19, 0.12, -0.28, -0.22, -0.02; 0.23, 0.24, 0.09, 0.12, 0.12, 0.05, 0.19, 0.08, 0.08, 0.41, 0.24, 0.33, 0.05, 0.12, 0.1, 1, 0.29, 0.2, 0.22, 0.26, 0.23, 0.15; 0.38, 0.36, 0.13, 0.21, 0.14, 0.1, 0.07, 0, -0.19, -0.04, -0.07, 0.23, 0.09, -0.01, 0.18, 0.29, 1, 0.47, 0.51, 0.27, 0.26, 0.42; 0.32, 0.17, 0.18, 0.22, 0.17, 0.27, 0.17, 0.13, -0.01, 0.12, 0.14, 0.33, 0.19, 0, 0.19, 0.2, 0.47, 1, 0.41, 0.37, 0.25, 0.31; 0.37, 0.23, 0.29, 0.35, 0.28, 0.3, 0.15, 0.2, -0.03, 0.18, 0.16, 0.36, 0.12, -0.02, 0.12, 0.22, 0.51, 0.41, 1, 0.42, 0.34, 0.42; 0.22, 0.04, -0.01, 0.05, 0.06, -0.05, -0.22, -0.06, 0.01, 0.22, 0.11, 0.31, 0, -0.05, -0.28, 0.26, 0.27, 0.37, 0.42, 1, 0.73, 0.57; 0.19, -0.01, -0.06, 0.04, 0.05, -0.13, -0.15, -0.1, 0.02, 0.22, 0.12, 0.49, 0.17, 0.02, -0.22, 0.23, 0.26, 0.25, 0.34, 0.73, 1, 0.62; 0.49, 0.26, 0.04, 0.16, 0.1, -0.08, -0.1, -0.06, -0.23, -0.04, -0.12, 0.28, 0.09, 0.08, -0.02, 0.15, 0.42, 0.31, 0.42, 0.57, 0.62, 1 }. call eigen (cr,eigvect,eigval). compute loadings = eigvect * sqrt(mdiag(eigval)). compute fm = make(nrow(cr),2,-9999). compute fm(1,2) = (mssq(cr)-ncol(cr))/(ncol(cr)(ncol(cr)-1)). loop #m = 1 to ncol(cr) - 1. compute a = loadings(:,1:#m). compute partcov = cr - (a * t(a)). compute d = mdiag( 1 / (sqrt(diag(partcov))) ). compute pr = d * partcov * d. compute fm(#m+1,2) = (mssq(pr)-ncol(cr))/(ncol(cr)(ncol(cr)-1)). end loop.

  • identifying the smallest fm value & its location (= # factors). compute minfm = fm(1,2). compute nfactors = 0. loop #s = 1 to nrow(fm).

compute fm(#s,1) = #s -1. do if ( fm(#s,2) < minfm ). compute minfm = fm(#s,2). compute nfactors = #s - 1. end if. end loop. print /title="Velicer's Minimum Average Partial (MAP) Test:". print eigval /title="Eigenvalues" /format "f12.6". print fm /title="Velicer's Average Squared Correlations"/format "f12.6". print minfm/title="The smallest average squared correlation is"/format "f12.6". print nfactors /title="The number of components is". end matrix.