R/quant.R

# quant calculates the posterior quantile of the true value of theta
quant <- function (draws) {
	n<-length(draws)
	rank.theta <- c(1:n)[order(draws)==1] - 1
	quantile.theta <- (rank.theta +.5) / n
	return(quantile.theta) }

Try the BayesValidate package in your browser

Any scripts or data that you put into this service are public.

BayesValidate documentation built on May 1, 2019, 8:07 p.m.