kCompute {bisque} | R Documentation |
This function integrates (unnormalized) densities and may be used to compute integration constants for unnormalized densities, or to marginalize a joint density, for example.
kCompute( f, init, method = "BFGS", maxit = 10000, level = 2, log = FALSE, link = NULL, linkparams = NULL, quadError = FALSE, ... )
f |
(Unnormalized) density to integrate.
the function f should include an argument |
init |
Initial guess for the density's mode |
method |
method to be used to search for the density's mode |
maxit |
maximum number of iterations |
level |
accuracy level (typically number of grid points for the underlying 1D quadrature rule) [description from mvQuad::createNIGrid] |
log |
TRUE to return log of integration constant |
link |
character vector that specifies transformations used during
optimization and integration of f(theta2 | X). while theta2 may be
defined on arbitrary support, |
linkparams |
Optional list of additional parameters for link functions. For example, the logit function can be extended to allow mappings to any closed interval. There should be one list entry for each link function. Specify NA if no additional arguments are passed. |
quadError |
TRUE if integration nodes and weight should be computed for
the |
... |
additional arguments to pass to |
kCompute(dgamma, init = 1, shape=2, link='log', level = 5)