1 year ago

#149616

test-img

Barayjeemqaf

How to Standardize Principal Components after performing PCA using prcomp()?

I am attempting to emulate the following paper,using year 2000 decennial Census data to create an index known as the Neighborhood Deprivation Index(NDI): https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3261293/#CR73

I am particularly struggling with the very last step outlined in the Component extraction and index construction section of the paper. the final steps are

Performing Principal Component Analysis, retaining the 1st principal component, on 8 variables: 1) % of males in management and professional occupations, 2) % of crowded housing, 3) % of households in poverty, 4) % of female headed households with dependents, 5) percent of households on public assistance 6) % of households earning <$30,000 per year 7) % earning less than a high school education 8) % unemployed

Standardizing the index to have a mean of 0 and standard deviation (SD) of 1 by dividing the index by the square of the eigenvalue.

I am currently using the prcomp() function to perform the Principal Component Analysis. I am aware that I can obtain the eigenvalues by squaring the $sdev object from the prcomp() function.

In order to follow along with this last step. Should I be manually calculating the correct linear combination to put my census data using this formula?

pca_2000 = prcomp(census_2000_vars,rank.=1,center=F,scale=F)

eigenvalues = pca_2000$sdev^2

loadings = pca_2000$rotation[1:8]

lin_comb = loadings/(eigenvalues^2)

r

pca

census

tidycensus

0 Answers

Your Answer

Accepted video resources