R/discordant.CI.R

Defines functions discordant.CI

Documented in discordant.CI

discordant.CI <-
function(t, n, conf.level = 0.95) {
  alpha <- (1 - conf.level)/2
  
  p.L <- ifelse(t == 0, 0, t / (2*(t + (n - t + 1)*qf(1-alpha, 2*(n - t + 1), 2*t))))
  p.U <- ifelse(t == n, 0.5, (t + 1)*qf(1-alpha, 2*(t + 1), 2*(n-t))/(2*(n - t + (t + 1)*qf(1-alpha, 2*(t + 1), 2*(n-t)))))
  return(c(p.L, p.U))
}

Try the Exact package in your browser

Any scripts or data that you put into this service are public.

Exact documentation built on Sept. 26, 2022, 1:05 a.m.