Skip to content

Commit

Permalink
added notes explaining what groups are referred to for the estimated …
Browse files Browse the repository at this point in the history
…sample sizes
  • Loading branch information
kappelmann committed Jan 7, 2020
1 parent e7fa2d2 commit 1baee91
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 26 deletions.
13 changes: 13 additions & 0 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.")

})



}
57 changes: 31 additions & 26 deletions ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")


)
),
Expand All @@ -200,14 +201,30 @@ 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",
"Effect Size (W)",
step = 0.01,
min = 0,
max = 1,
value = 0.5),
value = 0.3),
br(),
sliderInput("chisquare.power1",
"Power",
Expand All @@ -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------------
Expand All @@ -245,7 +248,7 @@ body <- dashboardBody(
step = 0.01,
min = 0,
max = 1,
value = 0.5),
value = 0.3),
br(),
sliderInput("chisquare.power2",
"Power",
Expand Down Expand Up @@ -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")

)
),
Expand All @@ -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"),
Expand All @@ -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------------
Expand Down

0 comments on commit 1baee91

Please sign in to comment.