i try to find the solution - Specify the values of the factors (any of the 3) obtained from the group of variables Q79 for the fifth respondent, provided that the factors were obtained in the R script by the method of the main factors, the rotation procedure (varimax) was performed, the procedure for calculating factor points is regression, the number of factors is 3.
the data is in Excel file and inside it looks so - for example the table
| q79_1 | q79_2 | q79_3 | q79_4 | q79_5 | q79_6 |
|---|---|---|---|---|---|
| 2 | 3 | 5 | 5 | 4 | 1 |
| 1 | 1 | 3 | 5 | 4 | 1 |
| 2 | 2 | 5 | 4 | 2 | 3 |
i want to see the result in RapidMiner
i write smth like this - but it doesn't work correctly
rm_main = function(data)
{
library(psych)
library(readxl)
data <- read_excel("C:/Users/L2.xls")
data1 <- data[, 1:38]
fa <- fa(data1, nfactors = 3, rotate = "varimax", scores = "regression")
factor_scores <- predict(fa, data1)
loadings <- fa$loadings
factors <- factor_scores[5,]
result <- loadings %*% factors
print(result)
}