on-internet
← Community

How can I use my principal component 1 (from PCA) as an axis in a hierchical regression analysis?

Stack Overflow ·

I am looking to use my PC1 from a PCA in a hierarchical regression analysis to account for additional variation in R. Is this possible? I ran my PCA with the code below in R: pca<- prcomp(my.data[,c(57:62)], center = TRUE,scale. = TRUE) summary(pca) str(pca) fviz_eig(pca) fviz_pca_ind(pca, col.ind = "cos2", # Color by the quality of representation gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"), repel = TRUE # Avoid text overlapping ) ggbiplot(pca) print(pca) #some results! Rotation (n x k) = (4 x 4): PC1 PC2 PC3 EC 0.5389823 -0.4785188 0.0003197419 temp 0.4787782 0.3590390 0.7913858440 pH

Comments

Sign in or sign up to comment and upvote.

No comments yet.