## compute confidence interval for theta in the education dataset
data(education)
N <- education$N
y <- education$theta
u <- sqrt(2 / N)
lam1 <- 2
res.edu <- DearBeggMonotone(y, u, lam = lam1, maxiter = 1000,
CR = 1, trace = FALSE)
r1 <- DearBeggMonotoneCItheta(res.edu, lam = 2, conf.level = 0.95)
res.edu$theta
r1$ci.theta
## compute confidence interval for theta in the passive smoking dataset
data(passive_smoking)
u <- passive_smoking$selnRR
y <- passive_smoking$lnRR
lam1 <- 2
res.toba <- DearBeggMonotone(y, u, lam = lam1, maxiter = 1000,
CR = 1, trace = FALSE)
r2 <- DearBeggMonotoneCItheta(res.toba, lam = 2, conf.level = 0.95)
res.toba$theta
r2$ci.theta
Run the code above in your browser using DataLab