Make a function to calculate funnel plot limits
make_cl.RdMake a function to calculate funnel plot limits
Value
A function that takes two arguments: x (denominator values) and p (limit percentile), and returns the y value for the limit. This returned function can be used in ggplot2's geom_function.
Examples
if (FALSE) { # \dontrun{
denom <- 1:100
var <- runif(100)
cl_fun <- make_cl(denom, var)
# Use in ggplot2:
# ggplot(...) +
# geom_function(fun = cl_fun, args = list(p = 0.975)
} # }