Computation of a 1-alpha FAB z-interval

fabzCI(y, mu, t2, s2, alpha = 0.05)

Arguments

y

a numeric scalar

mu

a numeric scalar

t2

a positive numeric scalar

s2

a positive numeric scalar

alpha

the type I error rate, so 1-alpha is the coverage rate

Value

a two-dimensional vector of the left and right endpoints of the interval

Details

A FAB interval is the "frequentist" interval procedure that is Bayes optimal: It minimizes the prior expected interval width among all interval procedures with exact 1-alpha frequentist coverage. This function computes the FAB z-interval for the mean of a normal population with an known variance, given a user-specified prior distribution determined by psi. The prior is that the population mean is normally distributed. Referring to the elements of psi as mu, t2, s2, the prior and population variance are determined as follows:

  1. mu is the prior expectation of the mean

  2. t2 is the prior variance of the mean

  3. s2 is the population variance

Author

Peter Hoff

Examples

y<-0 fabzCI(y,0,10,1)
#> [1] -1.810617 1.810617
fabzCI(y,0,1/10,1)
#> [1] -1.644915 1.644976
fabzCI(y,2,10,1)
#> [1] -1.716378 1.963615
fabzCI(y,0,1/10,1)
#> [1] -1.644915 1.644976