penmlogl {aster}  R Documentation 
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)
parm 
for 
alpha 
the vector of fixed effects. For 
sigma 
vector of square roots of variance components, one component for each group of random effects. 
fixed 
the model matrix for fixed effects. The number of rows
is 
random 
the model matrix or matrices for random effects.
Each has the same number of rows as 
obj 
aster model object, the result of a call to 
y 
response vector. May be omitted, in which case 
origin 
origin of aster model. May be omitted, in which case
default origin (see 
deriv 
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
meanzero 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:
value 
minus the penalized log likelihood. 
gradient 
minus the first derivative vector of the penalized log likelihood. 
hessian 
minus the second derivative matrix of the penalized log likelihood. 
argument 
the value of the 
scale 
the vector by which 
mlogl.gradient 
gradient for evaluation of log likelihood;

mlogl.hessian 
hessian for evaluation of log likelihood;

Not intended for use by naive users. Use reaster
,
which calls them.
For an example using this function see the example
for pickle
.