Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kpatera committed Feb 9, 2022
1 parent 0e40c1b commit 6234050
Show file tree
Hide file tree
Showing 35 changed files with 851 additions and 812 deletions.
Binary file modified .RData
Binary file not shown.
1,014 changes: 507 additions & 507 deletions .Rhistory

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion .Rproj.user/shared/notebooks/paths
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ C:/Users/kosta/Documents/GitHub/Archive_tPRiors/global.R="6829952B"
C:/Users/kosta/Documents/GitHub/Archive_tPRiors/server.R="64D2BE13"
C:/Users/kosta/Documents/GitHub/Archive_tPRiors/ui.R="7A9EBEBC"
C:/Users/kosta/Documents/GitHub/harmony_larissa_training/Day_1/IntroMCMC.r="7E24C347"
C:/Users/kosta/Documents/GitHub/tPRiors/Archive/Archive/findUni.R="74E7552D"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_DownloadResults.R="1118801F"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_Jags_ApparentPre.R="F17C7730"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_Jags_MultipleGroupsAppPre.R="25CB69CC"
Expand All @@ -15,6 +16,7 @@ C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_Jags_MultipleGroupsT
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_Jags_MultipleGroupsTruePreZero.R="1FB359EE"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_Jags_TruePre.R="BACC0B2A"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_Jags_TruePreZero.R="7576187E"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_MultiDatasetNo.R="55636A41"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_MultiDatasetYes.R="C35E671E"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_findBeta.R="F5FCC69E"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Interface_findBeta_NonInformative.R="8966B561"
Expand All @@ -33,10 +35,16 @@ C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Jags_MultipleGroupsPre.R="CFA2
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Jags_MultipleGroupsPreZero.R="26BB4469"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Jags_TruePre.R="2B9A23F5"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/Jags_TruePreZero.R="8BAD412B"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/findbeta2.R="FEF716A3"
C:/Users/kosta/Documents/GitHub/tPRiors/Functions/findbetamupsi.R="EBA66994"
C:/Users/kosta/Documents/GitHub/tPRiors/Rmarkdown/TPpre_Report.Rmd="8CD5DEE0"
C:/Users/kosta/Documents/GitHub/tPRiors/Rmarkdown/TPpre_Report_Mult.Rmd="2BAADE33"
C:/Users/kosta/Documents/GitHub/tPRiors/Rmarkdown/TPpre_Report_Mult_True.Rmd="8B5D897F"
C:/Users/kosta/Documents/GitHub/tPRiors/Rmarkdown/TPpre_Report_True.Rmd="3DAF8580"
C:/Users/kosta/Documents/GitHub/tPRiors/global.R="487953C6"
C:/Users/kosta/Documents/GitHub/tPRiors/server.R="005227EE"
C:/Users/kosta/Dropbox/1. Diagonismoi/MarieCurieProposal/R Code/Example.R="3027BDE6"
C:/Users/kosta/Dropbox/1. Diagonismoi/MarieCurieProposal/ZeroEvents/covid19Example.R="20C8A3DE"
C:/Users/kosta/Dropbox/1. Diagonismoi/MarieCurieProposal/ZeroEvents/shinyapp/Table2out.R="5967D0E0"
C:/Users/kosta/Dropbox/1. Diagonismoi/MarieCurieProposal/ZeroEvents/shinyapp/betalap.R="2E132356"
C:/Users/kosta/Dropbox/1. Diagonismoi/MarieCurieProposal/ZeroEvents/shinyapp/int_f2.R="4F1FD68E"
C:/Users/kosta/Dropbox/1. Diagonismoi/MarieCurieProposal/ZeroEvents/shinyapp/overlap.R="C93072B3"
7 changes: 4 additions & 3 deletions Archive/Archive/findUni.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ findbeta2<-function (themean = 0.3, percentile = 0.95, lower.v = F, variance=0.6
shape1=themean-k
shape2=themean+k
shape1;shape2
summary(runif(100000,shape1,shape2))
var(runif(100000,shape1,shape2))

out<-runif(100000,shape1,shape2)
summary(out)
var(out)
print(round(quantile(out,probs=c(0.01,0.1,0.5,0.9,0.99)),3))
return(
list(a = round(shape1, 2),
b = round(shape2, 2),
Expand Down
Binary file added Data/Dementia_Updated.xls
Binary file not shown.
4 changes: 3 additions & 1 deletion Functions/Interface_DownloadResults.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ fluidPage(width = 2,
downloadButton("downloadModel",label = "Download MCMC samples")
)
)
)
)


6 changes: 3 additions & 3 deletions Functions/Interface_Jags_ApparentPre.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
sidebarPanel(width = 4,
tabsetPanel(
tabPanel("Data input",
numericInput("n", "Sample size: ",min = 2, max = 1000000, value = 72),
numericInput(inputId = "y", label = "Number of positive tests: ",min = 1, max = 1000000, step = 1, value = 14),
sliderInput("perVal", "Set prevalence checkpoint: ",min = 0, max = 1, value = 0.05,step = 0.01),
numericInput("n", "Sample size: ",min = 2, max = 1000000, value = 500),
numericInput(inputId = "y", label = "Number of positive tests: ",min = 1, max = 1000000, step = 1, value = 25),
sliderInput("perVal", "Set a prevalence checkpoint/threshold value (c), to calculate the Pr(Prevalence>c): ",min = 0, max = 1, value = 0.05,step= 0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Reset tPriors"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model"),style=icon("check"))
),
Expand Down
7 changes: 4 additions & 3 deletions Functions/Interface_Jags_MultipleGroupsAppPre.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ sidebarPanel(width = 4,
c("Preload" = "Option1Preload",
"Upload" = "Option2Upload"),inline = TRUE),
uiOutput("MultiDataset_fb"),
sliderInput("perVal", "Set prevalence checkpoint: ",min = 0, max = 1, value = 0.05,step=0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Reset tPriors"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model"),style=icon("check"))
sliderInput("perVal", "Set a prevalence checkpoint/threshold value (c), to calculate the Pr(Prevalence>c): ",min = 0, max = 1, value = 0.05,step= 0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Soft reset"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model"),style=icon("check")),
h5("(After fixing the model, click on Step 2 tab before moving to the report)")
),
tabPanel("MCMC input",
numericInput("nniter", "Number of MCMC iterations: ",min = 10, max = 100000, value = 10000),
Expand Down
9 changes: 5 additions & 4 deletions Functions/Interface_Jags_MultipleGroupsAppPre_NonInf.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ sidebarPanel(width = 4,
c("Preload" = "Option1Preload",
"Upload" = "Option2Upload"),inline = TRUE),
uiOutput("MultiDataset_fb"),
sliderInput("perVal", "Set prevalence checkpoint: ",min = 0, max = 1, value = 0.05,step=0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Reset tPriors"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model"),style=icon("check"))
),
sliderInput("perVal", "Set a prevalence checkpoint/threshold value (c), to calculate the Pr(Prevalence>c): ",min = 0, max = 1, value = 0.05,step= 0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Soft reset"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model"),style=icon("check")),
h5("(After fixing the model, click on Step 2 tab before moving to the report)")
),
tabPanel("MCMC input",
numericInput("nniter", "Number of MCMC iterations: ",min = 10, max = 100000, value = 10000),
numericInput("nnthin", "Thinning interval: ",min = 2, max = 1000, value = 5),
Expand Down
7 changes: 4 additions & 3 deletions Functions/Interface_Jags_MultipleGroupsTruePre.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ sidebarPanel(width = 4,
"Upload" = "Option2Upload"),inline = TRUE),
uiOutput("MultiDataset_fb"),
#sliderInput("tau0", "Probability for non-zero prevalence: ",min = 0, max = 0, value = 0,step=0.01),
sliderInput("perVal", "Set prevalence checkpoint: ",min = 0, max = 1, value = 0.05,step=0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Reset tPriors"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model"),style=icon("check"))
sliderInput("perVal", "Set a prevalence checkpoint/threshold value (c), to calculate the Pr(Prevalence>c): ",min = 0, max = 1, value = 0.05,step= 0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Soft reset"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model"),style=icon("check")),
h5("(After fixing the model, click on Step 2 tab before moving to the report)")
),
tabPanel("MCMC input",
numericInput("nniter", "Number of MCMC iterations: ",min = 10, max = 100000, value = 10000),
Expand Down
7 changes: 4 additions & 3 deletions Functions/Interface_Jags_MultipleGroupsTruePreZero.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ sidebarPanel(width = 4,
"Upload" = "Option2Upload"),inline = TRUE),
uiOutput("MultiDataset_fb"),
# sliderInput("tau0", "Probability for non-zero prevalence: ",min = 0, max = 1, value = 0.01, step=0.01),
sliderInput("perVal", "Set prevalence checkpoint: ",min = 0, max = 1, value = 0.05, step=0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Reset tPriors"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model"),style=icon("check"))
sliderInput("perVal", "Set a prevalence checkpoint/threshold value (c), to calculate the Pr(Prevalence>c): ",min = 0, max = 1, value = 0.05,step= 0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Soft reset"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model "),style=icon("check")),
h5("(After fixing the model, click on Step 2 tab before moving to the report)")
),
tabPanel("MCMC input",
numericInput("nniter", "Number of MCMC iterations: ",min = 10, max = 100000, value = 10000),
Expand Down
8 changes: 4 additions & 4 deletions Functions/Interface_Jags_TruePre.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ sidebarPanel(width = 4,

tabsetPanel(
tabPanel("Data input",
numericInput("n", "Sample size: ",min = 2, max = 1000000, value = 72),
numericInput(inputId = "y", label = "Number of positive tests: ",min = 1, max = 1000000, step = 1, value = 14),
numericInput("n", "Sample size: ",min = 2, max = 1000000, value = 500),
numericInput(inputId = "y", label = "Number of positive tests: ",min = 1, max = 1000000, step = 1, value = 25),
#numericInput("tau0", "Probability for non-zero prevalence: ",min = 0, max = 0, value = 0,step = 0.01),
sliderInput("perVal", "Set prevalence checkpoint: ",min = 0, max = 1, value = 0.05,step= 0.05),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Reset tPriors"),style=icon("check")),
sliderInput("perVal", "Set a prevalence checkpoint/threshold value (c), to calculate the Pr(Prevalence>c): ",min = 0, max = 1, value = 0.05,step= 0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Soft reset"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model"),style=icon("check"))
),
tabPanel("MCMC input",
Expand Down
8 changes: 4 additions & 4 deletions Functions/Interface_Jags_TruePreZero.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ sidebarPanel(width = 4,

tabsetPanel(
tabPanel("Data input",
numericInput("n", "Sample size: ",min = 2, max = 1000000, value = 72),
numericInput(inputId = "y", label = "Number of positive tests: ",min = 1, max = 1000000, step = 1, value = 14),
numericInput("n", "Sample size: ",min = 2, max = 1000000, value = 500),
numericInput(inputId = "y", label = "Number of positive tests: ",min = 1, max = 1000000, step = 1, value = 25),
# numericInput("tau0", "Probability for non-zero prevalence: ",min = 0, max = 1, value = 0.1,step = 0.01),
sliderInput("perVal", "Set prevalence checkpoint: ",min = 0, max = 1, value = 0.05,step= 0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Reset tPriors"),style=icon("check")),
sliderInput("perVal", "Set a prevalence checkpoint/threshold value (c), to calculate the Pr(Prevalence>c): ",min = 0, max = 1, value = 0.05,step= 0.01),
div(style="display:inline-block;width:45%;text-align: left;",actionButton("buttonModelReset", "Soft reset"),style=icon("check")),
div(style="display:inline-block;width:45%;text-align: right;",actionButton("buttonFixModel", "Fix model"),style=icon("check"))
),
tabPanel("MCMC input",
Expand Down
12 changes: 6 additions & 6 deletions Functions/Interface_findBeta.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ sidebarPanel(width = 4,
h3("Set a prevalence prior"),
hr(),
sliderInput(inputId = "PriorMetric",
label = paste("Specify your prior belief about the",input$ID_MeanMedianMode,"",input$ID_TrueApp,": "),
label = paste("What is the most likely value for the ",input$ID_MeanMedianMode,"of the",input$ID_TrueApp," (tm): "),
min=0, max=1, value=0.6,step = 0.01),
radioButtons(inputId = "lower.value",
label=paste("Is the percentile the upper limit of the",input$ID_MeanMedianMode,"?"),choices=c("Yes","No"),
label=paste("Will you set an upper percentile limit for the",input$ID_MeanMedianMode,"of the",input$ID_TrueApp," (lv)? If No, then a lower limit is specified."),choices=c("Yes","No"),
selected="No",inline = T),
uiOutput("sliders_fb"),
sliderInput(inputId = "Percentile1",
label = paste("Specify the level of confidence that the true value of the",input$ID_MeanMedianMode,"is greater or lower than the percentile.value: "),
label = paste("Specify the level of confidence (per) that the true value of the",input$ID_TrueApp,"",input$ID_MeanMedianMode,"is more extreme than the percentile limit: "),
min=0.51, max=1, value=0.95,step = 0.01),
h5("Caution! Press 'set priors' only when all values are set. "),
h4("Caution! Please press 'set priors' only when all values of all parameters are set. "),
radioButtons(inputId = "lower.value.fix",
label=paste("In case 1 slider gets stuck, select 'Patch', wait and select 'Fixed' to continue"),choices=c("Fixed","Patch"),
selected="Fixed", inline = T),
div(style="display:inline-block;width:30%;text-align: left;",actionButton("buttonPriorReset", "Reset tPriors"),style=icon("check")),
div(style="display:inline-block;width:30%;text-align: center;",actionButton("buttonPriorHelp1", "Example"),style=icon("check")),
div(style="display:inline-block;width:30%;text-align: left;",actionButton("buttonPriorReset", "Soft reset"),style=icon("check")),
div(style="display:inline-block;width:30%;text-align: center;",actionButton("buttonPriorHelp1", "Help"),style=icon("check")),
div(style="display:inline-block;width:30%;text-align: right;",actionButton("buttonPrior", "Set prior(s)!"),style=icon("check"))

)
Loading

0 comments on commit 6234050

Please sign in to comment.