Closed martyoh closed 4 months ago
Hi.
I think the documentation for the function RelRisk() does not correspond to its code.
Assuming the input is organized as in the documentation, the code (per line 6332 in StatsAndCIs.r) calculates
(n00 / (n00+n01)) / (n10 / (n10+n11))
i.e. ((unexposed&undiseased)/unexposed) / ((exposed&undiseased)/exposed)
I believe relative risk should rather be
((exposed& diseased)/exposed) / ((unexposed&diseased)/unexposed)
cf. https://www.ncbi.nlm.nih.gov/books/NBK430824/
Thanks for this hint. You're totally right, the documentation was not correct. This will be fixed with 0.99.53.6. You may have a look and close the issue, if ok.
Great. Thanks!
Hi.
I think the documentation for the function RelRisk() does not correspond to its code.
Assuming the input is organized as in the documentation, the code (per line 6332 in StatsAndCIs.r) calculates
(n00 / (n00+n01)) / (n10 / (n10+n11))
i.e. ((unexposed&undiseased)/unexposed) / ((exposed&undiseased)/exposed)
I believe relative risk should rather be
((exposed& diseased)/exposed) / ((unexposed&diseased)/unexposed)
cf. https://www.ncbi.nlm.nih.gov/books/NBK430824/