dominance.calc {gnonadd} | R Documentation |
Genetic dominance effects
Description
This function estimates the dominance effect of a genetic variant on a quantitatvie trait Nothing fancy here. We apply a simple linear regression model to estimate dominance effects. We include a linear term, coded as 0,1 and 2 for non-carriers, heterozygotes and homozygous carriers of the effect allele. We also include a dominance term, coded as 1 for homozygous carriers and 0 for others. Effect size and significance is based on the dominance term.
Usage
dominance.calc(
qt,
g,
round_imputed = FALSE,
covariates = as.data.frame(matrix(0, nrow = 0, ncol = 0))
)
Arguments
qt |
A numeric vector |
g |
A vector with (possibly imputed) genotype values. All entries should be larger than 0 and smaller than 2. |
round_imputed |
A boolian variable determining whether imputed genotype values should be rounded to the nearest integer in the analysis |
covariates |
A dataframe containing any covariates that should be used; one column per covariate. |
Value
A list with the dominanc effect and corresponding standard error, t statistic and p-value
Examples
g_vec <- rbinom(100000, 2, 0.3)
qt_vec <- rnorm(100000) + 0.2 * g_vec^2
res <- dominance.calc(qt_vec, g_vec)