adayim/consort

Summaries of timepoints that don't follow kirchhoff rules: e.g. adherence or follow up visits attended

Opened this issue · 2 comments

In many CONSORT diagrams, as well as the participant flow (withdrawals, deaths, etc), we also specify the number that attended visits or were adherent. An example is the CONSROT diagram for the BASIL-2 study: https://www.thelancet.com/journals/lancet/article/PIIS0140-6736(23)00462-2/fulltext

In this example, in the VB group, 160 reached the 1 month follow-up, but only 147 actually attended the visit.

This is also common when summarising adherence.

Can an option be added to summarise these variables that don't follow the "Kirchhoff rules"?

Yes, it is true that this is always the case. I will try to implement this although this may take some time.

Hi,

I spent some time and made some changes. So, basically, you can provide a list of variables and put multiple variables in one element to stack the data. Set kickoff_sidebox = FALSE to void removing observations from the data. Hope the documentation and the examples make sense.

library(consort)
data(dispos.data)
df <- dispos.data[!dispos.data$arm3 %in% "Trt C",]
p <- consort_plot(data = df,
                  orders = list(c(trialno = "Population"),
                                c(exclusion = "Excluded"),
                                c(arm     = "Randomized patient"),
                                # The following two variables will be stacked together
                                c(followup    = "Pariticpants planned for follow-up",
                                  lost_followup = "Reason for tot followed"),
                                c(assessed = "Assessed for final outcome"),
                                c(no_value = "Reason for not assessed"),
                                c(mitt = "Included in the mITT analysis")),
                  side_box = c("exclusion", "no_value"), 
                  allocation = c("arm"), # Two level randomisation
                  kickoff_sidebox = FALSE,
                  cex = 0.7)
plot(p)