You should send this to r-h...@stat.math.ethz.ch.

On 03/09/2012 09:21 AM, Andrea Sica wrote:
> 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
> /spain.mca/
> /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 data-set
> Thank you
>
> Best


-- 
Kevin E. Thorpe
Biostatistician/Trialist,  Applied Health Research Centre (AHRC)
Li Ka Shing Knowledge Institute of St. Michael's
Assistant Professor, Dalla Lana School of Public Health
University of Toronto
email: kevin.tho...@utoronto.ca  Tel: 416.864.5776  Fax: 416.864.3016


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to