-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
53 lines (49 loc) · 1.74 KB
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
###:###:###:###:###:###:###:###:###
# R Code accompanying the article
# Exploring Bayesian Statistics with no Prior Knowledge
# Author: Marvin Schmitt
# SHINY WEB APP USER INTERFACE FILE
###:###:###:###:###:###:###:###:###
# load packages
library(tidyverse)
library(shiny)
library(shinydashboard)
library(ggplot2)
library(gridExtra)
# Build UI
ui <- fluidPage(
# set title and subtitles
titlePanel("Bayesian Inference"),
tags$h6("Web App accompanying the article 'Exploring Bayesian Statistics with no Prior Knowledge'"),
tags$h6("Author: Marvin Schmitt"),
sidebarLayout(
sidebarPanel(
# PRIOR SECTION
tags$h3("Prior"),
sliderInput(
"prior.beta.p1",label=HTML("α"),
min=1, max=11, step=0.1, value=1.5,
#animate = animationOptions(interval = 1000, loop = TRUE) #uncomment for animation functionality
),
sliderInput(
"prior.beta.p2",label=HTML("β"),
min=1, max=11, step=0.1, value=10,
#animate = animationOptions(interval = 1000, loop = TRUE) #uncomment for animation functionality
),
hr(style = "border-top: 2px solid #000000;"),
# LIKELIHOOD SECTION
tags$h3("Likelihood"),
sliderInput("likelihood1",label="Number of trials n:",
min=4, max=10, step=1, value=5,
#animate = animationOptions(interval = 1000, loop = TRUE) #uncomment for animation functionality
),
sliderInput("likelihood2",label="Number of correct diagnoses k:",
min=0, max=10, step=1, value=4,
animate = animationOptions(interval = 5000, loop = TRUE)
)),
mainPanel(
# PLOT AREA
fluidRow(
column(10, plotOutput('bayesplot'))
)
)))