compPosts: compPosts

Description Usage Arguments Examples

Description

Compares histograms of one or more parameters from the same output file, or one parameter from one or more output files. Generates a plot showing the distributions of the same parameter from two posterior samples from BayesTraits MCMC OR a plot showing the distribution of two different parameters from a single BayesTraits posterior.

Usage

1
2
compPosts(logs, pars, thinning = 1, burnin = 0, alpha = 0.5,
  fontsize = 3)

Arguments

logs

The name of the trait data file on which BayesTraits was run, or a vector of >1 names if comparing between >1 logs.

pars

A vector containing the names of two parameters to be compared. Must be a single parameter if comparing between two logs. To see which parameters are present in a posterior use getParams.

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.

Examples

1
2
plotPosterior(cool-data.txt, c("Lh", "Alpha 1"))
plotPosterior(cool-data.txt, params[c(1:2)])

hferg/bayestraitr documentation built on May 28, 2019, 8:55 p.m.