| hpd {BayesX} | R Documentation |
Compute approximate HPD intervals out of MCMC-samples in BayesX
hpd(data, alpha = 0.05, ...) hpd.coda(data, alpha = 0.05, ...)
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 - |
... |
Further parameters to be passed to the internal call of |
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.
Nadja Klein
res <- read.table(system.file("examples/nonparametric_f_x_pspline_sample.raw",
package="BayesX"), header=TRUE)
hpd(res)
hpd.coda(res)