Minus the Log Likelihood for an Aster model, and its first and second
derivative. This function is called inside aster.
Users generally do not need to call it directly.
parameter value (vector of regression coefficients)
where we evaluate the log likelihood, etc.
We also refer to length(parm) as ncoef.
pred
integer vector determining the graph.
pred[j] is the index of the predecessor of
the node with index j unless the predecessor is a root
node, in which case pred[j] == 0.
We also refer to length(pred) as nnode.
fam
an integer vector of length nnode determining
the exponential family structure of the aster model. Each element
is an index into the vector of family specifications given by
the argument famlist.
x
the response. If a matrix, rows are individuals, and columns are
variables (nodes of graphical model). So ncol(x) == nnode and
we also refer to nrow(x) as nind. If not a matrix, then
x must be as if it were such a matrix and then dimension
information removed by x = as.numeric(x).
root
A matrix or vector like x.
Data root[i, j] is the data for the founder that is
the predecessor of the response x[i, j]
and is ignored when pred[j] > 0.
modmat
a three-dimensional array, nind by nnode by
ncoef, the model matrix. Or a matrix, nind * nnode by
ncoef (when x and root are one-dimensional
of length nind * nnode).
deriv
derivative wanted: 0, 1, or 2.
type
type of model. The value of this argument can be abbreviated.
famlist
a list of family specifications (see families).
origin
Distinguished point in parameter space. May be missing,
in which case an unspecified default is provided. See aster
for further explanation.
origin.type
Parameter space in which specified distinguished point
is located. If "conditional" then argument "origin" is
a conditional canonical parameter value.
If "unconditional" then argument "origin" is
an unconditional canonical parameter value.
If "model.type" then the type is taken from argument "type".
The value of this argument can be abbreviated.
Value
a list containing some of the following components:
value
minus the log likelihood.
gradient
minus the first derivative vector of the log likelihood
(minus the score).
hessian
minus the second derivative matrix of the log likelihood
(observed Fisher information).