-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
55 lines (46 loc) · 1.69 KB
/
Copy pathui.R
File metadata and controls
55 lines (46 loc) · 1.69 KB
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
library(shiny)
fig.width <- 600
fig.height <- 450
shinyUI(pageWithSidebar(
headerPanel("Multivariable linear regression: systolic blood pressure and coffee consumption"),
sidebarPanel(
div(p("This is not real data. It allows comparison of model choices in multiple regression.")),
div(
selectInput("model",
strong("Linear model to evaluate"),
choices=c("Simple regression",
"Additive model",
"Interactive model")),
br(),
br(),
actionButton("resample", "New Sample"),
br(),
br(),
br(),
p(strong("Generating parameters")),
sliderInput("a",
"True intercept",
min=0, max=2, step=.2, value=1, ticks=FALSE),
sliderInput("b",
"True main effect of coffee drinking (cups per day)",
min=0, max=2, step=.2, value=0, ticks=FALSE),
sliderInput("c",
"True main effect of smoking",
min=0, max=2, step=.2, value=0, ticks=FALSE),
sliderInput("d",
"True interaction between coffee drinking and smoking",
min=0, max=2, step=.2, value=0, ticks=FALSE),
sliderInput("e",
"Error standard deviation",
min=0, max=2, step=.2, value=1, ticks=FALSE),
sliderInput("confound",
"Confound coffee drinking by smoking",
min=-1, max=1, step=.1, value=0, ticks=FALSE
)
)
),
mainPanel(
div(plotOutput("reg.plot", width=fig.width, height=fig.height)),
div(class="span7", verbatimTextOutput("reg.summary"))
)
))