R/convert.d.to.eer.R

Defines functions convert.d.to.eer

Documented in convert.d.to.eer

convert.d.to.eer <- function(d, cer, eventDesirable=TRUE, eventIfHigher=TRUE) {
  if (eventIfHigher) {
    return(pnorm((qnorm(cer) + d)));
  } else {
    return(1 - pnorm((qnorm(1-cer) + d)));
  }
}

Try the userfriendlyscience package in your browser

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

userfriendlyscience documentation built on May 2, 2019, 1:09 p.m.