conservativeBoundary: Get the conservative edge of a confidence interval

View source: R/misc.R

conservativeBoundaryR Documentation

Get the conservative edge of a confidence interval

Description

Get the conservative edge of a confidence interval

Usage

conservativeBoundary(boundaries, base = 0)

Arguments

boundaries

upper and lower values

base

value, e.g. 0 or 1

Value

single numeric. if the boundaries overlap the base then return base otherwise return value closest to base

Examples

conservativeBoundary(c(1,100),10)
conservativeBoundary(c(20,100),10)
conservativeBoundary(c(-100,-20),0)
mat<-matrix(1:4,nrow=2)
fish<-fisher.test(mat)
conservativeBoundary(fish$conf.int,1)
mat2<-matrix(c(10,1,1,10),nrow=2)
fish2<-fisher.test(mat2)
conservativeBoundary(fish2$conf.int,1)

sherrillmix/dnar documentation built on July 18, 2022, 10:07 p.m.