zeroTest: zeroTest

Description Usage Arguments Examples

View source: R/zeroTest.R

Description

Takes a parameter and plots the posterior as a histogram with values >0 one colour and values <0 another. If plot is turned off a table is returned instead, which has, in decimal form, the fraction of values <0 and the fraction >0.

Usage

1
2
zeroTest(logfile, pars, cols = 2, plot = TRUE, value = 0, thinning = 1,
  burnin = 0)

Arguments

logfile

The name of the BayesTraits output logfile.

pars

A vector of parameters to plot/summarise

cols

The number of columns to plot into (if number of pars >1)

plot

If true, a histogram coloured according to value is plotted. If false, a table summarising the posterior with respect to value is printed to screen.

value

The value against which to test (defaults to zero)

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.

Examples

1
2
3
4
zeroTest("cool-data.log", "Alpha")
zeroTest("cool-data.log", c("Alpha", "Beta.2"))
zeroTest("cool-data.log", "Lambda", value = 0.5)
zeroTest("cool-data.log", "Lambda", value = 0.5, plot = FALSE)

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