-5

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

1 Answers1

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