View source: R/EMM_functions_cpp.R
EMM1.cpp | R Documentation |
This function solves the single-kernel linear mixed effects model by GEMMA (genome wide efficient mixed model association; Zhou et al., 2012) approach.
EMM1.cpp(
y,
X = NULL,
ZETA,
eigen.G = NULL,
n.core = NA,
lam.len = 4,
init.range = c(1e-04, 100),
init.one = 0.5,
conv.param = 1e-06,
count.max = 15,
bounds = c(1e-06, 1e+06),
tol = NULL,
REML = TRUE,
silent = TRUE,
plot.l = FALSE,
SE = FALSE,
return.Hinv = TRUE
)
y |
A |
X |
A |
ZETA |
A list of variance (relationship) matrix (K; |
eigen.G |
A list with
The result of the eigen decompsition of |
n.core |
Setting n.core > 1 will enable parallel execution on a machine with multiple cores. |
lam.len |
The number of initial values you set. If this number is large, the estimation will be more accurate, but computational cost will be large. We recommend setting this value 3 <= lam.len <= 6. |
init.range |
The range of the initial parameters. For example, if lam.len = 5 and init.range = c(1e-06, 1e02), corresponding initial heritabilities will be calculated as seq(1e-06, 1 - 1e-02, length = 5), and then initial lambdas will be set. |
init.one |
The initial parameter if lam.len = 1. |
conv.param |
The convergence parameter. If the diffrence of log-likelihood by updating the parameter "lambda" is smaller than this conv.param, the iteration steps will be stopped. |
count.max |
Sometimes algorithms won't converge for some initial parameters. So if the iteration steps reache to this argument, you can stop the calculation even if algorithm doesn't converge. |
bounds |
Lower and Upper bounds of the parameter 1 / lambda. If the updated parameter goes out of this range, the parameter is reset to the value in this range. |
tol |
The tolerance for detecting linear dependencies in the columns of G = ZKZ'. Eigen vectors whose eigen values are less than "tol" argument will be omitted from results. If tol is NULL, top 'n' eigen values will be effective. |
REML |
You can choose which method you will use, "REML" or "ML". If REML = TRUE, you will perform "REML", and if REML = FALSE, you will perform "ML". |
silent |
If this argument is TRUE, warning messages will be shown when estimation is not accurate. |
plot.l |
If you want to plot log-likelihood, please set plot.l = TRUE. We don't recommend plot.l = TRUE when lam.len >= 2. |
SE |
If TRUE, standard errors are calculated. |
return.Hinv |
If TRUE, the function returns the inverse of |
Estimator for \sigma^2_u
Estimator for \sigma^2_e
BLUE(\beta
)
BLUP(u
)
Maximized log-likelihood (full or restricted, depending on method)
Standard error for \beta
(If SE = TRUE)
Standard error for u^*-u
(If SE = TRUE)
The inverse of H = ZKZ' + \lambda I
(If return.Hinv = TRUE)
The inverse of H2 = ZKZ'/\lambda + I
(If return.Hinv = TRUE)
Estimators for \lambda = \sigma^2_e / \sigma^2_u
Lambdas for each initial values
If parameter estimation may not be accurate, reest = 1, else reest = 0
The number of iterations until convergence for each initial values
Kang, H.M. et al. (2008) Efficient Control of Population Structure in Model Organism Association Mapping. Genetics. 178(3): 1709-1723.
Zhou, X. and Stephens, M. (2012) Genome-wide efficient mixed-model analysis for association studies. Nat Genet. 44(7): 821-824.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.