opensafely-actions / cohort-report

Cohort-report generates a report for each variable in an input file
MIT License
0 stars 0 forks source link

Report Table 1-like values #47

Open iaindillingham opened 2 years ago

iaindillingham commented 2 years ago

We might need to write a separate reusable action for producing a publication-ready Table 1. However, it would still be useful to report Table 1-like values, possibly within cohort-report.

Here's an example Table 1 from the Nature paper. I think C1 ("Characteristic") lists the variables and C2 ("Category") lists the categories for each variable (values of C1 and C2 form a composite PK). I think C3 lists the number and percentage of people in the population, for the given category of the given variable. I think C4 lists the number and percentage of these people associated with some condition/intervention/outcome.

In the publication-ready Table 1, there is a row for the total; there are footnotes; and the number and percentage columns are concatenated. It's not a tidy table in other words; it's intended for publication.