opensafely-actions / demographic-standardisation

demographic-standardisation
MIT License
0 stars 0 forks source link

variance versus confident limits #2

Open wjchulme opened 1 year ago

wjchulme commented 1 year ago

The script currently provides variance estimates for the standardised and unstandardised rates. It might be preferable to simply provide upper and lower confidence limits, or maybe both.

These are calculated using the normal approximation (basically the within-strata variance is calculated as p*(1-P)/n and the standardised rates are derived from this), but there are other options that we may want to allow for. Particularly if there is concern of small numbers of events within some strata. See https://doi.org/10.1186/s12963-018-0177-1 for a bit more detail. I don't know why this doesn't include other standard options for binomial rates.

Any thoughts?

alschaffer commented 1 year ago

Providing the CI limits seems preferable to me. I can't think of any scenario where I'd want the variance outside of calculating CIs. If there were small numbers of events in a given strata, I'd be wary about using direct standardisation anyway.