Learn R Programming

loo (version 0.1.0)

vgislw: VGIS: Very good importance sampling

Description

VGIS: Very good importance sampling

Usage

vgislw(lw, wcp = 0.2, thresh = 100, kmax = 2, wtrunc = 3/4,
  cores = parallel::detectCores())

Arguments

lw
a matrix or vector of log weights. For for computing LOO lw = -log_lik (see extract_log_lik) and is an $S$ by $N$ matrix where $S$ is the number of simulations and $N$ is the number of
wcp
the proportion of importance weights to use for the generalized Pareto fit. The 100*wcp% largest weights are used as the sample from which to estimate the parameters of the generalized Pareto distribution.
thresh
when used for the generalized pareto fit, the largest 100*wcp% of the importance weights are modified according to pmax(x, max(x) - thresh) for numerical stability.
kmax
maximum allowed value for the generalized Pareto shape parameter $k$.
wtrunc
for truncating very large weights to $S$^wtrunc. Set to zero for no truncation.
cores
the number of cores to use for parallelization.

Value

  • A named with list with components lw_smooth (modified log weights) and pareto_k (estimated generalized Pareto shape parameters $k$).

Details

See the 'VGIS-LOO' section in loo-package.

See Also

loo-package, loo_and_waic