fabzCI.Rd
Computation of a 1-alpha FAB z-interval
fabzCI(y, mu, t2, s2, alpha = 0.05)
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 |
a two-dimensional vector of the left and right endpoints of the interval
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:
mu is the prior expectation of the mean
t2 is the prior variance of the mean
s2 is the population variance
Peter Hoff
y<-0 fabzCI(y,0,10,1)#> [1] -1.810617 1.810617fabzCI(y,0,1/10,1)#> [1] -1.644915 1.644976fabzCI(y,2,10,1)#> [1] -1.716378 1.963615fabzCI(y,0,1/10,1)#> [1] -1.644915 1.644976