Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hpd

Computing Highest Posterior Density (HPD) Intervals


Description

Compute approximate HPD intervals out of MCMC-samples in BayesX

Usage

hpd(data, alpha = 0.05, ...)
hpd.coda(data, alpha = 0.05)

Arguments

data

Either the name of a file or a data frame containing the sample.

alpha

A numeric scalar in the interval (0,1) such that 1 - alpha is the target probability content of the intervals.. The default is alpha = 0.05.

...

Further parameters to be passed to the internal call of optim and integrate.

Details

hpd computes the HPD interval based on a kernel density estimate of the samples. hpd.coda computes the HPD interval with the function HPDinterval available in package coda.

Author(s)

Nadja Klein

Examples

res <- read.table(system.file("examples/nonparametric_f_x_pspline_sample.raw",
  package="BayesX"), header = TRUE)
hpd(res)
hpd.coda(res)

BayesX

R Utilities Accompanying the Software Package BayesX

v0.3-1
GPL-2 | GPL-3
Authors
Nikolaus Umlauf [aut, cre], Thomas Kneib [aut], Nadja Klein [aut], Felix Heinzl [ctb], Andreas Brezger [ctb], Daniel Sabanes Bove [ctb]
Initial release
2019-08-23

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.