Applying Benzecrì correction with FactoMiner

163 views Asked by At

I have a dataset like the one below (with qualitative variable) and I need to apply Benzecrì correction on the dataframe that i will use for the MCA or on the function res.mca,

gender Income
Male from 10-15
Female from 15-20

Ecc...

This is the function I'm using for MCA

res.mca <- MCA(df, ncp = 5, graph = TRUE, method = "Burt")

I think I probably need to apply a function or something, can someone help?

1

There are 1 answers

0
VincentP On

This should work

mca <- MCA(mydata)
#Benzecri correction
p <- nrow(mca$eig)+1
lambda <- mca$eig[,1]
lambdaC <- lambda
lambdaT <- which(lambda>=1/p)

#eig.val corrected
lambdaC=(p/(p-1))*(lambdaC[lambdaT]-(1/p))^2

#percentage of variances explained per axes
ptd <- (lambdaC/sum(lambdaC))

#cumulated percentage of explained variance
cum <- cumsum(lambdaC/sum(lambdaC))
correc <- cbind(lambdaC,ptd,cum*100)
correc = as.data.frame(correc)
correc

or use

mca.eigen.fix()

from

https://search.r-project.org/CRAN/refmans/ExPosition/html/mca.eigen.fix.html