Have an ordered categorical variable with 4 levels that weve treated as a factor with 3 additional indicating variables and have concluded only one is significant and want to reassign this single significant variable to the original variable to make it a quantitative variable to perform PCA
Asked
Active
Viewed 35 times
-5
-
1Add some code. What did you try? – mechnicov Mar 24 '19 at 20:45
1 Answers
0
Suppose variable v1
with levels A, B, C, D. You noticed only B is relevant and want to use this information in a PCA (so you need numerical/quantitative variables).
You can build the variable v2 <- 1 * (v1 == 'B')
.

demarsylvain
- 2,103
- 2
- 14
- 33