nhs-r-community/FunnelPlotR

SR CQC limits bug?

andrjohns opened this issue · 0 comments

Hopefully this is just me misunderstanding the adjustment, but it looks like the CQC limits aren't being back-transformed to the original scale. Given that it uses a square-root transform, shouldn't the returned limits be squared?

od_limits.R

mod_plot_agg$OD95LCL <- multiplier * (mod_plot_agg$target_transformed - (1.959964 * sqrt( (mod_plot_agg$s^2 + tau2))))

build_limits_lookup.R

dfCI$odll95 <- multiplier * (1 - (1.959964 * sqrt((dfCI$s^2 + sqrt(tau2)^2))))