Questions tagged [factominer]

29 questions
0
votes
0 answers

How can I correctly plot my qualitative variables in FAMD analysis using FactoMineR?

community! I'm trying to run FAMD on a morphology-based dataset with 25 qualitative variables recording the presence and absence of fluorescence on a body part (binary) and six quantitative variables. Furthermore, I have a few supplementary…
0
votes
1 answer

How do you filter out individuals on a figure after creating a PCA plot in Factoextra?

I am a research student coming to grips with R for the first time. I am trying to make a PCA plot from a series of body measurements, the specimens names and a subspecies tag (BIN) are in sperate columns. The BIN column contains the BIN ID for each…
0
votes
1 answer

Adding group information to 3d plot in FactoMineR

My code this is what Im running library(FactoMineR); library(factoextra) res.pca <- PCA(t(data),ncp = 10, graph = FALSE) res.hcpc <- HCPC(res.pca, graph = FALSE) fviz_dend(res.hcpc, cex = 0.7, # Label size …
PesKchan
  • 868
  • 6
  • 14
0
votes
1 answer

using ggplotly on a factoextra object

Consider following code: library(FactoMineR) library(dplyr) library(factoextra) library(plotly) pca1<-PCA(iris[,1:4]) fpi<-fviz_pca_ind(pca1,habillage = iris$Species) fpi Now when execute following code, the groups repeat twice…
Masoud
  • 535
  • 3
  • 19
0
votes
1 answer

apply the weight data to the MCA function

I have a data set of 25 qualitative variables and the 26th variable corresponds to the weight assigned to each individual. I used the MCA function from the FactoMiner package, and to take into account the weighting I added the option row.w. here is…
0
votes
0 answers

R- How do I edit this code properly to run MFA and graph it?

Does anyone know how to properly edit this MFA code res.mfa <- MFA(DF1, group=c(3,4,5,6,7,8,9), type=c("n",rep("s",5)), ncp=5, name.group=c("RPE","RPC","Chla","CX","N","C","SGR"), num.group.sup=c(2), graph=FALSE) Error in if ((type[i] == "n") &&…
0
votes
1 answer

Using weight column in PCA analysis with R

I have a column in my data file which corresponds to weight of individuals. The data looks like > library(FactoMineR) > mydata <- read.csv('test.csv', header=T,row.names=1) > mydata V1 V2 V3 WG P1.K1 218 30 10 1.00 P2.K1 218 23 15 0.10 …
mahmood
  • 23,197
  • 49
  • 147
  • 242
0
votes
1 answer

HCPC in FactomineR: How to count individuals in Clusters?

the title says it all. I performed a multiple correspondence analysis (MCA) in FactomineR with factoshiny and did an HPCP afterwards. I now have 3 clusters on my 2 dimensions. While the factoshiny interface really helps visualize and navigate the…
Elena
  • 45
  • 5
0
votes
0 answers

How can I make the greedy.wilks function from klaR work on a post-HCPC data frame?

So basically I'm using klaR to perform a greedy.wilks on a data frame that I obtained through the HCPC function from factomineR. Here is my starting data frame (I'm only interested in 1 to 15 variables here) : > alim[,1:15] # A tibble: 101 x 15 …
Arthur M
  • 1
  • 1
0
votes
1 answer

Why the CA function in FactorMineR tells me that undefined columns are selected?

I'm using a dataframe named DataUniv composed of 13 variables. When I try to run a correspondance analysis using FactoMineR : dataUniv.CA = CA(dataUniv[,2:7], col.sup=c(1,8:13)) It sends me back this error : Error in…
GaëtanLF
  • 101
  • 10
0
votes
1 answer

Hierarchical clustering for centers of kmeans in R

I have a huge data set (200,000 rows * 40 columns) where each row represents an observation and each column is a variable. For this data, I would like to do hierarchical clustering. Unfortunately, as the number of rows is huge, then it is impossible…
0
votes
0 answers

Changing Text Label Color for MCA in R

I am working in rStudio to plot some MCA graphs. I have been using this code: data_2 <- read.csv("https://github.com/treselle-systems/customer_churn_analysis/blob/master/WA_Fn-UseC_-Telco-Customer-Churn.csv") mca.base <- MCA(as.matrix(data_2),…
A. Shotts
  • 1
  • 1
0
votes
1 answer

How many principal components does MCA outputs in R using FactorMineR library?

I'm not sure about the output of the MCA() function in the FactoMineR library in R. For example I want 10 components, so I'm running the following code: X1 <- MCA(data, ncp = 10) Does ncp (which stands for number of dimensions) give me 10…
HP_17
  • 203
  • 1
  • 4
  • 10
0
votes
1 answer

Add circles to group individuals with a second factor on a Biplot using fviz_pca

thanks for reading me. Im new with R so im lost on: how can i add group circles defined by a second factor on a biplot made with fviz_pca? I have this Table and want to apply a PCA to obtain a biplot where individuals are classified (colored) by the…
1
2