Description Objects from the Class Slots Extends Methods See Also Examples
This class holds the results from MCMC inference for SEIR models, i.e. sample paths and provides routines to calculate R0
Objects can be created by calls of the form new("LBInferenceMCMC", paramHat, paramSe, aic, loglik, samplePaths)
.
samplePaths
:Object of class "data.frame"
A
data frame containing the va
paramHat
:Object of class "numeric"
~~
paramSe
:Object of class "numeric"
~~
aic
:Object of class "numeric"
~~
loglik
:Object of class "numeric"
~~
Class "LBInference"
, directly.
signature(object = "LBInferenceMCMC")
: ...
signature(object = "LBInferenceMCMC")
: ...
signature(.Object = "LBInferenceMCMC")
: ...
signature(x = "LBInferenceMCMC", y = "missing")
:
Important is the which
argument
"beta"
CODA diagnostics for the beta parameter
"betabetaN"
Provides a diagnostic plot and HPD interval for the beta/betan ratio.
signature(object = "LBInferenceMCMC")
: Compute the
basic reproduction ratio for each sample. Mean, median, etc. are
then computed.
signature(object = "LBInferenceMCMC")
: get
the sample paths
signature(object = "LBInferenceMCMC")
: as usual
signature(object = "LBInferenceMCMC")
: as usual
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #Load Laevens (1999) data
data("laevens")
#Modify such that the checks at CRAN are only done with a
#minimum sample size (1000 samples, no thin and a burun of 1000).
if (!RLadyBug.options("allExamples")) {
algo(laevens.opts) <- c(1000,1,1000)
}
#Algo part of the Options
algo(laevens.opts)
#Run SEIR model inference
inf.mcmc <- seir(laevens,laevens.opts)
#Results
inf.mcmc
#Analysis through coda (library coda is called when starting RLadyBug)
samples <- mcmc(samplePaths(inf.mcmc))
plot(samples[,"beta"])
#Look at the \beta/\beta_n ratio
ratio <- plot(inf.mcmc,which = "betabetaN")
c(mean=ratio$mean,ratio$hpd)
#R0
quantile(R0(inf.mcmc,laevens),c(0.025,0.5,0.975))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.