The rdadapt
function performs redundancy analysis and computes p-values to
test for outliers based on loci extremeness along a distribution of Mahalanobis distances
estimated between each locus and the center of the RDA space using a certain number of axes (K).
It accommodates individual genotypes or allele frequencies.
rdadapt(RDA, K, scores)
# S4 method for class 'rda,ANY,ANY'
rdadapt(RDA, K)
# S4 method for class 'missing,missing,data.frame'
rdadapt(scores)
# S4 method for class 'missing,missing,matrix'
rdadapt(scores)
A data.frame
containing :
p.values
: the p-value associated with each locus
q.values
: the q-value associated with each locus, estimated using the
qvalue package and allowing to use a FDR (false discovery rate) approach instead
of a p-value threshold to identify outliers.
First, Mahalanobis distances are computed for all genetic markers using a robust estimate
of both mean and covariance matrix between the K
RDA vectors of loadings.
Then, to compute p-values, Mahalanobis distances are divided by a GIF
(genomic inflation factor), giving a scaled statistic that should follow a chi-squared
distribution with K
degrees of freedom.