adapt_IS: Importance Sampler Adaptation

View source: R/adapt_IS.R

adapt_ISR Documentation

Importance Sampler Adaptation

Description

Adapts the number of particles used in a given Importance sampler to give adequate performance.

Usage

adapt_IS(N0, IS_estimator, param, no_samples = 10000)

Arguments

N0

Initial number of particles.

IS_estimator

A function which carries out Importance sampling.

param

A list of epidemic and observational parameters to be passed on to IS_estimator

no_samples

Number of IS estimates calculated to estimate the variance of the IS estimator.

Value

Returns number of particles which gives adequate variance of the log-estimate.


JMacDonaldPhD/REpi documentation built on Aug. 2, 2022, 2:09 p.m.