|
a |
|
b/man/outbreaker_chains.Rd |
|
|
1 |
% Generated by roxygen2: do not edit by hand |
|
|
2 |
% Please edit documentation in R/outbreaker_chains_methods.R |
|
|
3 |
\name{print.outbreaker_chains} |
|
|
4 |
\alias{print.outbreaker_chains} |
|
|
5 |
\alias{outbreaker_chains} |
|
|
6 |
\alias{plot.outbreaker_chains} |
|
|
7 |
\alias{summary.outbreaker_chains} |
|
|
8 |
\title{Basic methods for processing outbreaker results} |
|
|
9 |
\usage{ |
|
|
10 |
\method{print}{outbreaker_chains}(x, n_row = 3, n_col = 8, ...) |
|
|
11 |
|
|
|
12 |
\method{plot}{outbreaker_chains}( |
|
|
13 |
x, |
|
|
14 |
y = "post", |
|
|
15 |
type = c("trace", "hist", "density", "alpha", "t_inf", "kappa", "network"), |
|
|
16 |
group = NULL, |
|
|
17 |
burnin = 0, |
|
|
18 |
min_support = 0.1, |
|
|
19 |
labels = NULL, |
|
|
20 |
... |
|
|
21 |
) |
|
|
22 |
|
|
|
23 |
\method{summary}{outbreaker_chains}(object, burnin = 0, method = c("mpa", "decycle"), ...) |
|
|
24 |
} |
|
|
25 |
\arguments{ |
|
|
26 |
\item{x}{an \code{outbreaker_chains} object as returned by \code{outbreaker}.} |
|
|
27 |
|
|
|
28 |
\item{n_row}{the number of rows to display in head and tail; defaults to 3.} |
|
|
29 |
|
|
|
30 |
\item{n_col}{the number of columns to display; defaults to 8.} |
|
|
31 |
|
|
|
32 |
\item{...}{further arguments to be passed to other methods} |
|
|
33 |
|
|
|
34 |
\item{y}{a character string indicating which element of an |
|
|
35 |
\code{outbreaker_chains} object to plot} |
|
|
36 |
|
|
|
37 |
\item{type}{a character string indicating the kind of plot to be used (see details)} |
|
|
38 |
|
|
|
39 |
\item{group}{a vector of character strings indicating the parameters to display, |
|
|
40 |
or "all" to display all global parameters (non node-specific parameters).} |
|
|
41 |
|
|
|
42 |
\item{burnin}{the number of iterations to be discarded as burnin} |
|
|
43 |
|
|
|
44 |
\item{min_support}{a number between 0 and 1 indicating the minimum support of |
|
|
45 |
ancestries to be plotted; only used if 'type' is 'network'} |
|
|
46 |
|
|
|
47 |
\item{labels}{a vector of length N indicating the case labels (must be |
|
|
48 |
provided in the same order used for dates of symptom onset)} |
|
|
49 |
|
|
|
50 |
\item{object}{an \code{outbreaker_chains} object as returned by \code{outbreaker}.} |
|
|
51 |
|
|
|
52 |
\item{method}{the method used to determine consensus ancestries. 'mpa' |
|
|
53 |
(maximum posterior ancestry) simply returns the posterior ancestry with the |
|
|
54 |
highest posterior support for each case, even if this includes |
|
|
55 |
cycles. 'decycle' will return the maximum posterior ancestry, except when |
|
|
56 |
cycles are detected, in which case the link in the cycle with the lowest |
|
|
57 |
support is pruned and the tree recalculated.} |
|
|
58 |
} |
|
|
59 |
\description{ |
|
|
60 |
Several methods are defined for instances of the class |
|
|
61 |
\code{outbreaker_chains}, returned by \code{\link{outbreaker}}, including: |
|
|
62 |
\code{print}, \code{plot}, \code{summary} |
|
|
63 |
} |
|
|
64 |
\details{ |
|
|
65 |
\code{type} indicates the type of graphic to plot: |
|
|
66 |
|
|
|
67 |
\itemize{ |
|
|
68 |
|
|
|
69 |
\item \code{trace} to visualise MCMC traces for parameters or augmented data (plots the |
|
|
70 |
log-likelihood by default) |
|
|
71 |
|
|
|
72 |
\item \code{hist} to plot histograms of quantitative values |
|
|
73 |
|
|
|
74 |
\item \code{density} to plot kernel density estimations of quantitative values |
|
|
75 |
|
|
|
76 |
\item \code{alpha} to visualise the posterior frequency of ancestries |
|
|
77 |
|
|
|
78 |
\item \code{network} to visualise the transmission tree; note that |
|
|
79 |
this opens up an interactive plot and requires a web browser with |
|
|
80 |
Javascript enabled; the argument `min_support` is useful to select only the |
|
|
81 |
most supported ancestries and avoid displaying too many links |
|
|
82 |
|
|
|
83 |
\item \code{kappa} to visualise the distributions generations between cases and their |
|
|
84 |
ancestor/infector |
|
|
85 |
|
|
|
86 |
} |
|
|
87 |
} |
|
|
88 |
\seealso{ |
|
|
89 |
See \href{http://www.repidemicsconsortium.org/outbreaker2/articles/introduction.html#graphics}{introduction vignette} for detailed examples on how to visualise \code{outbreaker_chains} objects. |
|
|
90 |
} |
|
|
91 |
\author{ |
|
|
92 |
Thibaut Jombart (\email{thibautjombart@gmail.com}) |
|
|
93 |
} |