A small test for the denominator in a research results table

2026-11-15来源 dev.to DataEnglish

A table says a study enrolled 120 participants and reports 24 events. The numerator is easy to spot. The tricky part is whether those 24 events were measured among all enrollees or among the 96 participants with observed outcomes.

In this synthetic example, 24 of the 96 participants with observed outcomes had an event. The observed-case percentage is 25%. If you use 120 as the denominator and report 20%, readers can wrongly infer that the other 24 participants had no event.

Put the population in the table

Quantity Count
Enrolled 120
Outcome observed 96
Outcome missing 24
Events among participants with an observed outcome 24

A regression fixture can catch the accidental denominator swap before an export:

def observed_rate(enrolled, observed, events): if not 0 <= events <= observed <= enrolled: raise ValueError("Counts must reconcile") return events / observed if observed else None assert observed_rate(120, 96, 24) == 0.25 assert observed_rate(120, 0, 0) is None 

Keep the source column and time point next to each of the three counts. This check catches inconsistent bookkeeping. It leaves open how to handle missing outcomes for the actual study: decide that separately using the protocol and the assumptions that fit the data.

For reporting an observational study, consult the STROBE checklists, including the items on participants and missing data. RigorMed can organize a protocol, a results table, and the manuscript draft in one research project for review. The numbers above are for teaching and came from no participant records.

Disclosure: This article was generated with AI and checked for the numbers, code, and example boundaries.

原文:https://www.a8q9.cn/en/article/a-small-test-for-the-denominator-in-a-research-results-table-635216.html

相关文章