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
)
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
A \(n \times 1\) vector. A vector of phenotypic values should be used. NA is allowed.
A \(n \times p\) matrix. You should assign mean vector (rep(1, n)) and covariates. NA is not allowed.
A list of variance (relationship) matrix (K; \(m \times m\)) and its design matrix (Z; \(n \times m\)) of random effects. You can use only one kernel matrix. For example, ZETA = list(A = list(Z = Z, K = K)) Please set names of list "Z" and "K"!
A list with
Eigen values
Eigen vectors
The result of the eigen decompsition of \(G = ZKZ'\). You can use "spectralG.cpp" function in RAINBOWR. If this argument is NULL, the eigen decomposition will be performed in this function. We recommend you assign the result of the eigen decomposition beforehand for time saving.
Setting n.core > 1 will enable parallel execution on a machine with multiple cores.
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.
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.
The initial parameter if lam.len = 1.
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.
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.
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.
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.
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".
If this argument is TRUE, warning messages will be shown when estimation is not accurate.
If you want to plot log-likelihood, please set plot.l = TRUE. We don't recommend plot.l = TRUE when lam.len >= 2.
If TRUE, standard errors are calculated.
If TRUE, the function returns the inverse of \(H = ZKZ' + \lambda I\) where \(\lambda = \sigma^2_e / \sigma^2_u\). This is useful for GWAS.
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.