'Compute PCA scores only using specific questions
I am running a principal component analysis and want to compute principal component scores using ONLY specific questions with a loading of 0.40 on the principal component. At the moment I compute scores using ALL the questions that load on the component.
My code is as follows:
- I estimate the number of components:
nb <- estim_ncpPCA(df, scale = TRUE)
nb
I impute missing values: comp <- imputePCA(dataset_extracted, nb = 5, scale = TRUE) comp
I run the PCA pca <- principal(comp$completeObs, nfactor = 5, rotate = "none")
I check the results of the PCA to get the scores str(pca)
I check the PCA scores: pca$scores
I copy the PCA scores to the dataset: df = cbind(df, pca$scores)
However, I want to compute the PCA scores not with all questions that load on each of the components but only with the questions that load 0,40 or higher on their components.
How do I do this?
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
