Description Usage Arguments Value Author(s) References Examples
View source: R/thin-phybreak.R
The function removes (all or some) posterior samples by thinning and/or removing the first part of the chain, but keeps the state of variables and parameters intact.
1 | thin_phybreak(x, thin = 1, nkeep = Inf)
|
x |
An object of class |
thin |
The thinning interval to use. |
nkeep |
the number of most recent samples to keep. If |
The phybreak
-object provided as input, but with fewer posterior samples.
Don Klinkenberg don@xs4all.nl
Klinkenberg et al. (2017) Simultaneous inference of phylogenetic and transmission trees in infectious disease outbreaks. PLoS Comput Biol, 13(5): e1005495.
1 2 3 4 5 6 7 | #First create a phybreak-object
simulation <- sim.phybreak(obsize = 5)
MCMCstate <- phybreak(data = simulation$sequences, times = simulation$sample.times)
MCMCstate <- burnin.phybreak(MCMCstate, ncycles = 20)
MCMCstate <- sample.phybreak(MCMCstate, nsample = 50, thin = 2)
MCMCstate <- thin_phybreak(MCMCstate, thin = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.