The goal of RatiosCI is to to compute confidence intervals for ratios of two random variables.
You can install
the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("INicolis/RatiosCI")
Compute Confidence Interval for a ratio using Fieller’s theorem:
library(RatiosCI)
## basic example code
x <- c(3.26, 3.43, 7.38, 5.29, 3.32, 3.93, 4.97, 3.35, 4.76, 3.91)
y <- c(10.17, 6.12, 9.30, 10.79, 10.56, 8.26, 7.90, 8.93, 10.80, 9.06)
FiellerCI(x, y, 0.05)
#> LL ratio UL
#> 0.1818470 0.4744804 0.8559575
Compute Confidence Interval for a ratio using exact distribution:
library(RatiosCI)
## basic example code
> nci=NormalRatioCI(mu1 = 5, mu2 = 2.5, sigma1 = 1, sigma2 = 0.5, rho = 0.4, level = 0.95)
[1] "95 % Confidence Interval = [ 1.259 ; 3.176 ]"