Learn R Programming

fabCI (version 0.2)

fabzCI: FAB z-interval

Description

Computation of a 1-alpha FAB z-interval

Usage

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

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

Examples

Run this code
# NOT RUN {
y<-0
fabzCI(y,0,10,1)
fabzCI(y,0,1/10,1)
fabzCI(y,2,10,1)
fabzCI(y,0,1/10,1) 

# }

Run the code above in your browser using DataLab