getMarginalZ: Construct a (smooth) marginal z density approximation from a...

Description Usage Arguments Value

View source: R/getMarginalZ.R

Description

Construct a (smooth) marginal z density approximation from a model information list

Usage

1
2
3
4
5
6
getMarginalZ(
  info,
  method = c("linear", "spline", "logspline", "normalspline", "normal"),
  verbose = FALSE,
  plot = FALSE
)

Arguments

info

the model information list

method

method for approximating the marginal density:

linear

Linearly interpolate the points.

spline

The saved points of the unnormalized density approximation are joined by a “monotonic” spline. The density is smoothed out to zero at the tails. Since the spline might be slightly negative for extreme values, the positive part is returned.

logspline

The saved points of the log unnormalized density approximation are joined by a “monotonic” spline, which is then exponentiated.

normalspline

A “monotonic” spline is fitted to the differences of the saved log density values and the log normal approximation. The resulting spline function is exponentiated and then multiplied with the normal density.

normal

Just take the normal approximation.

This may also be a vector with more than one method names, to select the modify the preference sequence: If the first method does not work, the second is tried and so on. The normal approximation always “works” (but may give bad results).

verbose

Echo the chosen method? (not default)

plot

produce plots of the different approximation steps? (not default)

Value

a list with the log of the normalized density approximation (“logDens”) and the random number generator (“gen”).


glmBfp documentation built on July 2, 2020, 2:30 a.m.