[R] Multiple Correspondence Analysis
Hi R-helpers, I am using 'mjca' in the package 'ca' to perform multiple correspondence analysis. However the number of factor variables is large (n = 35) and CA_actRem$nd.max[1] 14 How do I interpret the results? what is the best way to identify the similar factors and levels as the plot is not clear? -- Regards, Abhinaba Roy [[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.
Re: [R] Multiple Correspondence Analysis
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.
[R] 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 *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 A.1 A.2 A.3_1 A.3_2 A.3_3 A.3_4 A.3_5 A.3_6 A.3_7 A.3_8 A.3_9 A.3_10 A.3_11 A.3_12 A.4 A.4_1.1 A.4_1.2 A.4_1.3 A.4_1.4 A.4_1.5 A.4_1.6 A.4_1.7 A.4_1.8 A.4_2.1_1 A.4_2.1_2 A.4_2.1_3 A.4_2.2_1 A.4_2.2_2 A.4_2.2_3 A.5_1 A.5_2 A.5_3 A.5_4 A.5_5 A.5_6 A.5_7 A.5_8 A.5_9 A.5_10 A.5_11 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Burt table that includes rows and columns totals and further more how to create Burt table of relative frequencies and conditional relative frequencies. Hope to hear from some of you soon! Ana [[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.
[R] Multiple Correspondence Analysis
Is there a way to get the coordinates from a plot of an MCA object? [[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.
Re: [R] Multiple Correspondence Analysis
Dear Bill, See http://finzi.psych.upenn.edu/R/library/ade4/html/dudi.acm.html HTH, Jorge On Fri, Sep 5, 2008 at 5:00 PM, Bill Vorias [EMAIL PROTECTED]wrote: Is there a way to get the coordinates from a plot of an MCA object? [[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. [[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.
[R] Multiple correspondence analysis
Hi R-people, I try using mca (multiple correspondence analysis) in evocation data (data base feminino2.csv attach in this mail). Well in this database have 4 evocations for each 120 persons. If I use this script: base-read.csv(feminino2.csv) require(MASS) plot(mca(base,abbrev=T),rows = F) Work, but result in a ugly plot, so I try extract levels with low frequency: niveis-unique(c(levels(base$p1),levels(base$p2),levels(base $p3),levels(base$p4))) v-table(factor(base$p1,levels=niveis))+ table(factor(base $p2,levels=niveis))+table(factor(base$p3,levels=niveis))+ n2-niveis[v=5] #where 5 is cutoff frequency evoc.df-data.frame(factor(base$p1,levels=n2),factor(base $p2,levels=n2),factor(base$p3,levels=n2),factor(base$p4,levels=n2)) names(evoc.df)-c(p1,p2,p3,p4) plot(mca(evoc.df,abbrev=T),rows = F) Don't work and result in a error: Error in svd(X) : infinite or missing values in 'x' Where I worng? Anybody help me? Thanks in advance -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil __ 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.