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

khosoda at med.kobe-u.ac.jp khosoda at med.kobe-u.ac.jp
Thu Aug 18 18:28:01 CEST 2011


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:
> On Aug 17, 2011 khosoda wrote:
>
>> 1. Is it O.K. to perform PCA for data consisting of 1 continuous
>> variable and 8 binary variables?
>> 2. Is it O.K to perform transformation of age from continuous variable
>> to factor variable for MCA?
>> 3. Is "mjca1$rowcoord[, 1]" the correct values as a predictor of
>> logistic regression model like PC1 of PCA?
>
> Hi Kohkichi,
>
> If you want to do this, i.e. PCA-type analysis with different
> variable-types, then look at dudi.mix() in package ade4 and homals() in
> package homals.
>
> Regards, Mark.
>
> -----
> Mark Difford (Ph.D.)
> Research Associate
> Botany Department
> Nelson Mandela Metropolitan University
> Port Elizabeth, South Africa
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-use-PC1-of-PCA-and-dim1-of-MCA-as-a-predictor-in-logistic-regression-model-for-data-reduction-tp3750251p3752168.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


-- 
*************************************************
 神戸大学大学院医学研究科 脳神経外科学分野
 細田 弘吉
 
 〒650-0017 神戸市中央区楠町7丁目5-1
     Phone: 078-382-5966
     Fax  : 078-382-5979
     E-mail address
         Office: khosoda at med.kobe-u.ac.jp
	Home  : khosoda at venus.dti.ne.jp



More information about the R-help mailing list