vGWAS.variance: Calculating Variance Explained by A Single Marker

View source: R/vGWAS.variance.R

vGWAS.varianceR Documentation

Calculating Variance Explained by A Single Marker

Description

The function calculates and reports the variance explained for a single marker by fitting a double generalized linear model. It gives both the variance explained by the mean and variance parts of model.

Usage

vGWAS.variance(phenotype, marker.genotype, print = TRUE)

Arguments

phenotype

a numeric vector of the phenotyic values. See Examples.

marker.genotype

a numeric or character or factor vector of the genotypes of a single marker. See Examples.

print

a logical value. If FALSE, the heritability values will be returned for storage.

Details

The Value will only be available if only.print = FALSE.

Value

variance.mean

the variance explained by the mean part of model.

variance.disp

the variance explained by the variance part of model.

Author(s)

Xia Shen

References

Shen, X., Pettersson, M., Ronnegard, L. and Carlborg, O. (2011): Inheritance beyond plain heritability: variance-controlling genes in Arabidopsis thaliana. PLoS Genetics, 8, e1002839.

See Also

package-vGWAS, vGWAS, plot.vGWAS

Examples


# ----- load data ----- #
data(pheno)
data(geno)
data(chr)
data(map)
# ----- variance GWA scan ----- #
vgwa <- vGWAS(phenotype = pheno, geno.matrix = geno,
marker.map = map, chr.index = chr, pB = FALSE)
# ----- visualize the scan ----- #
plot(vgwa)
summary(vgwa)
# ----- calculate the variance explained by the strongest marker ----- #
vGWAS.variance(phenotype = pheno,
marker.genotype = geno[, vgwa[["p.value"]] == min(vgwa[["p.value"]])])


kullrich/vGWAS documentation built on June 10, 2025, 3:56 a.m.