outbreaker_chains: Basic methods for processing outbreaker results

Description Usage Arguments Details Value Author(s)

Description

Several methods are defined for instances of the class outbreaker_chains, returned by outbreaker, including: print, plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S3 method for class 'outbreaker_chains'
print(x, n_row = 3, n_col = 8, type = "chain", ...)

## S3 method for class 'outbreaker_chains'
plot(
  x,
  y = "post",
  type = c("trace", "hist", "density", "cluster", "alpha", "t_inf", "kappa", "network"),
  burnin = 0,
  min_support = 0.1,
  labels = NULL,
  group_cluster = NULL,
  ...
)

## S3 method for class 'outbreaker_chains'
summary(object, burnin = 0, group_cluster = NULL, ...)

Arguments

x

an outbreaker_chains object as returned by outbreaker.

n_row

the number of rows to display in head and tail; defaults to 3.

n_col

the number of columns to display; defaults to 8.

type

a character string indicating the kind of plot to be used (see details)

...

further arguments to be passed to other methods

y

a character string indicating which element of an outbreaker_chains object to plot

burnin

the number of iterations to be discarded as burnin

min_support

a number between 0 and 1 indicating the minimum support of ancestries to be plotted; only used if 'type' is 'network'

labels

a vector of length N indicating the case labels (must be provided in the same order used for dates of symptom onset)

group_cluster

a numeric vector indicating the breaks to aggregate the cluster size distribution.

object

an outbreaker_chains object as returned by outbreaker.

Details

type indicates the type of graphic to plot:

Value

The form of the value returned by plot depends on the type. If the type is set as network, plot returns a visNetwork object containing the details of the inferred transmission trees. Otherwise, it returns a ggplot object containing the elements of the plot.

The function summary returns a list containing 9 elements:

Author(s)

Initial version by Thibaut Jombart, rewritten by Alexis Robert (alexis.robert@lshtm.ac.uk)


o2geosocial documentation built on Sept. 11, 2021, 9:07 a.m.