Re: Récapitulatif destiné à factominer-users@googlegroups.com - 1 mise à jour dans 1 sujet

14 views
Skip to first unread message

Kris Lockyear

unread,
Mar 7, 2021, 5:34:47 AM3/7/21
to factomin...@googlegroups.com
PCA(test[,-c(3)],quali.sup=4)


From: factomin...@googlegroups.com <factomin...@googlegroups.com>
Sent: 07 March 2021 10:10
To: Destinataires du récapitulatif <factomin...@googlegroups.com>
Subject: Récapitulatif destiné à factomin...@googlegroups.com - 1 mise à jour dans 1 sujet
 
Mahmood Naderan <mahmo...@gmail.com>: Mar 07 10:14AM +0100

Hi again,
Still the previous problems exist. When I use quali.sup, I am not able to
specify which columns to be used in pca. May I know how to fix that?
 
 
> library(FactoMineR)
> mydata <- read.csv('test.csv', header=T,row.names=1)
> mydata
V1 V2 V3 V4 CTG
P1 73.6 0.7 74.6 3.1 A1
P2 75.2 0.7 75.8 2.8 B1
P3 6.5 0.0 7.3 2.5 B1
P4 41.4 0.3 39.2 8.9 C1
P5 5.4 0.1 18.2 1.1 A1
P6 18.8 0.3 30.3 7.3 C1
> res.pca <- PCA(mydata[,c(1,2,4)])
> res.pca <- PCA(mydata[,c(1,2,4)],quali.sup=5)
Error in `[.data.frame`(Xtot, , quali.sup, drop = FALSE) :
undefined columns selected
 
 
Regards,
Mahmood
 
 
 
 
On Mon, Feb 22, 2021 at 11:13 PM Mahmood Naderan <mahmo...@gmail.com>
wrote:
 
Ce résumé vous a été envoyé, car vous êtes abonné aux actualités de ce groupe. Vous pouvez modifier vos paramètres sur la page d'abonnement au groupe.
Pour vous désinscrire de ce groupe et ne plus recevoir de messages, envoyez un e-mail à l'adresse factominer-use...@googlegroups.com.

Mahmood Naderan

unread,
Mar 7, 2021, 5:40:25 AM3/7/21
to factomin...@googlegroups.com
Hi Kris,
Yes that works. However, I wonder why the quali.sup index is now 4 and not 5.


Regards,
Mahmood





--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "FactoMineR users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse factominer-use...@googlegroups.com.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/factominer-users/DBAP195MB100427600938AE1B12B7AC09D9949%40DBAP195MB1004.EURP195.PROD.OUTLOOK.COM.

Kris Lockyear

unread,
Mar 15, 2021, 6:14:53 AM3/15/21
to factomin...@googlegroups.com
As I understand it, PCA + supp  is a PCA (of quantitative variables) to which the supplementary variable(s) are compared.

FAMD is undertaking an analysis of both types.  In other words, in PCA + supp, the supplementary variables are NOT contributing to the results, in FAMD all the included variables are contributing.

K.

To: Destinataires du récapitulatif <factomin...@googlegroups.com>
Subject: Récapitulatif destiné à factomin...@googlegroups.com - 1 mise à jour dans 1 sujet
Mahmood Naderan <mahmo...@gmail.com>: Mar 14 06:36PM +0100

Hi,
I would like to know what is the difference between FAMD and PCA+quali.sup?
As I see the manual [1], it says that FAMD is between PCA and MCA which
deals with both qualitative and quantitative variables. On the other hand,
with PCA() it is also possible to pass quali.sup to the function. I use
that with one qualitative variable column and it puts the categories as the
center of mass for the individuals.
 
So, I would like to know what problem can FAMD solve that PCA+quali.sup
isn't capable of?
 
[1]
http://www.sthda.com/english/articles/31-principal-component-methods-in-r-practical-guide/115-famd-factor-analysis-of-mixed-data-in-r-essentials/
 
Regards,
Mahmood

Mahmood Naderan

unread,
Mar 17, 2021, 5:24:45 AM3/17/21
to factomin...@googlegroups.com
Thanks kris. That was a good hint.

Regards,
Mahmood





--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "FactoMineR users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse factominer-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages