verbal-autopsy-software / openVA

R package for openVA: a suite of tools for multiple VA methods
4 stars 6 forks source link

Bug: Confidence interval error bands #25

Closed mboyas-mitre closed 5 years ago

mboyas-mitre commented 5 years ago

https://github.com/verbal-autopsy-software/openVA/blob/f16a333a8355582de814e4fef85eda28bc1035ff/openVA/R/stackplot.r#L186-L187

https://github.com/verbal-autopsy-software/openVA/blob/f16a333a8355582de814e4fef85eda28bc1035ff/openVA/R/stackplot.r#L235

The function appears in the documentation to implement a 95% confidence interval; however, the code seems to create error bars that print the quantiles. This is not, by our understanding, a 95% confidence interval which would depend on sample size and standard deviation in addition to normal distribution assumptions. We either recommend to implement a true 95% confidence interval or adjust the documentation of the function to be clear on what is being plotted.

richardli commented 5 years ago

The notion of 'confidence interval' is misused here. It should be 'posterior credible interval'. Fixed now. The interval here is empirical in the sense that it depends only on the posterior draws, not assuming any assumptions of distribution. So it is indeed quantiles of the posterior samples.