Running FAMD example

13 views
Skip to first unread message

Mahmood Naderan

unread,
Mar 17, 2021, 7:38:31 AM3/17/21
to factomin...@googlegroups.com
Hi
I read the famd method described at http://www.sthda.com/english/articles/31-principal-component-methods-in-r-practical-guide/115-famd-factor-analysis-of-mixed-data-in-r-essentials/ however, when I try to run the following commands, I am not able to get the coordinates of the categorical variables (Label and Soil).

> head(df)
          Label      Soil Plante Acidity Harmony Intensity Overall.quality
2EL      Saumur      Env1  2.000   2.107   3.143     2.857           3.393
1CHA     Saumur      Env1  2.000   2.107   2.964     2.893           3.214
1FON Bourgueuil      Env1  1.750   2.179   3.143     3.074           3.536
1VAU     Chinon      Env2  2.304   3.179   2.038     2.462           2.464
1DAM     Saumur Reference  1.762   2.571   3.643     3.643           3.741
2BOU Bourgueuil Reference  1.750   2.393   3.500     3.464           3.643
     Typical
2EL    3.250
1CHA   3.036
1FON   3.179
1VAU   2.250
1DAM   3.444
2BOU   3.393
> res.famd <- FAMD(df, graph = FALSE)
> library("factoextra")
> var <- get_famd_var(res.famd)
> head(var$coord)
                    Dim.1       Dim.2       Dim.3       Dim.4        Dim.5
Plante          0.7344160 0.060551966 0.105902048 0.004011299 0.0010340559
Acidity         0.1732738 0.491118153 0.126394029 0.115376784 0.0045862935
Harmony         0.8943968 0.023628146 0.040124469 0.003653813 0.0086624633
Intensity       0.6991811 0.134639254 0.065382234 0.023214984 0.0064730431
Overall.quality 0.9115699 0.005246728 0.009336677 0.005445276 0.0007961880
Typical         0.7808611 0.027094327 0.001549791 0.083446627 0.0005912942


What should I use to see the coordinates of Label and Soil?

Regards,
Mahmood



Reply all
Reply to author
Forward
0 new messages