Learn R Programming

icensBKL (version 1.5)

contourProb: 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)

Value

A value of the contour probability.

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.

Author

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

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

Run the code above in your browser using DataLab