View source: R/importance_sampling.R
importance_sampling | R Documentation |
A parent class for different importance sampling methods.
importance_sampling(log_ratios, method, ...)
## S3 method for class 'array'
importance_sampling(
log_ratios,
method,
...,
r_eff = 1,
cores = getOption("mc.cores", 1)
)
## S3 method for class 'matrix'
importance_sampling(
log_ratios,
method,
...,
r_eff = 1,
cores = getOption("mc.cores", 1)
)
## Default S3 method:
importance_sampling(log_ratios, method, ..., r_eff = 1)
log_ratios |
An array, matrix, or vector of importance ratios on the log scale (for PSIS-LOO these are negative log-likelihood values). See the Methods (by class) section below for a detailed description of how to specify the inputs for each method. |
method |
The importance sampling method to use. The following methods are implemented:
|
... |
Arguments passed on to the various methods. |
r_eff |
Vector of relative effective sample size estimates containing
one element per observation. The values provided should be the relative
effective sample sizes of |
cores |
The number of cores to use for parallelization. This defaults to
the option
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.