getMatrixHPD.boa: Calculate HPD of a set of parameters

Description Usage Arguments Details Value

View source: R/log_utils.R

Description

Get HPD of a matrix of values e.g. a skyline

Usage

1
getMatrixHPD.boa(data, margin = 2, dataframe = TRUE, ...)

Arguments

data

The samples from the posterior. Can be in a data frame or in a matrix. By default the function assumes that each row represents a sample from the posterior and each column a parameter.

margin

If the data are formatted with samples in columns set margin to 1.

dataframe

If TRUE return output as a data frame, otherwise a matrix.

...

Parameters to be passed to getHPD().

Details

Uses Chen and Shao algorithm as implemented in boa package.

Value

3xn matrix or data frame where each column is c(lower, median, upper) for each parameter in turn.


laduplessis/beastio documentation built on Dec. 14, 2021, 7:04 p.m.