I am trying to do a Canonical correspondence analysis (CCA) using the community data and chemical data. I have my family level taxonomic data as community data. In chemical data I have 18 variables: Ni Cr Cu Pb Cd Co Zn Fe As Ammonia_mean Silicate_mean Phosphate_mean Nitrite_mean Nitrate_mean Sulphate_mean pH_mean Salinity_mean D.O_mean
Obviously CCA only shows the unconstrained loadings. Can anybody please explain me how these are chosen. The reason is I see its always takes from the first columns. So if in my chemical data variables are displayed as Ni Cr Cu Pb Cd Co Zn Fe As Ammonia_mean Silicate_mean Phosphate_mean Nitrite_mean Nitrate_mean (in this order)
But if the chemical data variables are displayed as Ammonia_mean Silicate_mean Phosphate_mean Nitrite_mean Nitrate_mean Ni Cr Cu Pb Cd Co Zn Fe As (in this order)
Now the unconstrained loading changes based on which variable I keep in first columns. I should I know which one are more important? Help suggestion to this?
I am also providing my data here.
dput(Chemical.data.mean) structure(list(Ammonia_mean = c(91.2808, 38.337936, 13.69212, 58.419712, 20.994584, 17.343352, 25.558624, 15.517736), Silicate_mean = c(4733.721109, 2799.512484, 1221.605447, 712.6031777, 1934.208625, 865.3038584, 4606.470542, 916.204092), Phosphate_mean = c(256.191072, 258.859729, 325.576154, 280.208985, 301.558241, 293.55227, 242.847787, 309.564212 ), Nitrite_mean = c(92.53356407, 133.6595926, 131.3748132, 89.10639501, 142.79871, 121.0933061, 211.3420908, 166.7888933), Nitrate_mean = c(224480.5, 224092, 121617.5, 119583.5, 121188.5, 158316, 207189.5, 212209.5 ), Sulphate_mean = c(167818, 159793.5, 61225, 116131, 128932.5, 139670, 958423.5, 172161.5), pH_mean = c(7.74, 7.775, 7.915, 7.85, 7.63, 7.58, 7.57, 7.735), Salinity_mean = c(23.805, 23.35, 20.495, 20.37, 19.275, 18.55, 22.65, 22.55), D.O_mean = c(13.835, 15.46, 11.715, 13.45, 12.605, 11.995, 17.56, 18.03), Ni = c(63.76, 53.52, 78.88, 71.6, 87.8, 111.92, 82.6, 64.72), Cr = c(91.04, 88.16, 113.44, 131.88, 113.6, 103.48, 91.16, 89.24), Cu = c(46.96, 30.96, 48.16, 42.56, 34.96, 32.82, 32.77, 30.1), Pb = c(32.56, 16.12, 32.256, 16.82, 15.02, 22.04, 9.98, 11.97), Cd = c(0.164, 0.49, 1.48, 3.02, 2.48, 1.21, 0.2, 0.004), Co = c(940, 696, 1052.8, 1076.8, 983.2, 1216, 863.2, 723.6), Zn = c(1.66, 1.94, 3.69, 4.24, 2.33, 2.56, 2.21, 2), Fe = c(9.94, 14.18, 10.16, 76.16, 9.33, 11.23, 7.27, 7.3), As = c(4.02, 4, 4.36, 3.7, 6.08, 6.58, 4.98, 3.56)), .Names = c("Ammonia_mean", "Silicate_mean", "Phosphate_mean", "Nitrite_mean", "Nitrate_mean", "Sulphate_mean", "pH_mean", "Salinity_mean", "D.O_mean", "Ni", "Cr", "Cu", "Pb", "Cd", "Co", "Zn", "Fe", "As" ), class = "data.frame", row.names = c("S_1", "S_2", "SO_3", "SO_4", "SO_5", "SO_6", "SO_7", "SO_8")) dput(Taxa.family) structure(list(SO_4832_1 = c(260L, 0L, 79L, 0L, 32L, 356L, 0L, 324L, 130L, 30L, 758L, 11L, 0L, 0L, 55L, 0L, 0L, 86L, 666L, 42L, 679L, 18L, 22L, 523L, 0L, 101L, 0L, 42L, 2715L, 37L, 0L, 12L, 94L, 0L, 0L, 198L, 0L, 0L, 104L, 9L, 218L, 61L, 1068L, 1902L, 0L, 0L, 312L, 97L, 21L, 44L, 0L, 73L, 0L, 23L, 240L, 0L, 176L, 119L, 0L, 87L, 390L, 504L, 0L, 758L, 437L, 27L, 0L, 0L, 448L, 199L, 78L, 524L, 94L, 128L, 0L, 91L, 62L, 0L, 39L, 34L, 14L, 33L, 0L, 0L, 0L, 83L, 239L, 326L, 61L, 34L, 13L, 75L, 53L, 0L, 0L, 76L, 124L, 12L, 0L, 41L, 0L, 18L, 0L, 646L, 0L, 21L, 27L, 38L, 0L, 134L, 35L, 489L, 14L, 0L, 8L, 32L, 112L, 0L, 1323L, 0L, 40L, 2516L, 43L, 78L, 23L, 15L, 21L, 565L, 100L, 32L, 31L, 0L, 0L, 0L, 13L, 22L, 14L, 15L, 0L, 14L, 0L, 0L, 0L, 0L, 1473L, 67L, 33L, 0L, 11L, 0L, 0L, 0L, 0L, 33L, 0L, 371L, 0L, 17L, 0L, 0L, 54L, 8L, 35L, 0L, 39L, 20L, 21L, 60L, 147L, 0L, 645L, 209L, 0L, 85L, 13L, 0L, 0L, 57L), SO_4832_2 = c(230L, 0L, 91L, 11L, 46L, 297L, 0L, 260L, 249L, 12L, 986L, 10L, 0L, 9L, 71L, 10L, 10L, 0L, 445L, 26L, 494L, 0L, 27L, 647L, 0L, 117L, 0L, 38L, 2632L, 32L, 0L, 9L, 114L, 0L, 0L, 222L, 0L, 9L, 81L, 0L, 336L, 37L, 676L, 1530L, 0L, 0L, 265L, 139L, 37L, 38L, 0L, 48L, 11L, 0L, 189L, 0L, 379L, 60L, 0L, 150L, 684L, 706L, 0L, 481L, 390L, 39L, 14L, 0L, 339L, 136L, 46L, 252L, 53L, 134L, 0L, 124L, 144L, 31L, 55L, 25L, 10L, 15L, 11L, 22L, 0L, 26L, 190L, 66L, 30L, 27L, 20L, 139L, 40L, 0L, 14L, 40L, 186L, 23L, 0L, 13L, 0L, 18L, 0L, 706L, 9L, 12L, 15L, 27L, 40L, 126L, 35L, 3933L, 21L, 0L, 8L, 36L, 58L, 0L, 502L, 0L, 25L, 1410L, 14L, 42L, 13L, 10L, 15L, 312L, 101L, 23L, 38L, 0L, 46L, 0L, 0L, 21L, 0L, 9L, 0L, 0L, 0L, 0L, 0L, 0L, 2163L, 64L, 96L, 0L, 21L, 0L, 14L, 37L, 0L, 31L, 0L, 294L, 13L, 17L, 0L, 0L, 0L, 0L, 10L, 0L, 62L, 46L, 0L, 0L, 238L, 0L, 363L, 330L, 0L, 61L, 42L, 0L, 0L, 61L), SO_4832_3 = c(70L, 0L, 57L, 0L, 0L, 28L, 1L, 188L, 128L, 25L, 1632L, 15L, 192L, 174L, 196L, 251L, 86L, 55L, 892L, 91L, 7760L, 45L, 9L, 60L, 12L, 10L, 0L, 0L, 308L, 89L, 0L, 0L, 76L, 45L, 0L, 178L, 0L, 0L, 490L, 18L, 55L, 11L, 7552L, 441L, 11L, 0L, 5009L, 770L, 47L, 39L, 83L, 0L, 37L, 0L, 37L, 39L, 109L, 93L, 17L, 61L, 201L, 628L, 55L, 119L, 522L, 8L, 0L, 13L, 160L, 74L, 19L, 557L, 30L, 29L, 77L, 1745L, 0L, 9L, 152L, 290L, 39L, 0L, 0L, 54L, 9L, 171L, 130L, 110L, 23L, 25L, 11L, 32L, 51L, 28L, 0L, 444L, 93L, 14L, 9L, 220L, 9L, 551L, 45L, 196L, 0L, 10L, 13L, 37L, 0L, 70L, 19L, 718L, 47L, 0L, 0L, 13L, 31L, 0L, 727L, 82L, 24L, 4006L, 0L, 168L, 0L, 48L, 0L, 2198L, 321L, 49L, 31L, 0L, 0L, 21L, 0L, 813L, 44L, 10L, 0L, 31L, 27L, 0L, 0L, 0L, 664L, 109L, 0L, 0L, 0L, 13L, 0L, 13L, 11L, 41L, 0L, 317L, 8L, 0L, 0L, 0L, 39L, 0L, 50L, 44L, 22L, 204L, 21L, 106L, 620L, 0L, 583L, 507L, 0L, 52L, 54L, 0L, 12L, 0L), SO_4832_4 = c(130L, 0L, 126L, 15L, 13L, 175L, 2L, 247L, 51L, 192L, 490L, 9L, 11L, 205L, 398L, 12L, 37L, 30L, 726L, 108L, 2435L, 35L, 24L, 152L, 0L, 16L, 9L, 34L, 875L, 68L, 10L, 0L, 116L, 12L, 0L, 264L, 11L, 0L, 241L, 18L, 169L, 32L, 3004L, 1069L, 0L, 13L, 1181L, 239L, 19L, 62L, 11L, 19L, 24L, 0L, 56L, 0L, 177L, 99L, 18L, 197L, 1118L, 1964L, 29L, 254L, 425L, 11L, 0L, 0L, 215L, 107L, 48L, 529L, 84L, 121L, 130L, 3875L, 0L, 17L, 23L, 136L, 30L, 41L, 24L, 59L, 0L, 135L, 429L, 375L, 45L, 48L, 12L, 240L, 41L, 0L, 40L, 103L, 196L, 19L, 13L, 133L, 0L, 59L, 0L, 726L, 0L, 35L, 65L, 63L, 0L, 160L, 104L, 2493L, 20L, 9L, 0L, 30L, 97L, 10L, 444L, 11L, 23L, 2962L, 11L, 70L, 0L, 23L, 10L, 670L, 317L, 26L, 57L, 13L, 0L, 11L, 53L, 291L, 49L, 10L, 0L, 13L, 8L, 10L, 0L, 0L, 1625L, 122L, 26L, 0L, 10L, 0L, 0L, 22L, 0L, 22L, 0L, 223L, 9L, 13L, 0L, 18L, 43L, 0L, 32L, 52L, 40L, 90L, 41L, 19L, 206L, 0L, 788L, 250L, 0L, 72L, 9L, 61L, 10L, 22L), SO_4832_5 = c(185L, 0L, 84L, 10L, 11L, 304L, 0L, 532L, 64L, 0L, 292L, 0L, 0L, 14L, 10L, 39L, 0L, 68L, 1059L, 59L, 1940L, 10L, 18L, 528L, 33L, 21L, 0L, 41L, 1712L, 41L, 0L, 0L, 105L, 0L, 0L, 135L, 0L, 0L, 218L, 0L, 168L, 64L, 1822L, 2119L, 14L, 10L, 848L, 222L, 15L, 14L, 0L, 79L, 0L, 0L, 151L, 0L, 228L, 155L, 0L, 89L, 379L, 705L, 0L, 420L, 159L, 9L, 20L, 0L, 757L, 479L, 55L, 594L, 92L, 203L, 0L, 189L, 31L, 0L, 31L, 100L, 18L, 17L, 0L, 0L, 0L, 80L, 652L, 414L, 36L, 44L, 19L, 133L, 73L, 0L, 10L, 28L, 190L, 17L, 0L, 109L, 11L, 25L, 18L, 1084L, 0L, 0L, 0L, 0L, 0L, 125L, 29L, 1361L, 11L, 0L, 0L, 26L, 64L, 0L, 620L, 0L, 16L, 1335L, 29L, 88L, 14L, 8L, 14L, 576L, 68L, 21L, 41L, 0L, 0L, 0L, 17L, 39L, 12L, 0L, 0L, 19L, 21L, 0L, 0L, 0L, 1220L, 77L, 0L, 0L, 8L, 0L, 0L, 10L, 0L, 41L, 0L, 393L, 8L, 12L, 0L, 0L, 13L, 0L, 0L, 0L, 53L, 0L, 0L, 0L, 95L, 0L, 57L, 112L, 0L, 38L, 0L, 0L, 0L, 33L), SO_4832_6 = c(134L, 9L, 61L, 9L, 37L, 495L, 0L, 426L, 36L, 0L, 370L, 0L, 0L, 0L, 0L, 0L, 0L, 72L, 480L, 16L, 227L, 0L, 10L, 699L, 0L, 0L, 0L, 14L, 2733L, 24L, 0L, 0L, 73L, 0L, 29L, 291L, 0L, 0L, 72L, 0L, 322L, 154L, 341L, 2206L, 0L, 0L, 101L, 83L, 16L, 22L, 0L, 19L, 0L, 0L, 174L, 0L, 88L, 102L, 0L, 38L, 180L, 499L, 0L, 907L, 93L, 26L, 9L, 0L, 514L, 283L, 102L, 499L, 82L, 23L, 0L, 106L, 34L, 0L, 27L, 17L, 0L, 0L, 0L, 0L, 0L, 23L, 170L, 470L, 53L, 0L, 23L, 50L, 10L, 0L, 0L, 18L, 97L, 20L, 0L, 12L, 0L, 0L, 0L, 316L, 0L, 9L, 0L, 21L, 0L, 26L, 0L, 53L, 24L, 0L, 0L, 37L, 34L, 0L, 883L, 69L, 28L, 919L, 24L, 45L, 18L, 0L, 24L, 136L, 67L, 0L, 48L, 0L, 0L, 0L, 20L, 0L, 12L, 21L, 0L, 67L, 33L, 0L, 10L, 10L, 1165L, 34L, 10L, 31L, 12L, 0L, 0L, 0L, 0L, 0L, 450L, 601L, 3901L, 10L, 156L, 0L, 0L, 0L, 0L, 0L, 15L, 0L, 0L, 0L, 88L, 0L, 18L, 112L, 1155L, 17L, 0L, 0L, 0L, 35L), SO_4832_7 = c(147L, 0L, 92L, 19L, 18L, 409L, 0L, 492L, 44L, 15L, 545L, 0L, 0L, 13L, 52L, 0L, 15L, 59L, 731L, 35L, 992L, 0L, 14L, 606L, 0L, 14L, 0L, 50L, 2284L, 16L, 0L, 0L, 134L, 0L, 0L, 143L, 0L, 0L, 134L, 0L, 165L, 51L, 1040L, 2994L, 11L, 12L, 440L, 121L, 15L, 10L, 0L, 41L, 0L, 8L, 159L, 0L, 280L, 121L, 0L, 103L, 1023L, 1183L, 0L, 551L, 273L, 60L, 10L, 0L, 823L, 421L, 90L, 492L, 117L, 212L, 0L, 116L, 21L, 19L, 39L, 57L, 8L, 29L, 0L, 0L, 0L, 37L, 411L, 473L, 72L, 18L, 29L, 159L, 37L, 0L, 13L, 18L, 181L, 15L, 31L, 35L, 0L, 16L, 0L, 626L, 11L, 12L, 13L, 29L, 0L, 219L, 14L, 614L, 0L, 0L, 0L, 35L, 64L, 0L, 483L, 0L, 0L, 949L, 98L, 60L, 22L, 0L, 21L, 250L, 109L, 9L, 28L, 0L, 0L, 0L, 16L, 0L, 10L, 0L, 0L, 13L, 9L, 0L, 0L, 13L, 1647L, 38L, 25L, 0L, 13L, 0L, 0L, 0L, 0L, 12L, 0L, 317L, 14L, 18L, 0L, 0L, 0L, 0L, 16L, 0L, 28L, 0L, 0L, 0L, 181L, 0L, 61L, 227L, 0L, 42L, 8L, 0L, 0L, 32L), SO_4832_8 = c(42L, 0L, 125L, 18L, 13L, 83L, 0L, 169L, 323L, 259L, 2687L, 37L, 10L, 186L, 325L, 11L, 36L, 0L, 357L, 102L, 1867L, 0L, 16L, 137L, 0L, 18L, 0L, 16L, 556L, 36L, 0L, 0L, 56L, 12L, 0L, 221L, 9L, 0L, 246L, 0L, 124L, 19L, 2932L, 899L, 0L, 17L, 1155L, 218L, 55L, 16L, 0L, 8L, 0L, 31L, 28L, 0L, 140L, 125L, 0L, 171L, 1104L, 2530L, 20L, 80L, 380L, 0L, 0L, 0L, 151L, 91L, 23L, 380L, 38L, 106L, 156L, 5953L, 0L, 23L, 145L, 165L, 12L, 14L, 20L, 72L, 0L, 81L, 452L, 308L, 31L, 42L, 0L, 326L, 23L, 0L, 0L, 97L, 158L, 20L, 0L, 85L, 0L, 57L, 0L, 845L, 0L, 28L, 8L, 31L, 0L, 171L, 79L, 1630L, 18L, 24L, 0L, 0L, 0L, 0L, 197L, 0L, 0L, 793L, 0L, 45L, 0L, 0L, 0L, 243L, 212L, 35L, 56L, 9L, 0L, 0L, 72L, 407L, 17L, 0L, 12L, 0L, 12L, 0L, 9L, 10L, 1814L, 75L, 77L, 0L, 22L, 0L, 18L, 0L, 0L, 10L, 0L, 161L, 15L, 8L, 0L, 9L, 13L, 0L, 37L, 85L, 41L, 73L, 38L, 0L, 837L, 10L, 100L, 1016L, 0L, 210L, 44L, 16L, 0L, 13L)), .Names = c("S_1", "S_2", "SO_3", "SO_4", "SO_5", "SO_6", "SO_7", "SO_8"), class = "data.frame", row.names = c("Acidobacteriaceae", "Acanthopleuribacteraceae", "Holophagaceae", "Bryobacteraceae", "Solibacteraceae", "Calditrichaceae", "Deferribacteraceae", "Rhodothermaceae", "Bacteroidaceae", "Porphyromonadaceae", "Prevotellaceae", "Rikenellaceae", "Marinifilaceae", "Marinilabiliaceae", "Prolixibacteraceae", "Catalimonadaceae", "Cyclobacteriaceae", "Cytophagaceae", "Flammeovirgaceae", "Cryomorphaceae", "Flavobacteriaceae", "Sphingobacteriaceae", "Ignavibacteriaceae", "Gemmatimonadaceae", "Longimicrobiaceae", "Fusobacteriaceae", "Leptotrichiaceae", "Nitrospinaceae", "Nitrospiraceae", "Caulobacteraceae", "Kordiimonadaceae", "Micropepsaceae", "Parvularculaceae", "Aurantimonadaceae", "Bradyrhizobiaceae", "Hyphomicrobiaceae", "Methylobacteriaceae", "Methylocystaceae", "Phyllobacteriaceae", "Rhizobiaceae", "Rhodobiaceae", "Xanthobacteraceae", "Rhodobacteraceae", "Rhodospirillaceae", "Rickettsiaceae", "Sneathiellaceae", "Erythrobacteraceae", "Sphingomonadaceae", "Alcaligenaceae", "Comamonadaceae", "Oxalobacteraceae", "Hydrogenophilaceae", "Methylophilaceae", "Neisseriaceae", "Nitrosomonadaceae", "Rhodocyclaceae", "Bacteriovoracaceae", "Bdellovibrionaceae", "Pseudobacteriovoracaceae", "Desulfarculaceae", "Desulfobacteraceae", "Desulfobulbaceae", "Desulfovibrionaceae", "Desulfurellaceae", "Desulfuromonadaceae", "Geobacteraceae", "Anaeromyxobacteraceae", "Myxococcaceae", "Kofleriaceae", "Nannocystaceae", "Polyangiaceae", "Sandaracinaceae", "Syntrophaceae", "Syntrophobacteraceae", "Campylobacteraceae", "Helicobacteraceae", "Acidiferrobacteraceae", "Aeromonadaceae", "Succinivibrionaceae", "Alteromonadaceae", "Colwelliaceae", "Pseudoalteromonadaceae", "Psychromonadaceae", "Shewanellaceae", "Arenicellaceae", "Cellvibrionaceae", "Halieaceae", "Microbulbiferaceae", "Porticoccaceae", "Spongiibacteraceae", "Chromatiaceae", "Ectothiorhodospiraceae", "Granulosicoccaceae", "Halothiobacillaceae", "Thioalkalispiraceae", "Enterobacteriaceae", "Coxiellaceae", "Legionellaceae", "Methylococcaceae", "Alcanivoracaceae", "Hahellaceae", "Halomonadaceae", "Kangiellaceae", "Oceanospirillaceae", "Oleiphilaceae", "Pasteurellaceae", "Moraxellaceae", "Pseudomonadaceae", "Salinisphaeraceae", "Piscirickettsiaceae", "Thiotrichaceae", "Vibrionaceae", "Xanthomonadaceae", "Mariprofundaceae", "Chlamydiaceae", "Parachlamydiaceae", "Simkaniaceae", "Oligosphaeraceae", "Phycisphaeraceae", "Tepidisphaeraceae", "Gemmataceae", "Planctomycetaceae", "Opitutaceae", "Puniceicoccaceae", "Chthoniobacteraceae", "Rubritaleaceae", "Verrucomicrobia subdivision 3", "Verrucomicrobiaceae", "Spirochaetaceae", "Bifidobacteriaceae", "Mycobacteriaceae", "Nocardiaceae", "Frankiaceae", "Kineosporiaceae", "Cellulomonadaceae", "Demequinaceae", "Microbacteriaceae", "Micrococcaceae", "Promicromonosporaceae", "Micromonosporaceae", "Nocardioidaceae", "Propionibacteriaceae", "Pseudonocardiaceae", "Streptomycetaceae", "Anaerolineaceae", "Caldilineaceae", "Dehalococcoidaceae", "Ktedonobacteraceae", "Sphaerobacteraceae", "Cyanobacteriaceae", "Microcoleaceae", "Hyellaceae", "Synechococcaceae", "Trueperaceae", "Alicyclobacillaceae", "Bacillaceae", "Paenibacillaceae", "Staphylococcaceae", "Thermoactinomycetaceae", "Enterococcaceae", "Lactobacillaceae", "Leuconostocaceae", "Streptococcaceae", "Christensenellaceae", "Clostridiaceae", "Clostridiales Family XII. Incertae Sedis", "Defluviitaleaceae", "Eubacteriaceae", "Lachnospiraceae", "Peptococcaceae", "Peptostreptococcaceae", "Ruminococcaceae", "Symbiobacteriaceae", "Erysipelotrichaceae", "Selenomonadaceae", "Sporomusaceae", "Acholeplasmataceae", "Halobacteriaceae"))
And I am doing CCA as
microbiome_and_chemical.cca<-cca(t(Taxa.family),Chemical.data.mean)
Thnaks. SM