fabtCI {fabCI}R Documentation

FAB t-interval

Description

Computation of a 1-alpha FAB t-interval

Usage

fabtCI(y, psi = c(0, 100, 1, 2), alpha = 0.05)

Arguments

y

a numeric vector with at least two non-missing values

psi

a length-four vector of hyperparameters for the prior

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 t-interval for the mean of a normal population with an unknown variance, given a user-specified prior distribution determined by psi. The prior is that the population mean and variance are independently distributed as normal and inverse-gamma random variables. Referring to the elements of psi as mu, t2, s20, nu0, the prior is determined as follows:

  1. mu is the prior expectation of the mean

  2. t2 is the prior variance of the mean

  3. the population variance is inverse-gamma(nu0/2,nu0 s20/2)

Author(s)

Peter Hoff

Examples

y<-rnorm(10)
fabtCI(y,c(0,10,1,5)) 
fabtCI(y,c(0,1/10,1,5))
fabtCI(y,c(2,10,1,5))
fabtCI(y,c(0,1/10,1,5)) 


[Package fabCI version 0.2 Index]