epidemicImportanceSampler: Importance Sampling with known epidemic parameters Epidemic...

Description Usage Details

View source: R/Importance Sampler.R

Description

The process is assumed to evolve according to parameters \theta

Usage

1
epidemicImportanceSampler(panelData, obsTimes, theta, Nparticles)

Details

Observed Panel Data y_t ; t \in (t_1, t_2, ..., t_k) y_t is the infectious state of a sample of size m from the population y_t are independent conditional on the epidemic process at time t. We would like to receive samples from the posterior distribution

\pi

(x_0:t| y_1:t) \propto \pi(y_1:t| x_0:t) \pi(x_0:t)

Do this via importance sampling

1. Propose $x^i$ \sim q() (This is a particle) 2. Calculate importance weight \omega(x^i) (Although this is not possible is cannot calculate \pi(y_1:t)) 3. Repeat 1-2 N times 4. Calculate Normalised weights \tilde\omega(x^i) (This is possible without \pi(y_1:t)) 5. Use this weighted sample to estimate integrals involving posterior distribution. weights \omega are the ratio of the posterior and proposal, measuring the difference telling us how representative the sample is to the posterior. If proposals were made directly from the posterior, all weights would be 1. Diagnostic of the Importance Sampler Effective Sample Size

$$ ESS := 1/sum_i = 1^N \tilde\omega(x^i)^2 $$

How many direct posterior samples the sample obtained through importance sampling is worth

If sampled directly from the posterior, all weights would be 1

The epidemic process is easily simulated using the Gillespie algorithm. This means using a proposal distribution of the form q() = \pi(x_(0:t)|\theta) is trival. Although this is not really informed by the data = (Can we bias simulation of particle x^i according to y?) = 1. Simulate N particles $x^i$ \sim q() (This is a particle) 2. Calculate Likelihood (which is the main component of the weights) extract panel data from particles 3. Calculate Normalised weights \tilde\omega(x^i) 4. Use this weighted sample to estimate integrals involving posterior distribution.


JMacDonaldPhD/Epidemics documentation built on Jan. 10, 2020, 2:48 a.m.