jntCBOM: Montiel Olea and Plagborg-Moller (2018) confidence bands

Description Usage Arguments Value Examples

View source: R/Functions.R

Description

jntCBOM implements calibrated symmetric confidence bands (algorithm 2) in Montiel Olea and Plagborg-Moller (2018).

Usage

1
jntCBOM(DF, DFmat, alpha = 0.05, eps = 0.001)

Arguments

DF

the target distribution/quantile function as a vector

DFmat

the matrix of draws of the distribution, rows correspond to indices elements in DF

alpha

level such that 1-alpha is the desired probability of coverage

eps

steps by which the grid on 1-alpha:alpha/2 is searched.

Value

CB - confidence band, zeta - the optimal level

Examples

1
2
3
4
set.seed(14); m=matrix(rbeta(500,1,4),nrow = 5) + 1:5
DF = apply(m,1,mean); plot(1:5,DF,type="l",ylim = c(min(m),max(m)), xlab = "Index")
jOMCB<- jntCBOM(DF,DFmat = m)
lines(1:5,jOMCB$CB[,1],lty=2); lines(1:5,jOMCB$CB[,2],lty=2)

bayesdistreg documentation built on May 1, 2019, 8:03 p.m.