Mainly intended for internal use in specifying location scale models.
Let g(mu) = lp
, where lp
is the linear predictor, and g
is the link
function. Assume that we have calculated the derivatives of the log-likelihood wrt mu
.
This function uses the chain rule to calculate the derivatives of the log-likelihood wrt
lp
. See trind.generator
for array packing conventions.
gamlss.etamu(l1, l2, l3 = NULL, l4 = NULL, ig1, g2, g3 = NULL,
g4 = NULL, i2, i3 = NULL, i4 = NULL, deriv = 0)
array of 1st order derivatives of log-likelihood wrt mu.
array of 2nd order derivatives of log-likelihood wrt mu.
array of 3rd order derivatives of log-likelihood wrt mu.
array of 4th order derivatives of log-likelihood wrt mu.
reciprocal of the first derivative of the link function wrt the linear predictor.
array containing the 2nd order derivative of the link function wrt the linear predictor.
array containing the 3rd order derivative of the link function wrt the linear predictor.
array containing the 4th order derivative of the link function wrt the linear predictor.
two-dimensional index array, such that l2[,i2[i,j]]
contains the partial w.r.t. params
indexed by i,j with no restriction on the index values (except that they are in 1,...,ncol(l1)).
third-dimensional index array, such that l3[,i3[i,j,k]]
contains the partial w.r.t. params
indexed by i,j,k.
third-dimensional index array, such that l4[,i4[i,j,k,l]]
contains the partial w.r.t. params
indexed by i,j,k,l.
if deriv==0
only first and second order derivatives will be calculated. If
deriv==1
the function goes up to 3rd order, and if deriv==2
it provides
also 4th order derivatives.
A list where the arrays l1
, l2
, l3
, l4
contain the derivatives (up
to order four) of the log-likelihood wrt the linear predictor.