R/next_Ivanova_binary.R

Defines functions next_Ivanova_binary

Documented in next_Ivanova_binary

next_Ivanova_binary <- function(target, eps, y, n, d){
  le=length(y)
  qhat=y[d]/n[d]
  qhat1=max(qhat,0.001)
  tstat=(qhat-target)/sqrt(qhat1*(1-qhat1))*sqrt(n[d])
  if (n[d]==1) d1=d
  if (n[d] >1) {	d1=d
  if (tstat< (-eps)) d1=d+1
  if (tstat> (eps)) d1=d-1
  }
  d=d1
  d=max(d,1)
  d=min(d,le)
  d


}

Try the UnifiedDoseFinding package in your browser

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

UnifiedDoseFinding documentation built on Oct. 16, 2022, 1:10 a.m.