From 1baee916d1ef00f77b161b3d9806a0d27620e7bc Mon Sep 17 00:00:00 2001 From: Nils Kappelmann Date: Tue, 7 Jan 2020 10:04:35 +0100 Subject: [PATCH] added notes explaining what groups are referred to for the estimated sample sizes --- server.R | 13 +++++++++++++ ui.R | 57 ++++++++++++++++++++++++++++++-------------------------- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/server.R b/server.R index a0bf786..c5e911a 100644 --- a/server.R +++ b/server.R @@ -236,6 +236,13 @@ server <- function(input, output) { }) + output$chisquare.k <- renderText({ + + + paste0("Please note that per group refers to main groups of the nested RCTs. For the traditional RCT, this refers to the ", input$chisquare.k , " groups specified using the slider in the box on the right side. For the precision RCT, there always two main groups (i.e., randomised versus stratified to interventions). See the explanations tab for details.") + + }) + ## ANOVA @@ -290,6 +297,12 @@ server <- function(input, output) { }) + output$anova.k <- renderText({ + + paste0("Please note that per group refers to main groups of the nested RCTs. For the traditional RCT, this refers to the ", input$anova.k , " groups specified using the slider in the box on the right side. For the precision RCT, there always two main groups (i.e., randomised versus stratified to interventions). See the explanations tab for details.") + + }) + } \ No newline at end of file diff --git a/ui.R b/ui.R index a9949a5..e759588 100644 --- a/ui.R +++ b/ui.R @@ -188,7 +188,8 @@ body <- dashboardBody( br(), textOutput("chisquare.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.") + textOutput("chisquare.k") + ) ), @@ -200,6 +201,22 @@ body <- dashboardBody( color = "blue", + # ----------General Parameters------------ + h2("General Parameters"), + sliderInput("chisquare.k", + "Number of groups", + step = 1, + min = 2, + max = 10, + value = 2), + br(), + sliderInput("chisquare.ycat", + "Number of outcome variable categories", + step = 1, + min = 2, + max = 10, + value = 2), + # ----------Traditional RCT Parameters------------ h2("Traditional RCT"), sliderInput("chisquare.w1", @@ -207,7 +224,7 @@ body <- dashboardBody( step = 0.01, min = 0, max = 1, - value = 0.5), + value = 0.3), br(), sliderInput("chisquare.power1", "Power", @@ -222,20 +239,6 @@ body <- dashboardBody( min = 0.001, max = 0.1, value = 0.05), - br(), - sliderInput("chisquare.k", - "Number of groups", - step = 1, - min = 2, - max = 10, - value = 2), - br(), - sliderInput("chisquare.ycat", - "Number of outcome variable categories", - step = 1, - min = 2, - max = 10, - value = 2), # ----------Precision RCT Parameters------------ @@ -245,7 +248,7 @@ body <- dashboardBody( step = 0.01, min = 0, max = 1, - value = 0.5), + value = 0.3), br(), sliderInput("chisquare.power2", "Power", @@ -310,7 +313,7 @@ body <- dashboardBody( br(), textOutput("anova.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.") + textOutput("anova.k") ) ), @@ -321,6 +324,15 @@ body <- dashboardBody( title = "Set Parameters", color = "blue", + # ----------General Parameters------------ + h2("General Parameters"), + sliderInput("anova.k", + "Number of groups", + step = 1, + min = 2, + max = 10, + value = 2), + # ----------Traditional RCT Parameters------------ h2("Traditional RCT"), @@ -344,14 +356,7 @@ body <- dashboardBody( min = 0.001, max = 0.1, value = 0.05), - br(), - sliderInput("anova.k", - "Number of groups", - step = 1, - min = 2, - max = 10, - value = 2), - + # ----------Precision RCT Parameters------------