LMEgradient: The gradient and Hessian in lme optimization-method
Description
The LMEgradient and LMEhessian generic functions return the gradient
and the Hessian of the
log-likelihood or log-restricted-likelihood in an lme model with
respect to the parameters of the object represented by x.
Usage
LMEgradient(x, A, nlev)
LMEhessian(x, A, H, nlev)
Arguments
x
a parameterized component of an lme model, usually the
precision matrix of an lmeLevel. Such precision matrices
inherit from the pdMat class.
A
an upper triangular matrix with the same number of columns as
the matrix represented by x
H
an array of four dimensions with each dimension same as the
number of columns of the matrix represented by x
nlev
integer: the number of levels of the grouping factor
corresponding to the random-effects structure
Value
LMEgradient returns
a numeric vector of length length(coef(x)).
LMEhessian returns
a symmetric matrix with number of columns length(coef(x)).