gaussapprox: Compute a Gaussian approximation to a density

Description Usage Arguments

View source: R/gaussapprox.R

Description

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.

Usage

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

Arguments

logf

log of the density for which an approximation should be built.

init

initial guess for mode of logf

method

method to be used in stats::optim

optim.output

TRUE to return output from stats::optim

lower

lower bound value to pass to stats::optim

upper

upper bound value to pass to stats::optim

control

control list to pass to stats::optim


jmhewitt/dsdive documentation built on May 29, 2020, 5:18 p.m.