forked from afazabbie/didat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
simulationUI.R
103 lines (99 loc) · 3.89 KB
/
simulationUI.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
library(shiny)
#Simulation module UI function
simulationUI <- function(id) {
ns <- NS(id)
tagList(sidebarLayout(
sidebarPanel(width = 3,
h3("Parameters"),
radioButtons(inputId = ns("distType"),
label = "Distribution Type",
choices =c("Discrete"="disc",
"Continuous"="conti"),
selected = "disc"
),
uiOutput(ns("disttControls")),
uiOutput(outputId = ns("originalParamsControls")),
sliderInput(inputId = ns("numObs"),
label = "Number of Observations",
max = 1000,min=0,value = 50,step =10 )
),
mainPanel(width = 9,
h3("Simulations"),
tabsetPanel(
tabPanel("Linear Congrential",
h4("Generating uniform random numbers"),
fluidRow(
column(3,
sliderInput(inputId = ns("initVal"),
label = "Initial Value",
min = 0,
max = 100,
value = 57
)
),
column(3,
sliderInput(inputId = ns("multiplierVal"),
label = "Multiplier",
min = 0,
max = 100,
value = 33
)
),
column(3,
sliderInput(inputId = ns("modVal"),
label = "Modulus",
min = 0,
max = 100,
value = 64
)
),
column(3,
sliderInput(inputId = ns("shiftVal"),
label = "Shift",
min = 0,
max = 100,
value = 12
)
)
),
fluidRow(
column(6,h4("Histogram"),
plotOutput(outputId = ns("randCongregHist"))),
column(6,h4("Run Sequence"),
plotOutput(outputId = ns("randCongregRunSeq")))
),
fluidRow(
column(6,h4("Chi-Square Test"),
verbatimTextOutput(outputId = ns("randCongregChisq"))),
column(6,h4("Kolmogorov Smirnov Test"),
verbatimTextOutput(outputId = ns("randCongregKolmog")))
),
fluidRow(
verbatimTextOutput(outputId = ns("randCongreg"))
)
),
tabPanel("Univariate",
h3("Univariate Analysis of Simulated data"),
fluidRow(
uiOutput(outputId = ns("assumedParamsControls"))
),
fluidRow(
column(6,h4("P-P Plot"),plotOutput(outputId = ns("univarPP"))),
column(6,h4("Kolmogorov-Smirnov Goodness of Fit Tests"),
h5("Calculated Value"),
verbatimTextOutput(outputId = ns("chisq")),
h5("KS test"),
verbatimTextOutput(outputId = ns("kolmog"))
)
)
),
tabPanel("Bivariate",
h3("Bivariate Analysis of Simulated data")),
tabPanel("Multivariate",
h3("Multivariate Analysis of Simulated data")),
tabPanel("Applications",
h3("Queueing system"))
)
)
))
}