I am trying to analyze data using Principal Coordinates Analysis (Classical Multidimensional Scaling (CMDS)) in R. I've tried some different ways (i.e., pcoa {ape}
, cmdscale, capscale {vegan}
).
I've found that the results are the same and the plots look fine. But, I need some numbers saying how much does every original variable contribute to my axis (principle coordinates). So I am asking how the new dimensions relate to the original variables?
I've learned that:
Information concerning the original variables cannot be recovered.This is because PCoA takes a (dis)similarity matrix derived from the original data as input and not the original variables themselves. However, object scores along the PCoA axes may be correlated with object scores along each original variable's axis, assuming the these are either quantitative or dummy variables. This may be used as a measure of the original variables' contribution to a given PCoA axis.
But I am still not sure how to do it. Can you help me with this?
I am using this code for PCoA:
res3 <- capscale(data~1, distance="gower")
My data looks like this (F
and width
are continuous, vol
and obj
are binary, and rt
is a multi-level categorical variable):
place F width vol obj rt
A -0.05 17.1 1 0 2
B 0.03 13.5 1 0 0
C 0.13 62.2 1 1 1
D 0.43 9.5 1 0 2