if (FALSE) {
## Monte Carlo example with 10^8 replicates
# delta arl s.e.
# 0.0001 381.8240 0.0304
# 0.0005 238.4630 0.0148
# 0.001 177.4061 0.0097
# 0.002 125.9055 0.0061
# 0.005 75.7574 0.0031
# 0.01 50.2203 0.0018
# 0.02 32.9458 0.0011
# 0.05 18.9213 0.0005
# 0.1 12.6054 0.0003
# 0.5 5.2157 0.0001
# 1 3.6537 0.0001
# 3 2.0289 0.0000
k <- .5
L0 <- 500
zr <- -7
r <- 50
g <- xgrsr.crit(k, L0, zr=zr, r=r)
DxDgrsr.arl <- Vectorize(xDgrsr.arl, "delta")
deltas <- c(0.0001, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.5, 1, 3)
arls <- round(DxDgrsr.arl(k, g, deltas, zr=zr, r=r), digits=4)
data.frame(deltas, arls)
}
Run the code above in your browser using DataLab