Description Usage Arguments Details Value Author(s) References See Also Examples
Estimate non-linear model for the effect of genotype on the phenotype of interest, i.e. gene expression.
1 2 | effectSizeEstimationC(x, y, cvrt)
effectSizeEstimationR(x, y, cvrt)
|
x |
Genotype vector. Typically having 0/1/2 values. |
y |
Phenotype vector. Typically gene expression in normalized raw counts. |
cvrt |
Matrix of covariates. |
The function has two implementations, one fully coded in R and a faster version with core coded in C.
Returns a vector with estimated parameters and diagnostics information, such as number of iterations till convergence.
The items of the vector include:
beta0 |
The constant parameter in the non-linear model. |
beta1 |
The effect size parameter in the non-linear model. |
nits |
Number of iterations till convergence of the estimation algorithm. |
SSE |
Sum of squared residuals of the fitted model. |
SST |
Sum of squared residuals of the model with zero effect. |
F |
The F test for the significance of the genotype effect. |
eta |
The effect size parameter for simplified model (beta1/beta0). |
SE_eta |
Standard error of the eta estimate. |
Andrey A Shabalin andrey.shabalin@gmail.com, John Palowitch
The manuscript is available at: http://onlinelibrary.wiley.com/doi/10.1111/biom.12810/full
For package overview and code examples see the package vignette via:
browseVignettes("ACMEeqtl")
or
RShowDoc("doc/ACMEeqtl.html", "html", "ACMEeqtl")
For fast testing of all local gene-SNP pairs (local eQTL) see
multithreadACME
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # Model parameters
beta0 = 10000
beta = 50000
# Data dimensions
n = 1000
p = 19
# Standard deviation of covariate effects and noise
cvrtsd = 10
noisesd = 1
### Data generation
### Zero average covariates
cvrt = matrix(rnorm(n * p, sd = cvrtsd), n, p)
cvrt = t(t(cvrt) - colMeans(cvrt))
c_eff = rnorm(p, sd = cvrtsd)
error = rnorm(n, sd = noisesd)
# Generate SNPs
x = rbinom(n, size = 2, prob = 0.2)
y = log(beta0 + beta * x) + cvrt %*% c_eff + error
### Model estimation
z1 = effectSizeEstimationR(x, y, cvrt)
z2 = effectSizeEstimationC(x, y, cvrt)
### Compare the estimates
show(cbind(z1, z2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.