SolveHMME {HMMEsolver}R Documentation

Solve Henderson's Mixed Model Equation.

Description

Consider a linear mixed model with normal random effects,

Yij=XijTβ+vi+ϵijY_{ij} = X_{ij}^T\beta + v_i + \epsilon_{ij}

where i=1,,n,j=1,,mi=1,\ldots,n,\quad j=1,\ldots,m, or it can be equivalently expressed using matrix notation,

Y=Xβ+Zv+ϵY = X\beta + Zv + \epsilon

where YRnmY\in \mathrm{R}^{nm} is a known vector of observations, XRnm×pX \in \mathrm{R}^{nm\times p} and ZRnm×nZ \in \mathrm{R}^{nm\times n} design matrices for β\beta and vv respectively, βRp\beta \in \mathrm{R}^p and vRnv\in \mathrm{R}^n unknown vectors of fixed effects and random effects where viN(0,λi)v_i \sim N(0,\lambda_i), and ϵRnm\epsilon \in \mathrm{R}^{nm} an unknown vector random errors independent of random effects. Note that ZZ does not need to be provided by a user since it is automatically created accordingly to the problem specification.

Usage

SolveHMME(X, Y, Mu, Lambda)

Arguments

X

an (nm×p)(nm\times p) design matrix for β\beta.

Y

a length-nmnm vector of observations.

Mu

a length-nmnm vector of initial values for μi=E(Yi)\mu_i = E(Y_i).

Lambda

a length-nn vector of initial values for λ\lambda, variance of viN(0,λi)v_i \sim N(0,\lambda_i)

Value

a named list containing

beta

a length-pp vector of BLUE beta^\hat{beta}.

v

a length-nn vector of BLUP v^\hat{v}.

leverage

a length-(mn+n)(mn+n) vector of leverages.

References

Henderson CR, Kempthorne O, Searle SR, von Krosigk CM (1959). “The Estimation of Environmental and Genetic Trends from Records Subject to Culling.” Biometrics, 15(2), 192. ISSN 0006341X, doi: 10.2307/2527669, http://www.jstor.org/stable/2527669?origin=crossref.

Robinson GK (1991). “That BLUP is a Good Thing: The Estimation of Random Effects.” Statistical Science, 6(1), 15–32. ISSN 0883-4237, doi: 10.1214/ss/1177011926, http://projecteuclid.org/euclid.ss/1177011926.

McLean RA, Sanders WL, Stroup WW (1991). “A Unified Approach to Mixed Linear Models.” The American Statistician, 45(1), 54. ISSN 00031305, doi: 10.2307/2685241, http://www.jstor.org/stable/2685241?origin=crossref.

Kim J (2017). “A Fast Algorithm for Solving Henderson's Mixed Model Equation.” ArXiv e-prints.

Examples

## small setting for data generation
n = 100; m = 2; p = 2
nm = n*m;   nmp = n*m*p

## generate artifical data
X = matrix(rnorm(nmp, 2,1), nm,p) # design matrix
Y = rnorm(nm, 2,1)                # observation

Mu = rep(1, times=nm)
Lambda = rep(1, times=n)

## solve
ans = SolveHMME(X, Y, Mu, Lambda)



[Package HMMEsolver version 0.1.2 Index]