Computes a Gaussian approximation to the target density logf
, and
additionally return methods to aid in sampling from the approximation. The
approximation is computed numerically via the stats::optim
routine.
1 2 3 4 5 6 7 8 9 | gaussapprox(
logf,
init,
method = "BFGS",
optim.output = FALSE,
lower = -Inf,
upper = Inf,
control = list(fnscale = -1)
)
|
logf |
log of the density for which an approximation should be built. |
init |
initial guess for mode of |
method |
method to be used in |
optim.output |
|
lower |
lower bound value to pass to |
upper |
upper bound value to pass to |
control |
control list to pass to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.