Re: [R] Three way correspondence analyses?
Your code runs without errors so there is no issue with R. The function you are using is for [Partial] [Constrained] Correspondence Analysis. You have not defined 3-way correspondence analysis, but my understanding is that it involves correspondence analysis of a 3-way crosstabulation array. Your examples include 2 constrained correspondence analyses and one partial constrained correspondence analysis. You should try contacting someone with more experience in correspondence analysis who can help you identify the question you are attempting to answer. - David L Carlson Department of Anthropology Texas A University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Suparna Mitra Sent: Friday, August 5, 2016 4:01 AM To: Michael Friendly Cc: R help Subject: Re: [R] Three way correspondence analyses? Sorry somehow the mail was buried in my spam folder and I was waiting for any reply. Now when I searched specifically then found in spam. Sorry about this. This is my data format. I have three data matrix. Samples are matched > dput(Cytok_and_ProInf) structure(list(IFN._ = c(3.412082432, 3.052252998, 5.142508722, 12.70932318, 1.861206813, 0.993497776, 0.836846636, 4.125564372, 1.385344616, 1.292459442, 0.11649863, 0.150193815, 27.86121845, 1.725385265, 1.715598671, 0.017175222, 1e-06, 1e-06, 6.668275976, 0.790970336, 4.03583889, 0.971457745, 1.059011154, 0.637639199, 0.48875513, 0.301263118, 0.272641165, 0.343154282, 1e-06, 1e-06, 1.282052844, 1.080656696, 1.302848316, 6.22346499, 0.329317838, 1e-06, 0.437037978, 0.287027959, 0.960397988, 0.098872923, 1.06984553, 0.836846636, 1.302848316, 0.904683816), IL.10 = c(0.115021123, 0.150136084, 0.205984417, 0.16364998, 0.099053965, 0.152406978, 0.107718618, 0.180196098, 0.073236511, 0.101546531, 0.233120615, 0.097802351, 0.67071499, 0.159174453, 0.226924759, 0.042082686, 1e-06, 1e-06, 0.242345366, 0.250478861, 0.170311925, 0.079862061, 0.083777663, 0.062337816, 0.026139707, 0.088935013, 0.158051134, 0.178010445, 0.19103657, 0.178010445, 0.186717539, 0.066471894, 0.263570447, 0.403324556, 1e-06, 0.15467023, 0.096547094, 0.131672017, 0.085073597, 0.1877994, 0.182375762, 0.115021123, 0.117431784, 0.158051134), IL.12p70 = c(0.070763998, 0.090748695, 0.208540497, 1e-06, 0.100363261, 1e-06, 0.049381659, 0.278572877, 0.359093222, 0.236327042, 1e-06, 1e-06, 1.730678237, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 0.228467277, 0.355528037, 0.150149937, 1e-06, 0.100363261, 1e-06, 1e-06, 0.351954745, 0.236327042, 0.167289445, 1e-06, 0.297291961, 0.208540497, 1e-06, 1e-06, 0.240234706, 0.025530181, 0.114409102, 1e-06, 1e-06, 0.031847909, 0.228467277, 1e-06, 0.212559242, 0.30100342), IL.13 = c(1.704419932, 1.112298247, 2.285765956, 4.633806398, 0.642126976, 0.746932456, 0.363434771, 2.340450899, 2.074555897, 1.244106163, 1e-06, 1.820132354, 74.41151063, 2.034099156, 20.68036347, 1e-06, 1e-06, 4.101483243, 0.794749267, 1e-06, 2.805396078, 1.077152785, 1.179818983, 1.581359427, 1.077152785, 1.529718601, 1e-06, 1e-06, 0.58364863, 1e-06, 1.421542399, 0.965068178, 2.836027955, 5.571883643, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1.449249978, 1.146494964, 1e-06, 1e-06), IL.1_ = c(1e-06, 2.307704109, 25.26088067, 572.801725, 0.510013312, 0.362017284, 0.031608863, 3.870488003, 0.01290693, 1.838427599, 7.097086101, 3.272835372, 10406.43981, 1e-06, 81.64973722, 1.070281402, 9.682079245, 10.80856769, 167.0831603, 0.397080631, 128.7969178, 0.995448576, 14.26930517, 0.69205361, 2.304314695, 0.579468482, 1e-06, 1.304363973, 3.759936213, 0.589889298, 0.299325951, 0.291769643, 15.20223699, 271.2112448, 17.88589268, 0.377847524, 0.142551711, 2.042925614, 17.63920898, 0.954063427, 0.841909578, 0.791637687, 2.719932082, 0.612547139), IL.2 = c(0.310017477, 0.639550623, 0.364921535, 0.90788638, 1e-06, 1e-06, 1e-06, 0.479461553, 0.153405415, 0.456098215, 0.659233077, 0.019421531, 2.581092035, 0.60647104, 0.374719897, 0.198939483, 1e-06, 1e-06, 0.420590306, 0.637356204, 0.650500136, 0.187772403, 0.234414214, 0.135640615, 0.167896217, 0.043668, 0.543715428, 0.491057054, 0.104904788, 0.268833496, 0.394164323, 0.153405415, 0.511791782, 1.40318585, 0.162131403, 0.386895823, 0.207232191, 0.234414214, 0.129616074, 0.465471829, 0.411020666, 0.374719897, 0.302383698, 0.266218696 ), IL.4 = c(1e-06, 0.061134995, 0.033725716, 0.176628741, 0.036390669, 0.016385835, 0.02963346, 0.0912511, 0.044136184, 0.007841464, 1e-06, 1e-06, 0.555602008, 0.201038117, 1e-06, 0.016385835, 1e-06, 1e-06, 0.05520647, 0.014779363, 0.0453956, 0.019496483, 0.066933632, 1e-06, 1e-06, 1e-06, 0.040306406, 0.077093341, 1e-06, 0.02963346, 0.042868427, 0.088031622, 0.041591965, 0.039011321, 1e-06, 0.013131473, 1e-06, 1e-06, 1e-06, 1e-06, 0.009676617, 0.023961259, 1e-06, 0.025405987), IL.6 = c(0.132069931, 0.205121881, 0.266403938, 0.357044807, 0.175675816, 0.135299256, 0.160466529, 0.801623905, 0.219429811, 0.178675804, 1e
Re: [R] Three way correspondence analyses?
Sorry somehow the mail was buried in my spam folder and I was waiting for any reply. Now when I searched specifically then found in spam. Sorry about this. This is my data format. I have three data matrix. Samples are matched > dput(Cytok_and_ProInf) structure(list(IFN._ = c(3.412082432, 3.052252998, 5.142508722, 12.70932318, 1.861206813, 0.993497776, 0.836846636, 4.125564372, 1.385344616, 1.292459442, 0.11649863, 0.150193815, 27.86121845, 1.725385265, 1.715598671, 0.017175222, 1e-06, 1e-06, 6.668275976, 0.790970336, 4.03583889, 0.971457745, 1.059011154, 0.637639199, 0.48875513, 0.301263118, 0.272641165, 0.343154282, 1e-06, 1e-06, 1.282052844, 1.080656696, 1.302848316, 6.22346499, 0.329317838, 1e-06, 0.437037978, 0.287027959, 0.960397988, 0.098872923, 1.06984553, 0.836846636, 1.302848316, 0.904683816), IL.10 = c(0.115021123, 0.150136084, 0.205984417, 0.16364998, 0.099053965, 0.152406978, 0.107718618, 0.180196098, 0.073236511, 0.101546531, 0.233120615, 0.097802351, 0.67071499, 0.159174453, 0.226924759, 0.042082686, 1e-06, 1e-06, 0.242345366, 0.250478861, 0.170311925, 0.079862061, 0.083777663, 0.062337816, 0.026139707, 0.088935013, 0.158051134, 0.178010445, 0.19103657, 0.178010445, 0.186717539, 0.066471894, 0.263570447, 0.403324556, 1e-06, 0.15467023, 0.096547094, 0.131672017, 0.085073597, 0.1877994, 0.182375762, 0.115021123, 0.117431784, 0.158051134), IL.12p70 = c(0.070763998, 0.090748695, 0.208540497, 1e-06, 0.100363261, 1e-06, 0.049381659, 0.278572877, 0.359093222, 0.236327042, 1e-06, 1e-06, 1.730678237, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 0.228467277, 0.355528037, 0.150149937, 1e-06, 0.100363261, 1e-06, 1e-06, 0.351954745, 0.236327042, 0.167289445, 1e-06, 0.297291961, 0.208540497, 1e-06, 1e-06, 0.240234706, 0.025530181, 0.114409102, 1e-06, 1e-06, 0.031847909, 0.228467277, 1e-06, 0.212559242, 0.30100342), IL.13 = c(1.704419932, 1.112298247, 2.285765956, 4.633806398, 0.642126976, 0.746932456, 0.363434771, 2.340450899, 2.074555897, 1.244106163, 1e-06, 1.820132354, 74.41151063, 2.034099156, 20.68036347, 1e-06, 1e-06, 4.101483243, 0.794749267, 1e-06, 2.805396078, 1.077152785, 1.179818983, 1.581359427, 1.077152785, 1.529718601, 1e-06, 1e-06, 0.58364863, 1e-06, 1.421542399, 0.965068178, 2.836027955, 5.571883643, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1.449249978, 1.146494964, 1e-06, 1e-06), IL.1_ = c(1e-06, 2.307704109, 25.26088067, 572.801725, 0.510013312, 0.362017284, 0.031608863, 3.870488003, 0.01290693, 1.838427599, 7.097086101, 3.272835372, 10406.43981, 1e-06, 81.64973722, 1.070281402, 9.682079245, 10.80856769, 167.0831603, 0.397080631, 128.7969178, 0.995448576, 14.26930517, 0.69205361, 2.304314695, 0.579468482, 1e-06, 1.304363973, 3.759936213, 0.589889298, 0.299325951, 0.291769643, 15.20223699, 271.2112448, 17.88589268, 0.377847524, 0.142551711, 2.042925614, 17.63920898, 0.954063427, 0.841909578, 0.791637687, 2.719932082, 0.612547139), IL.2 = c(0.310017477, 0.639550623, 0.364921535, 0.90788638, 1e-06, 1e-06, 1e-06, 0.479461553, 0.153405415, 0.456098215, 0.659233077, 0.019421531, 2.581092035, 0.60647104, 0.374719897, 0.198939483, 1e-06, 1e-06, 0.420590306, 0.637356204, 0.650500136, 0.187772403, 0.234414214, 0.135640615, 0.167896217, 0.043668, 0.543715428, 0.491057054, 0.104904788, 0.268833496, 0.394164323, 0.153405415, 0.511791782, 1.40318585, 0.162131403, 0.386895823, 0.207232191, 0.234414214, 0.129616074, 0.465471829, 0.411020666, 0.374719897, 0.302383698, 0.266218696 ), IL.4 = c(1e-06, 0.061134995, 0.033725716, 0.176628741, 0.036390669, 0.016385835, 0.02963346, 0.0912511, 0.044136184, 0.007841464, 1e-06, 1e-06, 0.555602008, 0.201038117, 1e-06, 0.016385835, 1e-06, 1e-06, 0.05520647, 0.014779363, 0.0453956, 0.019496483, 0.066933632, 1e-06, 1e-06, 1e-06, 0.040306406, 0.077093341, 1e-06, 0.02963346, 0.042868427, 0.088031622, 0.041591965, 0.039011321, 1e-06, 0.013131473, 1e-06, 1e-06, 1e-06, 1e-06, 0.009676617, 0.023961259, 1e-06, 0.025405987), IL.6 = c(0.132069931, 0.205121881, 0.266403938, 0.357044807, 0.175675816, 0.135299256, 0.160466529, 0.801623905, 0.219429811, 0.178675804, 1e-06, 1e-06, 1.946693297, 0.00336273, 0.260996547, 1e-06, 1e-06, 1e-06, 0.101959817, 0.148023004, 0.522793842, 0.166593645, 0.098477711, 0.122253955, 0.184636758, 0.076829582, 1e-06, 1e-06, 1e-06, 0.065400292, 0.144869779, 0.151158758, 0.175675816, 1.136760714, 0.031581939, 0.049271129, 1e-06, 0.036206361, 1e-06, 1e-06, 0.154277589, 0.163537592, 0.101959817, 0.166593645), IL.8 = c(0.263813623, 0.176968743, 21.45511221, 41.02244667, 0.325779267, 0.19875696, 0.191549828, 5.874233467, 0.162143262, 0.254734152, 0.424914919, 0.83134713, 615.7282871, 0.222420019, 11.71507301, 0.254734152, 0.48778161, 0.459603466, 9.245098493, 0.937998793, 158.7036736, 1.052601593, 7.398795984, 0.517616924, 0.842129973, 0.049980916, 0.091283798, 0.703339445, 0.353738394, 0.12114101, 0.189135463, 0.272831114, 2.577264558, 1e-06, 6.92155151, 0.099598586, 0.126403393, 0.519593589, 2.999681278, 0.279555285, 4.425047545, 0.203532755, 0.829547294,
Re: [R] Three way correspondence analyses?
You haven't supplied any data, and we can only guess which cca() function you are using (ade4::cca, ..., vegan::cca(), yacca::cca), and the term 'cca' generally refers to canonical correspondence analysis, which is not quite the same thing as 'three-way correspondence analysis'. For three-way tables, there are several variations of standard correspondence analysis that generalize CA for two-way tables in reasonable, but different ways. You may find more joy using the mjca() in the ca package which provides these alternatives. best, -Michael On 8/2/2016 3:58 PM, Suparna Mitra wrote: Hello R experts, have some data for microbiome, metabolome and cytokine from the same sample. Now I want to do a three-way correspondence analyses. From three normalised data I was trying, #Now CCA with two data it works good like: Metab.Cytok.Microb.cca <- cca(normMicrobiome_NEC,normCytok_and_ProInf) plot(Metab.Cytok.Microb.cca ) Metab.Cytok.Microb.cca <- cca(normMicrobiome_NEC,normMetab_NEC) plot(Metab.Cytok.Microb.cca ) But when I tried with three Metab.Cytok.Microb.cca <- cca(normMicrobiome_NEC,normMetab_NEC,normCytok_and_ProInf) plot(Metab.Cytok.Microb.cca ) But this is not displaying all three variables. Sorry, I am very new in this. Can anybody please help me? Thanks a lot, Mitra [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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] Three way correspondence analyses?
There are at least two canonical correspondence analysis functions named cca() in different R packages so we don't have enough information to begin. The posting guide encourages providing a reproducible example using dput() to provide enough data so that we can run your code. If we don't know anything about your data and cannot run your code, we cannot do more than guess. - David L Carlson Department of Anthropology Texas A University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Suparna Mitra Sent: Tuesday, August 2, 2016 2:58 PM To: R help Subject: [R] Three way correspondence analyses? Hello R experts, have some data for microbiome, metabolome and cytokine from the same sample. Now I want to do a three-way correspondence analyses. From three normalised data I was trying, #Now CCA with two data it works good like: Metab.Cytok.Microb.cca <- cca(normMicrobiome_NEC,normCytok_and_ProInf) plot(Metab.Cytok.Microb.cca ) Metab.Cytok.Microb.cca <- cca(normMicrobiome_NEC,normMetab_NEC) plot(Metab.Cytok.Microb.cca ) But when I tried with three Metab.Cytok.Microb.cca <- cca(normMicrobiome_NEC,normMetab_NEC,normCytok_and_ProInf) plot(Metab.Cytok.Microb.cca ) But this is not displaying all three variables. Sorry, I am very new in this. Can anybody please help me? Thanks a lot, Mitra [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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] Three way correspondence analyses?
Hello R experts, have some data for microbiome, metabolome and cytokine from the same sample. Now I want to do a three-way correspondence analyses. From three normalised data I was trying, #Now CCA with two data it works good like: Metab.Cytok.Microb.cca <- cca(normMicrobiome_NEC,normCytok_and_ProInf) plot(Metab.Cytok.Microb.cca ) Metab.Cytok.Microb.cca <- cca(normMicrobiome_NEC,normMetab_NEC) plot(Metab.Cytok.Microb.cca ) But when I tried with three Metab.Cytok.Microb.cca <- cca(normMicrobiome_NEC,normMetab_NEC,normCytok_and_ProInf) plot(Metab.Cytok.Microb.cca ) But this is not displaying all three variables. Sorry, I am very new in this. Can anybody please help me? Thanks a lot, Mitra [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.