View source: R/coalescentMCMC.R
subset.coalescentMCMC | R Documentation |
This function helps to manipulate outputs from
coalescentMCMC
, particularly it sets the attributes
correctly (unlike if you would use [
).
## S3 method for class 'coalescentMCMC' subset(x, burnin = 1000, thinning = 10, end = NULL, ...)
x |
an object of class |
burnin |
an integer: the number of generations to drop. |
thinning |
an integer: the sampling frequency. |
end |
an integer: the generations after |
... |
(unused) |
This function has more or less the same effect than the standard
indexing operator ([
). The main difference is that the
attributes attached to the output from coalescentMCMC
are not lost.
The options end
may help to focus on one part of the MCMC (see
examples).
an object of class "coalescentMCMC"
.
The default values of burnin
and thinning
are only
indicative: it is recommended to use functions in the package
coda to help find appropriate values (see examples).
Emmanuel Paradis
acfplot
, effectiveSize
## Not run: data(woodmouse) res <- coalescentMCMC(woodmouse, 1e6, moves = c(1, 3)) # ~ 1 hr plot(res) # surely hard to read plot(subset(res, end = 1e3)) # plot only the first 1000 generations acfplot(res) acfplot(subset(res, 1e4, 100)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.