I am working on wine data with the following format:

     ID color fixed.acidity volatile.acidity citric.acid residual.sugar chlorides free.sulfur.dioxide
1 2419 white           6.6             0.56        0.22            8.9     0.034                  27
2  285   red           9.9             0.59        0.07            3.4     0.102                  32
  total.sulfur.dioxide density   pH sulphates alcohol quality
1                  133 0.99675 3.20      0.51     9.1       5
2                   71 1.00015 3.31      0.71     9.8       5

I want to do a PCA on the data but I am wondering how to deal with the binary categorical data here. I know this issue has been talked a lot of times but I'm trying to understand what is the simple way to deal with this particular data. My ultimate plan is to predict wine quality by combining local kernel method and PCA


marked as duplicate by whuber regression Mar 6 '18 at 14:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ stats.stackexchange.com/questions/5774/… $\endgroup$ – aplassard Mar 10 '15 at 0:43
  • $\begingroup$ If your categorical variables are all dichotomous/binary you may go on and do PCA for dimensionality reduction (or course, you should consider standardizing variables first, that is, to do PCA on correlations, - if not all variables are on the same scale). However, it would be improper to do classic Factor analysis (rather than PCA) on dichotomous variables. $\endgroup$ – ttnphns Mar 10 '15 at 8:35