anova2 | R Documentation |
This function assings p-values to a polyygenic linear model.
Essentially a wrapper around stats::drop1()
to assign p-values to a small number of selected loci while fitting PCs without caring about their significance.
anova2(X, y, pcs = NULL)
X |
The genotype matrix.
Each row of |
y |
The trait vector. It must have length equal to the number of individuals. |
pcs |
The PC (eigenvector) matrix (optional).
It must have individuals along the rows and dimensions along the columns.
Unlike |
A data frame containing these columns: 'Df', 'SS', 'RSS', 'AIC', 'F', 'p'.
The first row is for the full model, followed by statistics for pcs
if present, followed by per-locus statistics for X
.
If X
had row names, these are the names of the variables (row names of this output data frame; possibly quoted with backticks if they had special symbols); otherwise 'x1', 'x2', and so on are used.
When there are as many or more predictors (loci) as there are samples (individuals), or if a perfect fit is detected, data returned is a dummy data frame containing only the 'p' column and with all p-values equal to 1.
## Not run: data <- anova2(X, y, pcs) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.