quantile.phybreak: Quantiles of sampled parameter values.

Description Usage Arguments Value Author(s) References Examples

View source: R/quantile_phybreak.R

Description

Quantiles of sampled parameter values.

Usage

1
2
3
## S3 method for class 'phybreak'
quantile(x, whichpars = "posterior",
  probs = c(0.025, 0.5, 0.975), type = 7, ...)

Arguments

whichpars

Which parameters to return. Either a vector with parameter names, or "all" for all parameters, or "posterior" for parameters for which a posterior is sampled.

probs

Numeric vector of probabilities with values in [0,1].

type

An integer between 1 and 9 selecting one of the nine quantile algorithms (see quantile).

Value

A named matrix with desired quantiles. For parameters that are not estimated, all quantiles give the fixed value.

Author(s)

Don Klinkenberg don@xs4all.nl

References

Klinkenberg et al. (2017) Simultaneous inference of phylogenetic and transmission trees in infectious disease outbreaks. PLoS Comput Biol, 13(5): e1005495.

Examples

1
2
3
4
5
6
7
#First build a phybreak-object.
simulation <- sim_phybreak(obsize = 5)
MCMCstate <- phybreak(data = simulation)
MCMCstate <- burnin_phybreak(MCMCstate, ncycles = 20)
MCMCstate <- sample_phybreak(MCMCstate, nsample = 100)

quantile(MCMCstate)

donkeyshot/phybreak documentation built on Sept. 17, 2021, 9:32 p.m.