Learn R Programming

CLME (version 2.0-12)

minque: MINQUE Algorithm

Description

Algorithm to obtain MINQUE estimates of variance components of a linear mixed effects model.

Usage

minque(
  Y,
  X1,
  X2 = NULL,
  U = NULL,
  Nks = dim(X1)[1],
  Qs = dim(U)[2],
  mq.eps = 1e-04,
  mq.iter = 500,
  verbose = FALSE,
  ...
)

Arguments

Y

\(N \times 1\) vector of response data.

X1

\(N \times p_1\) design matrix.

X2

optional \(N \times p_2\) matrix of covariates.

U

optional \(N \times c\) matrix of random effects.

Nks

optional \(K \times 1\) vector of group sizes.

Qs

optional \(Q \times 1\) vector of group sizes for random effects.

mq.eps

criterion for convergence for the MINQUE algorithm.

mq.iter

maximum number of iterations permitted for the MINQUE algorithm.

verbose

if TRUE, function prints messages on progress of the MINQUE algorithm.

...

space for additional arguments.

Value

The function returns a vector of the form \((\tau^{2}_{1}, \tau^{2}_{2}, \ldots, \tau^{2}_{q}, \sigma^{2}_{1},\sigma^{2}_{2},\ldots, \sigma^{2}_{k})'\). If there are no random effects, then the output is just \((\sigma^{2}_{1},\sigma^{2}_{2},\ldots, \sigma^{2}_{k})'\).

Details

By default, the model assumes homogeneity of variances for both the residuals and the random effects (if included). See the Details in clme_em for more information on how to use the arguments Nks and Qs to permit heterogeneous variances.

Examples

Run this code
# NOT RUN {
data( rat.blood )

model_mats <- model_terms_clme( mcv ~ time + temp + sex + (1|id) , 
                                data = rat.blood )
Y  <- model_mats$Y
X1 <- model_mats$X1
X2 <- model_mats$X2
U  <- model_mats$U

# No covariates or random effects
minque(Y = Y, X1 = X1 )

# Include covariates and random effects
minque(Y = Y, X1 = X1, X2 = X2, U = U )

# }

Run the code above in your browser using DataLab