Starting from:

$30

Unsupervised Learning HW2 -Solved



1. Create an R or JMP dataset called RaATINGS that contains the data in the source data file (job ratings.txt or job ratings.xlsx). Assign the names JOB, KNOWHOW, PROBLEM_SOLVING, ACCOUNTABILITY, SALARY, respectively, to the five variables as they appear from left to right in the file. (These are the names that appear in the first line of each source file and should be the names automatically assigned to the variables under default file reading.) Extract the principal components of the three dimensions that were rated by the management consulting firm. Use the default (standardized) version of the extraction. Your answer for question 1 is your R script and/or your JMP script code only. [Hint: If you use JMP, you can save the JMP script that your pointing-and-clicking generate by clicking the File menu on the JMP Home Page and then selecting Save Session Script ... toward the bottom. Your JMP script will be saved as a text (Notepad-readable) file with the extension jsl.] 

2. This question verifies some basic property of principal components transformations. a) Write the equations of the principal components of the PCA in question 1. b) Verify that the principal component transformation in question 1 is an orthonormal rotation of the (standardized) attributes (the original three dimensions) by showing that the rotation matrix satisfies the definition of an orthonormal transformation. [Hint: You may find it convenient to perform the computations in Excel. You may wish to submit Excel computations as your 

3. This question partially verifies the geometry-preserving property of principal components transformations. a) Take the first two jobs in the text file and transform them from attribute space into component space by calculating their principal component scores. b) The rotated scores for the two jobs in part (a) are each a vector of three scores. Verify that the lengths of these two vectors are the same as the lengths of the original (but standardized) ratings vectors of the two jobs. c) Verify that the angle between these two rotated vectors is the same as the angle between the original unrotated vectors. [Hint: You may find it convenient to perform the computations in Excel. You may wish to submit Excel computations as your solution.] 

4. Obtain the principal components scores for all 67 jobs. Calculate the variances of the three sets of scores and verify that the variances are equal to the eigenvalues of the PC transformation. [Hint: Once you have the PCs, you can calculate variances within R or JMP. If you prefer to calculate variances in Excel, you can get the scores in JMP and then copy into Excel by clicking on the red down chevron just to the left at the top of the Principal Components: on Correlations window, then select Save Columns, then Save Principal Components, and the number of components that you specify will be added to your Ratings data window. You can then use the File menu to Save As an xlsx workbook.] 

5. Find the regression equation that results from regressing PRIN1 on the three ratings 

knowhow, problem_solving, and accountability, without an intercept, 1 after the ratings have been standardized to mean 0 and variance 1. Are you surprised by the equation? [Hint: It may be convenient to standardize the variables manually – say in Excel – and then read them into R or JMP for regression.] 

6. Find the regression equation that results from regressing (standardized) KNOWHOW on the three principal components without an intercept. Are you surprised by the equation? [Hint: see preceding hint.] 

7. Write the loadings matrix, structured with components as columns and variables as rows. Using the loadings matrix, try to interpret relevant business (not mathematical, not statistical) meanings for the three principal components. 

8. How many principal components would you retain ... a) Using the Kaiser rule? b) Using the Joliffe rule? c) Using the 80% rule? d) Your own judgment? 

9. Find the regression equation that results from regressing salary on the three principal components with intercept. How much explanatory power do the three PCs collectively have in explaining salary? 

10. In terms of explaining salary...
a) Which component is most useful? Second most useful? Least useful?
b) Is the usefulness of the PCs for explaining salary in the order PC1 > PC2 > PC3? c) How much explanatory power is lost if one uses only PRIN1 to explain salary 

More products