forked from jinseob2kim/jsmodule
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimerocModule.Rd
More file actions
168 lines (145 loc) · 3.59 KB
/
Copy pathtimerocModule.Rd
File metadata and controls
168 lines (145 loc) · 3.59 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/timeroc.R
\name{timerocModule}
\alias{timerocModule}
\alias{timerocModule2}
\title{timerocModule: shiny module server for time-dependent roc analysis}
\usage{
timerocModule(
input,
output,
session,
data,
data_label,
data_varStruct = NULL,
nfactor.limit = 10,
design.survey = NULL,
id.cluster = NULL,
iid = T,
NRIIDI = T
)
timerocModule2(
input,
output,
session,
data,
data_label,
data_varStruct = NULL,
nfactor.limit = 10,
design.survey = NULL,
id.cluster = NULL,
iid = T,
NRIIDI = T
)
}
\arguments{
\item{input}{input}
\item{output}{output}
\item{session}{session}
\item{data}{Reactive data}
\item{data_label}{Reactuve data label}
\item{data_varStruct}{Reactive List of variable structure, Default: NULL}
\item{nfactor.limit}{nlevels limit in factor variable, Default: 10}
\item{design.survey}{Reactive survey data. default: NULL}
\item{id.cluster}{Reactive cluster variable if marginal model, Default: NULL}
\item{iid}{logical, get CI of AUC, Default: T}
\item{NRIIDI}{logical, get NRI & IDI, Default: T}
}
\value{
shiny module server for time-dependent roc analysis
shiny module server for time dependent roc analysis- input number of model as integer
}
\description{
shiny module server for time-dependent roc analysis
shiny module server for time-dependent roc analysis- input number of model as integer
}
\details{
shiny module server for time-dependent roc analysis
shiny module server for time dependent roc analysis- input number of model as integer
}
\examples{
library(shiny)
library(DT)
library(data.table)
library(jstable)
library(ggplot2)
library(timeROC)
library(survIDINRI)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
timerocUI("timeroc")
),
mainPanel(
plotOutput("plot_timeroc"),
ggplotdownUI("timeroc"),
DTOutput("table_timeroc")
)
)
)
server <- function(input, output, session) {
data <- reactive(mtcars)
data.label <- jstable::mk.lev(mtcars)
out_timeroc <- callModule(timerocModule, "timeroc",
data = data, data_label = data.label,
data_varStruct = NULL
)
output$plot_timeroc <- renderPlot({
print(out_timeroc()$plot)
})
output$table_timeroc <- renderDT({
datatable(out_timeroc()$tb,
rownames = F, editable = F, extensions = "Buttons",
caption = "ROC results",
options = c(jstable::opt.tbreg("roctable"), list(scrollX = TRUE))
)
})
}
library(shiny)
library(DT)
library(data.table)
library(jstable)
library(ggplot2)
library(timeROC)
library(survIDINRI)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
timerocUI("timeroc")
),
mainPanel(
plotOutput("plot_timeroc"),
ggplotdownUI("timeroc"),
DTOutput("table_timeroc")
)
)
)
server <- function(input, output, session) {
data <- reactive(mtcars)
data.label <- jstable::mk.lev(mtcars)
out_timeroc <- callModule(timerocModule2, "timeroc",
data = data, data_label = data.label,
data_varStruct = NULL
)
output$plot_timeroc <- renderPlot({
print(out_timeroc()$plot)
})
output$table_timeroc <- renderDT({
datatable(out_timeroc()$tb,
rownames = F, editable = F, extensions = "Buttons",
caption = "ROC results",
options = c(jstable::opt.tbreg("roctable"), list(scrollX = TRUE))
)
})
}
}
\seealso{
\code{\link[stats]{quantile}}
\code{\link[data.table]{setkey}}
\code{\link[data.table]{data.table}}
\code{\link[data.table]{rbindlist}}
\code{\link[stats]{quantile}}
\code{\link[data.table]{setkey}}
\code{\link[data.table]{data.table}}
\code{\link[data.table]{rbindlist}}
}