delta = 7, n = NA, power = 80/100, alpha = 5/100, r = 1)
runApp()
shiny::runApp()
runApp()
runApp()
runApp()
runApp()
shiny::runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp('J:/4-Méthodologiste/Antoine/GITHUB/KP-L3/APPLICATION')
runApp('J:/4-Méthodologiste/Antoine/GITHUB/KP-L3/APPLICATION')
runApp('J:/4-Méthodologiste/Antoine/GITHUB/KP-L3/APPLICATION')
runApp('J:/4-Méthodologiste/Antoine/GITHUB/KP-L3/APPLICATION')
runApp('J:/4-Méthodologiste/Antoine/GITHUB/KP-L3/APPLICATION')
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
runApp()
library("epiR")
library("gsDesign")
library("kableExtra")
library("rpact")
power <- 0.8
alpha <- 0.05
p1 <- 0.15*0.75
p2 <- 0.15
epi.sscohortc(N = NA, irexp1 = p1, irexp0 = p2, pexp = NA, n = NA,
power = power, r = 1, design = 1, sided.test = 2,
finite.correction = FALSE, nfractional = FALSE, conf.level = 1-alpha) # 2544 (total)
gs <- gsDesign(k = 3, test.type = 2, n.fix =  2544, sfu="OF", beta = 1-power, alpha = alpha) # 2589
print( gs)
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = alpha, beta = 1-power, sided = 2)
designPlan <- getSampleSizeRates(design, riskRatio = FALSE, thetaH0 = 0,
normalApproximation = TRUE, pi1 = p1, pi2 = p2, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan) # 2588
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = alpha, beta = 1-power, sided = 2)
designPlan <- getSampleSizeRates(design, riskRatio = FALSE, thetaH0 = 0,
normalApproximation = TRUE, pi1 = 66, pi2 = 72, groups = 2,
allocationRatioPlanned = 1, stDev = 23)
summary(designPlan) # 2588
shiny::runApp()
runApp()
ui <- fluidPage(
useShinyjs(),
theme = shinytheme("flatly"),
fluidRow(style = "height:100px",
column(width = 3,
style = "height:100%",
tags$a(href='https://chu-poitiers.fr',
tags$img(src='LogoCHU.png', height = "100%" , align="left"))),
column(width = 9,
style="height: 100%",
includeHTML("appName.html"))
),
fluidRow(
navbarPage(title = icon("users",class ="fa-solid fa-users"),
# PAGE COMPARING PROPORTIONS --------------------------------------------------------------------------------------------
tabPanel(title = "COMPARING PROPORTIONS",
fluidRow(column(width = 12,
h3("COMPARING PROPORTIONS"))),
br(),
sidebarLayout(
sidebarPanel(
selectInput(inputId = "hypProp",
label = "Hypothesis",
choices = c(" ","superiority", "non-inferiority")),
#when an item is selected, the next appear
numericInput(inputId = "powerProp",
label = "Power (%)",
value = NULL,
max = 100,
min = 0),
numericInput(inputId = "alphaProp",
label = "Alpha (%)",
value = NULL,
max = 20,
min = 0,
step = 0.5),
conditionalPanel(
condition = "input.hypProp == 'superiority' || input.hypProp == 'non-inferiority'",
h5("Proportion expected in the control group :"),
numericInput(inputId = "obsProp",
label = "Control (%)",
value = NULL,
step = 0.005)),
conditionalPanel(
condition = "input.hypProp == 'superiority'",
h5("Proportion expected in the experimental group :"),
numericInput(inputId = "prevProp",
label = "Experimental (%)",
value = NULL,
step = 0.005),
selectInput(inputId = "sidetestProp",
label = "test",
choices = c("two-sided", "one-sided"))),
conditionalPanel(
condition = "input.hypProp == 'non-inferiority'",
h5("Absolute margin :"),
numericInput(inputId = "deltaProp",
label = "Delta",
value = NULL,
step = 0.005))
),
mainPanel(
actionButton(inputId = "Prop", label =  "Results"),
br(),
htmlOutput("proportion"))
) # sidebarLayout
), # Comparing proportion
# PAGE COMPARING MEANS --------------------------------------------------------------------------------------------------
tabPanel(title = "COMPARING MEANS",
fluidRow(column(width = 12,
h3("COMPARING MEANS"))),
br(),
sidebarLayout(
sidebarPanel(
selectInput(inputId = "hypMean",
label = "Hypothesis",
choices = c(" ","superiority", "non-inferiority")),
#when an item is selected, the next appear
numericInput(inputId = "powerMean",
label = "Power (%)",
value = NULL),
numericInput(inputId = "alphaMean",
label = "Alpha (%)",
value = NULL,
step = 0.5),
conditionalPanel(
condition = "input.hypMean == 'superiority' || input.hypMean == 'non-inferiority'",
h5("Mean expected in the control group :"),
numericInput(inputId = "obsMean",
label = "Control",
value = NULL,
step = 0.005)),
conditionalPanel(
condition = "input.hypMean == 'superiority'",
h5("Mean expected in the experimental group :"),
numericInput(inputId = "prevMean",
label = "Experimental",
value = NULL,
step = 0.005),
selectInput(inputId = "sidetestMean",
label = "test",
choices = c("two-sided", "one-sided"))),
numericInput(inputId = "sigmaMean",
label = "Sigma",
value = NULL,
step = 0.005),
conditionalPanel(
condition = "input.hypMean == 'non-inferiority'",
h5("Absolute margin :"),
numericInput(inputId = "deltaMean",
label = "Delta",
value = NULL,
step = 0,005))
), # sidebar panel
mainPanel(
actionButton("Mean", "Results"),
br(),
htmlOutput("mean"))
) # sidebarLayout
), # Comparing means
# PAGE BINARY EVENT PREDICTION ------------------------------------------------------------------------------------------
tabPanel(title = "BINARY EVENT PREDICTION",
fluidRow(column(width = 12,
h3("BINARY EVENT PREDICTION"))),
br(),
sidebarLayout(
sidebarPanel(
numericInput(inputId = "predictorsToTest",
label = "Number of potential predictors",
value = NULL,
step = 1),
numericInput(inputId = "shrinkageExpected",
label = "Expected Shrinkage",
value = NULL,
step = 0.1),
numericInput(inputId = "R2",
label = "anticipated R2 : expected predictive capacities",
value = NULL,
step = 0.01)
),
mainPanel(
actionButton("Pred", "Results"),
br(),
htmlOutput("prediction"))
)
) # BINARY EVENT PREDICTION
)
)
)
ui <- fluidPage(
useShinyjs(),
theme = shinytheme("flatly"),
fluidRow(style = "height:100px",
column(width = 3,
style = "height:100%",
tags$a(href='https://chu-poitiers.fr',
tags$img(src='LogoCHU.png', height = "100%" , align="left"))),
column(width = 9,
style="height: 100%",
includeHTML("appName.html"))
),
fluidRow(
navbarPage(title = icon("users",class ="fa-solid fa-users"),
# PAGE COMPARING PROPORTIONS --------------------------------------------------------------------------------------------
tabPanel(title = "COMPARING PROPORTIONS",
fluidRow(column(width = 12,
h3("COMPARING PROPORTIONS"))),
br(),
sidebarLayout(
sidebarPanel(
selectInput(inputId = "hypProp",
label = "Hypothesis",
choices = c(" ","superiority", "non-inferiority")),
#when an item is selected, the next appear
numericInput(inputId = "powerProp",
label = "Power (%)",
value = NULL,
max = 100,
min = 0),
numericInput(inputId = "alphaProp",
label = "Alpha (%)",
value = NULL,
max = 20,
min = 0,
step = 0.5),
conditionalPanel(
condition = "input.hypProp == 'superiority' || input.hypProp == 'non-inferiority'",
h5("Proportion expected in the control group :"),
numericInput(inputId = "obsProp",
label = "Control (%)",
value = NULL,
step = 0.005)),
conditionalPanel(
condition = "input.hypProp == 'superiority'",
h5("Proportion expected in the experimental group :"),
numericInput(inputId = "prevProp",
label = "Experimental (%)",
value = NULL,
step = 0.005),
selectInput(inputId = "sidetestProp",
label = "test",
choices = c("two-sided", "one-sided"))),
conditionalPanel(
condition = "input.hypProp == 'non-inferiority'",
h5("Absolute margin :"),
numericInput(inputId = "deltaProp",
label = "Delta",
value = NULL,
step = 0.005))
),
mainPanel(
actionButton(inputId = "Prop", label =  "Results"),
br(),
htmlOutput("proportion"))
) # sidebarLayout
), # Comparing proportion
# PAGE COMPARING MEANS --------------------------------------------------------------------------------------------------
tabPanel(title = "COMPARING MEANS",
fluidRow(column(width = 12,
h3("COMPARING MEANS"))),
br(),
sidebarLayout(
sidebarPanel(
selectInput(inputId = "hypMean",
label = "Hypothesis",
choices = c(" ","superiority", "non-inferiority")),
#when an item is selected, the next appear
numericInput(inputId = "powerMean",
label = "Power (%)",
value = NULL),
numericInput(inputId = "alphaMean",
label = "Alpha (%)",
value = NULL,
step = 0.5),
conditionalPanel(
condition = "input.hypMean == 'superiority' || input.hypMean == 'non-inferiority'",
h5("Mean expected in the control group :"),
numericInput(inputId = "obsMean",
label = "Control",
value = NULL,
step = 0.005)),
conditionalPanel(
condition = "input.hypMean == 'superiority'",
h5("Mean expected in the experimental group :"),
numericInput(inputId = "prevMean",
label = "Experimental",
value = NULL,
step = 0.005),
selectInput(inputId = "sidetestMean",
label = "test",
choices = c("two-sided", "one-sided"))),
numericInput(inputId = "sigmaMean",
label = "Sigma",
value = NULL,
step = 0.005),
conditionalPanel(
condition = "input.hypMean == 'non-inferiority'",
h5("Absolute margin :"),
numericInput(inputId = "deltaMean",
label = "Delta",
value = NULL,
step = 0,005))
), # sidebar panel
mainPanel(
actionButton("Mean", "Results"),
br(),
htmlOutput("mean"))
) # sidebarLayout
), # Comparing means
# PAGE BINARY EVENT PREDICTION ------------------------------------------------------------------------------------------
tabPanel(title = "BINARY EVENT PREDICTION",
fluidRow(column(width = 12,
h3("BINARY EVENT PREDICTION"))),
br(),
sidebarLayout(
sidebarPanel(
numericInput(inputId = "predictorsToTest",
label = "Number of potential predictors",
value = NULL,
step = 1),
numericInput(inputId = "shrinkageExpected",
label = "Expected Shrinkage",
value = NULL,
step = 0.1),
numericInput(inputId = "R2",
label = "anticipated R2 : expected predictive capacities",
value = NULL,
step = 0.01)
),
mainPanel(
actionButton("Pred", "Results"),
br(),
htmlOutput("prediction"))
)
) # BINARY EVENT PREDICTION
)
)
)
runApp()
power <- 0.8
alpha <- 0.05
p1 <- 0.15*0.75
p2 <- 0.15
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = 0.5, beta = 1-0.8, sided = 1)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = -12,
normalApproximation = TRUE, alternative = 0.15*0.75, stDev = 0.15, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan)
library("epiR")
library("gsDesign")
library("kableExtra")
library("rpact")
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = 0.5, beta = 1-0.8, sided = 1)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = -12,
normalApproximation = TRUE, alternative = 0.15*0.75, stDev = 0.15, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan)
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = 0.5, beta = 1-0.8, sided = 1)
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = 0.05, beta = 1-0.8, sided = 1)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = -12,
normalApproximation = TRUE, alternative = 0.15*0.75, stDev = 0.15, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan)
power <- 0.8
alpha <- 0.05
p1 <- 0.15*0.75
p2 <- 0.15
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = alpha, beta = 1-power, sided = 2)
designPlan <- getSampleSizeRates(design, riskRatio = FALSE, thetaH0 = 0,
normalApproximation = TRUE, pi1 = p1, pi2 = p2, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan)
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = alpha, beta = 1-power, sided = 2)
designPlan <- getSampleSizeRates(design, riskRatio = FALSE, thetaH0 = 0,
normalApproximation = TRUE, pi1 = p1, pi2 = p2, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan) # 2588
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = alpha, beta = 1-power, sided = 2)
designPlan <- getSampleSizeRates(design, riskRatio = FALSE, thetaH0 = 0,
normalApproximation = TRUE, pi1 = p1, pi2 = p2, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan) # 2588
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = alpha, beta = 1-power, sided = 2)
designPlan <- getSampleSizeRates(design, riskRatio = FALSE, thetaH0 = 0,
normalApproximation = TRUE, pi1 = p1, pi2 = p2, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan) # 2588
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = 0.05, beta = 1-0.8, sided = 1)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = -12,
normalApproximation = TRUE, alternative = 0.15*0.75, stDev = 0.15, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan)
0.15*0.75
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = 0.05, beta = 1-0.8, sided = 1)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = -12,
normalApproximation = TRUE, alternative = 66, stDev = 0.15, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan)
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = 0.05, beta = 1-0.8, sided = 1)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = -12,
normalApproximation = TRUE, alternative = 66, stDev = 23, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = -7,
normalApproximation = TRUE, alternative = 66, stDev = 23, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = 7,
normalApproximation = TRUE, alternative = 66, stDev = 23, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = 7,
normalApproximation = TRUE, alternative =0, stDev = 23, groups = 2,
allocationRatioPlanned = 1)
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = 0.05, beta = 1-0.8, sided = 1)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = 7,
normalApproximation = TRUE, alternative =0, stDev = 23, groups = 2,
allocationRatioPlanned = 1)
summary(designPlan)
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = 0.05, beta = 1-0.8, sided = 1)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE,
normalApproximation = TRUE, alternative = 10, stDev = 23, groups = 2,
allocationRatioPlanned = 2)
summary(designPlan)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = 0,
normalApproximation = TRUE, alternative = 66, stDev = 23, groups = 2,
allocationRatioPlanned = 2)
summary(designPlan)
design <- getDesignGroupSequential(typeOfDesign = "OF",
informationRates = c(1/3, 2/3, 1), alpha = 0.05, beta = 1-0.8, sided = 1)
designPlan <- getSampleSizeMeans(design, meanRatio = FALSE, thetaH0 = 0,
normalApproximation = TRUE, alternative = 66, stDev = 23, groups = 2,
allocationRatioPlanned = 2)
summary(designPlan)
shiny::runApp()
runApp()
version
shiny::runApp()
runApp('test')
runApp('test')
runApp('test')
runApp('test')
runApp('test')
runApp('test')
