contourProb: Contour Probability

View source: R/contourProb.R

contourProbR Documentation

Contour Probability

Description

Calculation of a contour probability (possible Bayesian counterpart of a p-value) based on the MCMC posterior sample for a univariate parameter corresponding to the equal-tail credible interval.

For details, see Bogaerts, Komárek and Lesaffre (201X, Sec. 9.1.4.2).

Usage

contourProb(sample, theta0 = 0)

Arguments

sample

a numeric vector with the MCMC sample from the posterior distribution of a univariate parameter.

theta0

a value of the parameter to which the contour probability is to be related.

Value

A value of the contour probability.

Author(s)

Arnošt Komárek arnost.komarek@mff.cuni.cz

References

Bogaerts, K., Komárek, A. and Lesaffre, E. (201X). Survival Analysis with Interval-Censored Data: A Practical Approach. Boca Raton: Chapman and Hall/CRC.

See Also

PGM, ictest.

Examples

set.seed(20170127)
sample <- rnorm(1000, mean = 2, sd = 1)
contourProb(sample)
contourProb(sample, theta0 = 2)

icensBKL documentation built on Sept. 19, 2022, 5:06 p.m.