Package 'airship'

Title: Visualization of Simulated Datasets with Multiple Simulation Input Dimensions
Description: Plots simulation results of clinical trials. Its main feature is allowing users to simultaneously investigate the impact of several simulation input dimensions through dynamic filtering of the simulation results. A more detailed description of the app can be found in Meyer et al. <DOI:10.1016/j.softx.2023.101347> or the vignettes on 'GitHub'.
Authors: Elias Laurin Meyer [aut, cre] , Constantin Kumaus [aut, ctb], Michal Majka [aut, ctb] , Franz Koenig [aut, ctb]
Maintainer: Elias Laurin Meyer <[email protected]>
License: GPL-3
Version: 1.4.3
Built: 2024-12-06 01:36:26 UTC
Source: CRAN

Help Index


Runs the Shiny app "AIRSHIP".

Description

Runs the Shiny app "AIRSHIP".

Usage

airship(
  dfData = NULL,
  cLastInputVar = NULL,
  cReplicationVar = NULL,
  bIsFacts = FALSE
)

Arguments

dfData

Dataset that should be plotted by Airship; can be NULL if upload should be done within the app.

cLastInputVar

Optional and only useful in combination with dfData. Character name of last input variable.

cReplicationVar

Optional and only useful in combination with dfData. Character name of simulation replication variable.

bIsFacts

Boolean variable; is the supplied dfData a FACTS aggregated simulation file.

Value

No return value

Examples

if(interactive()){
airship()
}

# See Vignette.

Example Data 1

Description

An artificially simulated dataset containing bivariate normal outcomes. Outcomes depend on four input variables in a very simple manner. For each set of input variables, 1000 replications are simulated.

Usage

ExampleData1

Format

An object of class data.frame with 81000 rows and 7 columns.

Examples

input1 <- c("A", "B", "C")
input2 <- c(1, 2, 3)
input3 <- c("Z", "Y", "X")
input4 <- c(11, 12, 13)
replications <- 1:1000

scenarios <- 
  expand.grid(
    replications = replications,
    input1 = input1,
    input2 = input2,
    input3 = input3,
    input4 = input4
  )

for (i in 1:nrow(scenarios)) {
  
  var <- ifelse(scenarios$input1[i] == "A", 1, 10)
  cor <- ifelse(scenarios$input3[i] == "Z", 0.7, 0.1)
  
  out <- mvtnorm::rmvnorm(
    1, 
    mean = c(scenarios$input2[i], scenarios$input4[i]),
    sigma = matrix(c(var, cor, cor, var), nrow = 2)
  )
  
  scenarios$output1[i] <- out[1]
  scenarios$output2[i] <- out[2]
  
}

ExampleData1 <- scenarios

Example Data 2

Description

Simulated dataset from Meyer et al. (2022) https://doi.org/10.1002/pst.2194.

Usage

ExampleData2

Format

An object of class data.frame with 10080 rows and 18 columns.

Source

https://github.com/el-meyer/airship/blob/master/data/ExampleDataNASH.csv