mlogl {aster}R Documentation

Minus Log Likelihood for Aster Models

Description

Minus the Log Likelihood for an Aster model, and its first and second derivative. This function is called inside aster. Users should not need to call it themselves unless they are doing something the package is not designed to do.

Usage

mlogl(parm, pred, fam, x, root, modmat, deriv = 0,
    type = c("unconditional", "conditional"))

Arguments

parm 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 integer vector of length nnode determining the one-parameter exponential family associated with each node of the graph. An index into the vector of family names returned by families.
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 p(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.

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).

[Package aster version 0.4-1 Index]