getPostStats: getPostStats

Description Usage Arguments Value Examples

View source: R/getPostMean.R

Description

A function to retuen the mean and SD of the posterior of one or more parameters from a BayesTraits analysis.

Usage

1
getPostStats(logfile, params, thinning = 1, burnin = 0)

Arguments

logfile

The name of the logfile from a BayesTraits analysis.

params

A vector of one or more parameters of interests (e.g. a subset of getParams output)

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.

Value

A data frame of 3 columns, the parameter name, the mean of the parameter and its standard deviation.

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/btrtools documentation built on May 17, 2019, 3:56 p.m.