subscreen (subgroup screening) package has been developed to systematically analyze data, e.g., from clinical trials, for subgroup effects and visualize the outcome for all evaluated subgroups simultaneously. The visualization is done by a shiny application called Subgroup Explorer. Typically, shiny applications are hosted on a dedicated shiny server, but due to the sensitivity of patient data in clinical trials, which are usually protected by informed consents, the upload of this data to an external server is prohibited. Therefore, we provide our tool as a stand-alone application that can be launched from any local machine on which the data is stored.
Table of content (click on topic to jump to a specific chapter):
subscreencalc Input subscreencalc Output subscreenvi subscreenshow
data data frame with study data
eval_function name of the evaluation function for data analysis
subjectid character of variable name in data that contains the subject identifier, defaults to 'subjid'
factors character vector containing the names of variables that define the subgroups (required)
max_comb maximum number of factor combination levels to define subgroups, defaults to 3
nkernel number of kernels for parallelization (defaults to 1)
par_functions character vector of names of functions used in eval_function to be exported
to cluster (needed only if nkernel > 1)
verbose logical value to switch on/off output of computational information (defaults to TRUE)
factorial logical value to switch on/off calculation of factorial contexts (defaults to FALSE)
use_complement logical value to switch on/off calculation of complement subgroups (defaults to FALSE)
| id | trt | sex | ageg | albuming | cholg | event.pfs | timepfs |
|---|---|---|---|---|---|---|---|
| 1 | 1 | f | high | Low | Low | 1 | 3029 |
| 2 | 1 | f | High | High | Low | 1 | 391 |
| 3 | 1 | m | Low | High | Low | 0 | 299 |
| ... | ... | ... | ... | ... | ... | ... | ... |
hazardratio <- function(D) {
HRpfs <- tryCatch(exp(coxph(Surv(D$timepfs, D$event.pfs) ~ D$trt )$coefficients[[1]]),
warning=function(w) {NA})
HRpfs <- 1/HRpfs
HR.pfs <- round(HRpfs, 2)
HR.pfs[HR.pfs > 10] <- 10
HR.pfs[HR.pfs < 0.00001] <- 0.00001
data.frame( HR.pfs)
}
which will add a target variable column named `HR.pfs`.
| SGID | nfactors | HR.pfs | N.of.subjects | sex | ageg | cholg | albuming |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 1.06 | 36 | m | Not used | Not used | Not used |
| 2 | 1 | 2.45 | 276 | f | Not used | Not used | Not used |
| 3 | 1 | 0.89 | 101 | Not used | High | Not used | Not used used |
| ... | ... | ... | ... | ... | ... | ... | ... |
| HR.pfs | N.of.subjects |
|---|---|
| 1.11 | 312 |
data data frame containing the dependent and independent variables.
y name of the column in data that contains the dependent variable.
cens name of the column in data that contains the censoring variable,
if y is an event time (default=NULL).
trt name of the column in data that contains the treatment variable (default=NULL).
x vector that contains the names of the columns in data with the independent
variables (default=NULL, i.e. all remaining variables)
scresults SubScreenResult object with results from a subscreencalc call
variable_importance variable importance object calculated via subscreenvi to unlock
'variable importance'-tab in the app
host host name or IP address for shiny display
port port number for shiny display
NiceNumbers list of numbers used for a 'nice' scale
windowTitle title which is shown for the browser tab
graphSubtitle subtitle for explorer graph
favour_label_verum_name verum name for label use in explorer graph
favour_label_comparator_name comparator name for label use in explorer graph
None of the parameter is required to start the app.
By entering subscreenshow() to the R console, the app starts on the upload screen.
The app itself will be explained in more detailed version in chapter 3.
| subgroup | sex | age | target variable |
|---|---|---|---|
| 1 | male | <65 | 1.7 |
| 2 | male | 65-75 | 1.3 |
| 3 | male | =>75 | 2.1 |
| 4 | female | <65 | 1.5 |
| 5 | female | 65-75 | 1.6 |
| 6 | female | =>75 | 3.6 |
| subgroup | sex | age | target variable |
|---|---|---|---|
| 1 | male | <65 | 1.7 |
| 2 | male | 65-75 | 1.3 |
|
|
|
|
|
| 4 | female | <65 | 1.5 |
| 5 | female | 65-75 | 1.6 |
|
|
|
|
|
| subgroup | sex | age | target variable |
|---|---|---|---|
| 1 | male | <65 | 1.7 |
| 2 | male | 65-75 | NA |
| 3 | male | =>75 | 2.1 |
| 4 | female | <65 | 1.5 |
| 5 | female | 65-75 | 1.6 |
| 6 | female | =>75 | NA |
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.