effectiveSampleSize: Compute the effective sample size (ESS) of the particles.

Description Usage Arguments Value References Examples

View source: R/RcppExports.R

Description

The ESS is a "rule of thumb" for assessing the degeneracy of the importance distribution:

ESS = \frac{(∑_{q=1}^Q w_q)^2}{∑_{q=1}^Q w_q^2}

Usage

1
effectiveSampleSize(log_weights)

Arguments

log_weights

logarithms of the importance weights of each particle.

Value

the effective sample size, a scalar between 0 and Q

References

Liu, JS (2001) "Monte Carlo Strategies in Scientific Computing." Springer, NY, pp. 34–36.

Examples

1
2

serrsBayes documentation built on June 28, 2021, 5:14 p.m.