penmlogl {aster}R Documentation

Penalized Minus Log Likelihood for Aster Models


Penalized minus log likelihood for an aster model, and its first and second derivative. The penalization allows for (approximate) random effects. These functions are called inside pickle, pickle1, pickle2, pickle3, and reaster.


penmlogl(parm, sigma, fixed, random, obj, y, origin, deriv = 2)
penmlogl2(parm, alpha, sigma, fixed, random, obj, y, origin)



for penmlogl, parameter value (vector of regression coefficients and rescaled random effects) at which we evaluate the penalized log likelihood. For penmlogl2 the vector of rescaled random effects only (see next item).


the vector of fixed effects. For penmlogl2, the concatenation c(alpha, parm) is the same as parm that is supplied to pemnmlogl.


vector of square roots of variance components, one component for each group of random effects.


the model matrix for fixed effects. The number of rows is nrow(obj$data). The number of columns is the number of fixed effects.


the model matrix or matrices for random effects. Each has the same number of rows as fixed. The number of columns is the number of random effects in a group. Either a matrix or a list of matrices.


aster model object, the result of a call to aster.


response vector. May be omitted, in which case obj$x is used. If supplied, must be a matrix of the same dimensions as obj$x.


origin of aster model. May be omitted, in which case default origin (see aster) is used. If supplied, must be a matrix of the same dimensions obj$x.


number of derivatives wanted. Allowed values are 0, 1, or 2.


Consider an aster model with random effects and canonical parameter vector of the form

M alpha + Z[1] b[1] + … + Z[k] b[k]

where M and each Z[j] are known matrices having the same row dimension, where alpha is a vector of unknown parameters (the fixed effects) and each b[j] is a vector of random effects that are supposed to be (marginally) independent and identically distributed mean-zero normal with variance sigma[j]^2.

These functions evaluate minus the “penalized log likelihood” for this model, which considers the random effects as parameters but adds a penalization term

b[1]^2 / (2 * sigma[1]^2) + … + b[k]^2 / (2 sigma[k]^2)

to minus the log likelihood.

To properly deal with random effects that are zero, random effects are rescaled by their standard deviation. The rescaled random effects are c[i] = b[i] / sigma[i]. If sigma[i] = 0, then the corresponding rescaled random effects c[i] are also zero.


a list containing some of the following components:


minus the penalized log likelihood.


minus the first derivative vector of the penalized log likelihood.


minus the second derivative matrix of the penalized log likelihood.


the value of the parm argument for this function.


the vector by which parm must be scaled to obtain the true random effects.


gradient for evaluation of log likelihood; gradient is this plus gradient of penalty.


hessian for evaluation of log likelihood; hessian is this plus hessian of penalty.


Not intended for use by naive users. Use reaster, which calls them.

See Also

For an example using this function see the example for pickle.

[Package aster version 1.1-2 Index]