Learn R Programming

NAM (version 1.4.6)

REML: Restricted Maximum Likelihood

Description

Univariate REML estimators and variance components for a single random variable fitted by an EMMA-like algorithm.

Usage

reml(y,X=NULL,Z=NULL,K=NULL) MCreml(y,K,X=NULL,MC=300,samp=300)

Arguments

y
Numeric vector of observations ($n$) describing the trait to be analyzed. NA is allowed.
X
Formula or incidence matrix ($n$ by $p$) for fixed effect. NA is not allowed.
Z
Formula or numeric matrix ($n$ by $p$) that corresponds to the incidence matrix of random effect. NA is not allowed.
K
Numeric matrix ($p$ by $p$). Kinship matrix for random effect with $p$ parameters. NA is not allowed.
MC
Number of sampling procedures to estimate variance components using MCreml.
samp
Sample size of the sampling procedure to estimate variance components using MCreml.

Value

The function reml returns a list with variance components and heritability (VC), fixed effect coefficients and standard variations (Fixed) and estimated breeding values (EBV).

Details

Solve mixed models with a single random effects minizing the log restricted maximum likelihood (REML) using the EMMA algorithm (Kang et al 2008). Prediction of random coefficients are performed according to VanRaden (2008). If y is a matrix with multiple traits, the fuctions solves the mixed model via an ECM algorithm adapted from the EMMREML package (Akdemir and Godfrey 2014). MCreml is uses subsampling, a Monte Carlo strategy to reduce the computational burden to estimate variance components in large datasets.

References

Akdemir, D., and O. U. Godfrey (2014) EMMREML: Fitting Mixed Models with Known Covariance Structures. R Package Version 2.0. Available at: http://CRAN.R-project.org/package=EMMREML.

Kang, H. M., Zaitlen, N. A., Wade, C. M., Kirby, A., Heckerman, D., Daly, M. J., & Eskin, E. (2008). Efficient control of population structure in model organism association mapping. Genetics, 178(3), 1709-1723.

VanRaden, P. M. (2008). Efficient methods to compute genomic predictions. Journal of dairy science, 91(11), 4414-4423.

Examples

Run this code

# Fitting a random model
data(tpod)
FIT = reml(y=y,Z=~as.factor(fam))

# Fitting GBLUP
G = tcrossprod(gen)
G = G/mean(diag(G))
GBLUP = reml(y=y,K=G)

Run the code above in your browser using DataLab