adeverse / ade4

Analysis of Ecological Data : Exploratory and Euclidean Methods in Environmental Sciences
http://adeverse.github.io/ade4/
39 stars 10 forks source link

Dudi object #29

Closed Adrianaacero closed 2 years ago

Adrianaacero commented 2 years ago

Hello,

I'm working with geometric morphometrics, and I want to run a RLQ with the scores of the skull that I get with geomorph package. I want to transform my data frame in an object dudi without entering the data again in a dudi.pca. Do you know how can I calculate the row and column weigths to work with as.dudi function.

Thanks, Adriana

sdray commented 2 years ago

Hello, In RLQ, you should use the row/column weights of the central Correspondence Analysis in the PCA (or other analysis) of the two marginal tables R and Q. In your case, I do not know which analysis you perform in geomorph but you should probably at least center the skull scores using appropriate row weights. One solution to do that is dudi.pca(skullscores, row.w = coa$lw, scale = FALSE, center = TRUE). If you set alsocenter = FALSE`, then your data will not be modified at all (but in this case, the data could be uncentered for the COA row weights if centring has been performed in geomorph with uniform weights)