InferenceController

Overview:

class epipi.InferenceController(theta, omega, kernel=[], prior=None, random_seed=None, **kwargs)[source]

A class to contain the inference process

Parameters:

thetalist

A list containing the prevalence data

omegalist

A list containing the PCR positive probability

kernellist

A list containing the kernel data

Kernel is defined since the model will not have enough information to infer the data at the end of time series. The values in the kernel is used to overwrite the poorly predicted values at the end of the time series.

priorlist of Prior objects

A list containing customised prior for parameters in inference

random_seedint

A random seed for reproducibility

kwargsdict

Keyword arguments for the stan model

run()[source]

Method to run the MCMC sampling and return the fit object.

Output:

fitstan fit object

The fit object returned by the MCMC sampling, how to use this object can be found in the documentation of stan

samplesarviz InferenceData object

The samples obejct returned by arviz package, detailed documentation can be found in the documentation of arviz