fitAbn.bayes
.Function for computing marginal posterior densities using C and is called from fit.dag() Only to be called internally.
getmarginals(
res.list,
data.df,
dag.m,
var.types,
max.parents,
mean,
prec,
loggam.shape,
loggam.inv.scale,
max.iters,
epsabs,
verbose,
error.verbose,
trace,
grouped.vars,
group.ids,
epsabs.inner,
max.iters.inner,
finite.step.size,
hessian.params,
max.iters.hessian,
min.pdf,
marginal.node,
marginal.param,
variate.vec,
n.grid,
INLA.marginals,
iter.max,
max.hessian.error,
factor.brent,
maxiters.hessian.brent,
num.intervals.brent
)
A named list with "modes", "error.code", "hessian.accuracy", "error.code.desc", "mliknode", "mlik", "mse", "coef", "used.INLA", "marginals".
rest of arguments as for call to C fitabn
a data frame containing the data used for learning the network, binary variables must be declared as factors, and no missing values all allowed in any variable.
adjacency matrix
distributions in terms of a numeric code
max number of parents over all nodes in dag (different from other max.parents
definitions).
the prior mean for all the Gaussian additive terms for each node. INLA argument control.fixed=list(mean.intercept=...)
and control.fixed=list(mean=...)
.
the prior precision (\(\tau = \frac{1}{\sigma^2}\)) for all the Gaussian additive term for each node. INLA argument control.fixed=list(prec.intercept=...)
and control.fixed=list(prec=...)
.
the shape parameter in the Gamma distribution prior for the precision in a Gaussian node. INLA argument control.family=list(hyper = list(prec = list(prior="loggamma",param=c(loggam.shape, loggam.inv.scale))))
.
the inverse scale parameter in the Gamma distribution prior for the precision in a Gaussian node. INLA argument control.family=list(hyper = list(prec = list(prior="loggamma",param=c(loggam.shape, loggam.inv.scale))))
.
total number of iterations allowed when estimating the modes in Laplace approximation. passed to .Call("fit_single_node", ...)
.
absolute error when estimating the modes in Laplace approximation for models with no random effects. Passed to .Call("fit_single_node", ...)
.
if TRUE
then provides some additional output, in particular the code used to call INLA, if applicable.
logical, additional output in the case of errors occurring in the optimization. Passed to .Call("fit_single_node", ...)
.
Non-negative integer. If positive, tracing information on the progress of the "L-BFGS-B" optimization is produced. Higher values may produce more tracing information. (There are six levels of tracing. To understand exactly what these do see the source code.). Passed to .Call("fit_single_node", ...)
.
result returned from check.valid.groups
. Column indexes of all variables which are affected from grouping effect.
result returned from check.valid.groups
. Vector of group allocation for each observation (row) in 'data.df'.
absolute error in the maximization step in the (nested) Laplace approximation for each random effect term. Passed to .Call("fit_single_node", ...)
.
total number of iterations in the maximization step in the nested Laplace approximation. Passed to .Call("fit_single_node", ...)
.
suggested step length used in finite difference estimation of the derivatives for the (outer) Laplace approximation when estimating modes. Passed to .Call("fit_single_node", ...)
.
a numeric vector giving parameters for the adaptive algorithm, which determines the optimal stepsize in the finite-difference estimation of the hessian. First entry is the initial guess, second entry absolute error. Passed to .Call("fit_single_node", ...)
.
integer, maximum number of iterations to use when determining an optimal finite difference approximation (Nelder-Mead). Passed to .Call("fit_single_node", ...)
.
the value of the posterior density function below which we stop the estimation only used when computing marginals, see details.
used in conjunction with marginal.param
to allow bespoke estimate of a marginal density over a specific grid. value from 1 to the number of nodes.
used in conjunction with marginal.node
. value of 1 is for intercept, see modes entry in results for the appropriate number.
a vector containing the places to evaluate the posterior marginal density, must be supplied if marginal.node
is not null.
recompute density on an equally spaced grid with n.grid
points.
vector - TRUE if INLA used false otherwise
same as max.iters
in fit.control
. Total number of iterations allowed when estimating the modes in Laplace approximation. Passed to .Call("fit_single_node", ...).
if the estimated log marginal likelihood when using an adaptive 5pt finite-difference rule for the Hessian differs by more than max.hessian.error
from when using an adaptive 3pt rule then continue to minimize the local error by switching to the Brent-Dekker root bracketing method. Passed to .Call("fit_single_node", ...)
.
if using Brent-Dekker root bracketing method then define the outer most interval end points as the best estimate of \(h\) (stepsize) from the Nelder-Mead as \(h/factor.brent,h*factor.brent)\). Passed to .Call("fit_single_node", ...)
.
maximum number of iterations allowed in the Brent-Dekker method. Passed to .Call("fit_single_node", ...)
.
the number of initial different bracket segments to try in the Brent-Dekker method. Passed to .Call("fit_single_node", ...)
.
Other Bayes:
buildScoreCache()
,
calc.node.inla.glm()
,
calc.node.inla.glmm()
,
fitAbn()