File: ci.transformed.R

package info (click to toggle)
r-cran-optimalcutpoints 1.1-5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 432 kB
  • sloc: makefile: 2
file content (9 lines) | stat: -rw-r--r-- 286 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
ci.transformed <-
function (x, y, n, conf.level) {
	z <- qnorm(1-((1-conf.level)/2))
     
    	ll <- exp(log(x/y)-z*sqrt((1-x)/(n$d*x)+(1-y)/(n$h*y)))
    	ul <- exp(log(x/y)+z*sqrt((1-x)/(n$d*x)+(1-y)/(n$h*y))) 
    
    	res <- list (ci = matrix(c(ll,ul), ncol = 2))     
}