Skip to content
Prev 268999 / 398502 Next

How to use PC1 of PCA and dim1 of MCA as a predictor in logistic regression model for data reduction

Dear Mark,

Thank you very much for your mail. This is what I really wanted!
I tried dudi.mix in ade4 package.

 > ade4plaque.df <- x18.df[c("age", "sex", "symptom", "HT", "DM", "IHD", 
"smoking", "DL", "Statin")]

 > head(ade4plaque.df)
   age sex      symptom       HT       DM      IHD  smoking 
hyperlipidemia   Statin
1  62   M asymptomatic positive negative negative positive 
positive positive
2  82   M  symptomatic positive negative negative negative 
positive positive
3  64   M asymptomatic negative positive negative negative 
positive positive
4  55   M  symptomatic positive positive positive negative 
positive positive
5  67   M  symptomatic positive negative negative negative 
negative positive
6  79   M asymptomatic positive positive negative negative 
positive positive

 > x18.dudi.mix <- dudi.mix(ade4plaque.df)
 > x18.dudi.mix$eig
[1] 1.7750557 1.4504641 1.2178640 1.0344946 0.8496640 0.8248379 
0.7011151 0.6367328 0.5097718
 > x18.dudi.mix$eig[1:9]/sum(x18.dudi.mix$eig)
[1] 0.19722841 0.16116268 0.13531822 0.11494385 0.09440711 0.09164866 
0.07790168 0.07074809 0.05664131

Still first component explained only 19.8% of the variances, right?

Then, I investigated values of dudi.mix corresponding to PC1 of PCA. 
Help file say;
l1	 principal components, data frame with n rows and nf columns
li	 row coordinates, data frame with n rows and nf columns

So, I guess I should use x18.dudi.mix$l1[, 1].
Am I right?

Or should I use multiple correpondence analysis because the first plane 
explained 43% of the variance?

Thank you for your help in advance.

Kohkichi
(11/08/18 18:33), Mark Difford wrote: