fabzCI: FAB z-interval

Description Usage Arguments Details Author(s) Examples

View source: R/fabzCI.R

Description

Computation of a 1-alpha FAB z-interval

Usage

1
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

Author(s)

Peter Hoff

Examples

1
2
3
4
5
y<-0
fabzCI(y,0,10,1)
fabzCI(y,0,1/10,1)
fabzCI(y,2,10,1)
fabzCI(y,0,1/10,1) 

pdhoff/fabCI documentation built on Jan. 18, 2021, 8:39 p.m.