getPostStats: getPostStats

Description Usage Arguments Value Examples

View source: R/summaryFunctions.R

Description

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.

Usage

1
getPostStats(logfile, parameter, ...)

Arguments

logfile

The name of the logfile of the BayesTraits analysis, or an object of class "bt_post" (see loadPosterior)

parameter

The name(s) of one or more parameters present in the logfile.

...

Additional arguments passed to loadPosterior.

Value

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.

Examples

1
2
3
params <- getParams("cool-data.log.txt")
getPostMean("cool-data.log.txt", params[c(2:5)]
getPostMean("cool-data.log.txt", "Lh")

hferg/BTprocessR documentation built on March 8, 2020, 11:45 a.m.