fabtzCI: z-optimal FAB t-interval

Description Usage Arguments Value Author(s) Examples

View source: R/fabtzCI.R

Description

Computation of a 1-alpha FAB t-interval using z-optimal spending function

Usage

1
2
fabtzCI(y, s, dof, alpha = 0.05, psi = list(mu = 0, tau2 = 1e+05,
  sigma2 = 1))

Arguments

y

a numeric scalar, a normally distributed statistic

s

a numeric scalar, the standard error of y

dof

positive integer, degrees of freedom for s

alpha

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

psi

a list of parameters for the spending function, including

  1. mu, the prior expectation of E[y]

  2. tau2, the prior variance of E[y]

  3. sigma2 the variance of y

Value

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

Author(s)

Peter Hoff

Examples

1
2
3
4
n<-10 
y<-rnorm(n) 
fabtzCI(mean(y),sqrt(var(y)/n),n-1)  
t.test(y)$conf.int 

FABInference documentation built on Jan. 9, 2020, 5:08 p.m.