anova_single | R Documentation |
Given a sparse model defined by explicit locus indexes, here we assing ANOVA type-II -log10 p-values to these loci. To achieve this, loci coefficients are fit to the data as multiple linear regression, without penalization.
anova_single(X, y, indexes, pcs = NULL, ret_sparse = FALSE)
X |
The genotype matrix. |
y |
The trait vector. |
indexes |
Indexes of the loci to fit. |
pcs |
The PC (eigenvector) matrix (optional). Unlike genotypes, PCs are not given p-values. |
ret_sparse |
Logical that controls return value (see that). |
If ret_sparse = FALSE
(default), returns a complete vector of scores (-log10 p-values) for every locus in X
, with zeroes for all loci with zero coefficients.
For loci with non-zero coefficients, p-values are calculated using anova2()
, see that for more details.
If ret_sparse = TRUE
, returns a list of indexes and scores corresponding only to the loci with non-zero coefficients.
glmnet_pca()
, particularly option cv = TRUE
, for obtaining cross-validation objects with PCs.
anova_glmnet_single()
for scores on a single glmnet
model, instead of specifying indexes explicitly as here.
anova_glmnet()
for scores for all glmnet
models (all lambdas), though it is much slower and not generally recommended.
anova2()
for additional details and data restrictions.
scores_glmnet()
for a different way of scoring/raking variants.
## Not run: scores <- anova_single( X, y, indexes, pcs ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.