I measured different plant traits and enviromental factors like radiaton or temperature for 42 different genotypes. I want to know which traits are related to each other and which traits are influenced to each other (e.g. radiation to trait). Thus a PCA came in my mind.
That is a part of my data frame (release.year means the release year of the genotype and each row is one measurement; there are multiple measurements per genotype):
release.year PARmolmsmean TemperaturCmean Fv.Fm Fr1.Fm NDVI2
1 1951 1160.480 14.5698 0.4252503 0.1992661 0.9069721
2 1951 1165.150 24.1412 0.4714152 0.3363943 0.9452823
3 1951 1478.050 18.8031 0.4845846 0.2643791 0.9388180
4 1951 1536.150 11.3179 0.3393415 0.1957040 0.9074890
5 1951 1566.880 25.4107 0.4181181 0.3234387 0.9385588
6 1951 1605.120 22.4142 0.4628020 0.2911468 0.9459246
7 1951 1653.270 20.8988 0.4710748 0.3004921 0.9350731
8 1951 1686.590 21.8360 0.5086655 0.3506261 0.9252237
9 1951 1741.540 14.9924 0.4425364 0.2233692 0.9208316
10 1951 1749.030 26.4696 0.4479734 0.3712510 0.9341932
11 1951 1916.180 28.8097 0.4193770 0.3272526 0.9442456
12 1951 2036.370 22.9217 0.4212041 0.3460669 0.9177171
13 1951 2058.530 28.3290 0.4435373 0.3465088 0.9285163
14 1951 2068.900 23.7608 0.4312131 0.3217924 0.9370028
15 1951 644.265 12.6475 0.4047917 0.1882771 0.9239126
16 1951 794.578 17.1793 0.5568734 0.2214873 0.9444661
17 1951 914.188 15.2715 0.5121282 0.2064338 0.9382595
18 1951 958.170 15.3889 0.4508183 0.2970802 0.9271799
19 1953 1429.090 15.0966 0.4379091 0.2478120 0.9374094
20 1953 1478.050 18.8031 0.5354153 0.2576067 0.9459906
21 1953 1576.210 24.7682 0.4743814 0.3157759 0.9372654
22 1953 1632.500 22.4675 0.3945049 0.3046481 0.9206227
23 1953 1683.670 12.5784 0.3904874 0.1848006 0.9317080
24 1953 1686.730 22.0717 0.4769295 0.3176542 0.9492195
25 1953 1770.230 15.1633 0.4263168 0.2296812 0.9389138
26 1953 1831.960 26.8531 0.4314113 0.3627886 0.9472129
27 1953 1857.880 21.6815 0.3569287 0.2964029 0.9423032
28 1953 1986.480 24.8260 0.3733148 0.3234840 0.9236503
29 1953 2058.530 28.3290 0.4024092 0.3511438 0.9283465
30 1953 2068.490 23.2445 0.4422827 0.3369628 0.9453007
31 1953 2099.660 24.0771 0.3738086 0.3148910 0.9433190
32 1953 2108.340 28.7854 0.3979736 0.3492899 0.9323239
33 1953 611.627 12.9907 0.5050644 0.1987066 0.9363292
34 1953 668.194 17.3683 0.5871649 0.2213303 0.9452587
35 1953 782.109 15.2782 0.4651738 0.2537262 0.9305000
36 1953 935.380 14.5458 0.3716472 0.2293471 0.9181275
37 1956 1159.140 12.5591 0.4584142 0.2130523 0.9209437
38 1956 1165.150 24.1412 0.4869044 0.3122720 0.9291310
39 1956 1302.300 22.3879 0.4255736 0.3140835 0.9240680
40 1956 1429.090 15.0966 0.4489692 0.2425797 0.9270232
41 1956 1491.960 19.5193 0.4793279 0.2783667 0.9412001
42 1956 1686.590 21.8360 0.5215572 0.3507388 0.9523238
43 1956 1728.250 24.0542 0.4537621 0.3304822 0.9238353
44 1956 1749.030 26.4696 0.5033194 0.3627435 0.9310118
45 1956 1770.230 15.1633 0.4727894 0.2429909 0.9355953
46 1956 1857.880 21.6815 0.4497379 0.2983577 0.9225823
...
sum.pca <- prcomp(SUM, center = TRUE,scale. = TRUE )
ggbiplot(sum.pca, alpha = 0)
But I realy don't know if that is useful to investigate correlations between the factors. E.g. Fv.Fm is a plant trait and temperature is an eviromental factor which doesn't discribe a plant trait, but it influences it. Thus the main question is: Is it statistical correct to calculate a PCA for that case?
I hope my explanation is comprehensible.
Thanks for your help.
The output of ggbiplot()
gives you information of how the features in your data correlate together. Arrows which point in similar directions imply those features exhibit a similar trend. If your PCA is stored in sum.pca
, you'll find the data for each component in sum.pca[["x"]]
as PC1
, PC2
, PC3
, etc. These can be used to create a scatter plot to visualize clustering of your data. You may also want to use a scree plot to see how much variation is captured by each dimension of your PCA. For a clearer picture of how features relate to each other, you may want to look at corrplot
.