Calculation of R2 between Sample Variable and Principal Components
Source:R/pca_cor_samplevar.R
h_pca_var_rsquared.Rd
This helper function calculates R2 values between one sample variable from AnyHermesData
and all Principal Components (PCs) separately (one linear model is fit for each PC).
Arguments
- pca
(
matrix
)
principal components matrix generated bycalc_pca()
.- x
(
vector
)
values of one sample variable from aAnyHermesData
object.