Skip to content

Commit

Permalink
Updated ui and server to make clearer what sample sizes are needed fr…
Browse files Browse the repository at this point in the history
…om app and to highlight what this means
  • Loading branch information
kappelmann committed Dec 17, 2019
1 parent 81958e6 commit 344d41d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 8 deletions.
Binary file added Thumbs.db
Binary file not shown.
Binary file added npRCT_design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ server <- function(input, output) {
output$n_total <- renderText({

temp <- npRCT()
paste("Sample size for the total npRCT is: ",
paste("Total npRCT sample size: ",
temp$n_total * 2, sep = "")

})

output$n_traditional <- renderText({

temp <- npRCT()
paste("Sample size (per group) for the traditional RCT is: ",
paste("Traditional RCT sample size (per group): ",
temp$n_strat, sep = "")

})
Expand All @@ -73,7 +73,7 @@ server <- function(input, output) {
output$n_precision <- renderText({

temp <- npRCT()
paste("Sample size (per group) for the precision RCT is: ",
paste("Precision RCT sample size (per group): ",
as.character(temp$n_total - temp$n_strat), sep = "")

})
Expand Down
35 changes: 30 additions & 5 deletions ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,22 @@ body <- dashboardBody(
collapsible = FALSE,

h3("Estimated Sample Sizes"),
textOutput("n_total"),
strong(textOutput("n_total")),
br(),
textOutput("n_traditional"),
textOutput("n_precision"),
strong(textOutput("n_traditional")),
strong(textOutput("n_precision")),
textOutput("warning"),
tags$head(tags$style("#warning{color: red;
font-style: italic;
}"
)
),

br(),
textOutput("n_saved")
textOutput("n_saved"),
tags$hr(),
p("Please note that ", em("per group"), "refers to main groups of the nested RCTs, which are the two groups intervention ", em("A"), " versus ", em("B"), " for the ", em("traditional"), "RCT and the two groups ", em("randomisation"), " versus ", em("stratification"), " for the ", em("precision"), " RCT. See the explanations tab for details.")

)
),
Expand Down Expand Up @@ -163,7 +166,29 @@ body <- dashboardBody(
color = "blue",

p("The ", strong("nested-precision Randomised Controlled Trial (npRCT)")," is a means to facilitate the move towards precision medicine by combining ", em("traditional"), " intervention testing (e.g., intervention A ", em("versus"), " B) with testing of a ", em("precision"), " algorithm (e.g., randomisation to intervention A or B ", em("versus"), " stratification to intervention A or B)."),
p("The design of the npRCT, which combines the ", em("traditional"), " with what we call ", em("precision"), " RCT, is outlined below based on the publication of a letter to the journal XY. ")
p("The design of the npRCT is outlined below based on the publication of a letter to the journal [INCLUDE JOURNAL NAME HERE]."),
br(),
tags$hr(),
h4(em("Traditional"), " RCT"),
p("Randomisation to"),
tags$ol(
tags$li("Group 1: Intervention A"),
tags$li("Group 2: Intervention B")
),

tags$hr(),
h4(em("Precision"), " RCT"),
tags$ol(
tags$li("Group 1: Randomisation (to)"),
tags$ol(tags$li("Subgroup 1: Intervention A"),
tags$li("Subgroup 2: Intervention B")),
tags$li("Group 2: Stratification (to)"),
tags$ol(tags$li("Subgroup 3: Intervention A"),
tags$li("Subgroup 4: Intervention B"))

)



),

Expand Down

0 comments on commit 344d41d

Please sign in to comment.