Description Usage Arguments Value Examples
Given a posterior of MCMC samples from a BayesTraits analysis (a logfile - typically with the .log.txt extension) and the name of one or morea parameters present in that logfile this will return the mean, median, mode and standard deviation of the parameter estimates.
1 | getPostStats(logfile, params, thinning = 1, burnin = 0)
|
logfile |
The name of the logfile of the BayesTraits analysis. |
params |
The name(s) of one or more parameters present in the logfile. |
thinning |
Thinning parameter for the posterior - defaults to 1 (all samples). 2 uses every second sample, 3 every third and so on. |
burnin |
The number of generations to remove from the start of the chain as burnin. Use if the chain has not reached convergence before sampling began. Useful if the burnin parameter for the analysis itself was not long enough. |
An object of class data.frame with a row for each parameter, and columns for the mean, median, mode and standard deviation of those parameters.
1 2 3 | params <- getParams("cool-data.log.txt")
getPostMean("cool-data.log.txt", params[c(2:5)]
getPostMean("cool-data.log.txt", "Lh")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.