plot.atwins {surveillance}R Documentation

Plots for Fitted algo.twins Models

Description

Plot results of fitting a twins model using MCMC output. Plots similar to those in the Held et al. (2006) paper are generated.

Usage

  ## S3 method for class 'atwins'
plot(x, which=c(1,4,6,7), ask=TRUE, ...) 

Arguments

x

An object of class "atwins" as returned by algo.twins.

which

a vector containing the different plot types to show

1

A plot of the observed time series Z is shown together with posterior means for the number of endemic cases (X) and number of epidemic cases (Y).

2

This plot shows trace plots of the gamma parameters over all MCMC samples.

3

This shows a trace plot of psi, which controls the overdispersion in the model.

4

Autocorrelation functions for K and psi are shown in order to judge whether the MCMC sampler has converged.

5

Shows a plot of the posterior mean of the seasonal model nu[t] together with 95% credibility intervals based on the quantiles of the posterior.

6

Histograms illustrating the posterior density for K and psi. The first one corresponds to Fig. 4(f) in the paper.

7

Histograms illustrating the predictive posterior density for the next observed number of cases Z[n+1]. Compare with Fig.5 in the paper.

ask

Boolean indicating whether to ask for a newline before showing the next plot (only if multiple are shown).

...

Additional arguments for stsplot_time, used for plot type 1.

Details

For details see the plots in the paper. Basically MCMC output is visualized. This function is experimental, as is algo.twins.

Author(s)

M. Hofmann and M. Höhle

References

Held, L., Hofmann, M., Höhle, M. and Schmid V. (2006) A two-component model for counts of infectious diseases, Biostatistics, 7, pp. 422–437.

See Also

algo.twins (with an example)


[Package surveillance version 1.23.0 Index]