Multiple Correspondence Analysis

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Multiple Correspondence Analysis

Hello everybody, I'm looking for someone who is able with MCA and would
like to gives some help.

If what I'm doing is not wrong, according to the purpose I have, I need to
understand how to create a dependence matrix, where I can analyze the
dependence between all my variables.
Till now this is what I was able to do:

*p <- length(spain)* #this is the number of the variables (91)

*chisquare <- matrix(spain, nrow=(p-1), ncol=p)* #it creates a
squared-matrix with all the variables (if I'm not already wrong)

*for(i in (1:(p-1))){*
*chisquare[i, (1:(p-1))] <- chisq.test(spain[,i], spain[, i+1])$statistic*
*chisquare[i, p] <- chisq.test(spain[,i], spain[, i+1])$p.value*
*} *#it should have related the "p" variables to analyze whether in pairs
they are dependents, but it seems like it just related two of them and
repeated the relations for all the number of columns (since it gives the
same values in each cell by row)

*chisquare* #all the cells have the same values by row

Anyway, I think is also the way I'm proceeding which is wrong, since I want
to relate all the variables in pairs thus to be able to calculate the
dependence between all of them. That's why I am going for a dependence
matrix. Where am I wrong?

After that I can proceed with the MCA. Of course, I would also
need help there.

I used the following codes to do it:

*spain.mca <- mjca(spain) *#it makes the mca for all the data
*plot(spain.mca)* #it shows the plot

But the plot was overcrowded. Anyway, I must first complete the first step,
this was just to make some practice on it.

As you can see, until now I didn't succeed.

I hope someone will be so gentle to give it a try. Attached you are the
Thank you


[hidden email] mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.

dati.txt (10K) Download Attachment