analyse_sim {gestate}R Documentation

Analyse simulations of time-to-event data using arbitrary event, censoring and recruitment distributions.

Description

Function for analysing simulated time-to-event trial data produced by simulate_trials() or simulate_trials_strata().
This function automatically reads in either list or matrix simulate_trials() data formats. It performs log rank test and Cox regression analysis by default, but can also/instead perform RMST and/or landmark analyses. Covariate adjusted (/ stratified) analysis may be selected by using the "stratum" argument. If a stratum is specified, it will be included as a covariate in Cox and RMST analysis, and as a stratum in a stratified log-rank test and an inverse-precision-weighted landmark test. Strata values are handled as factors, so continuous covariates are not supported.
Analysis is typically the slowest part of simulation studies, so parallel processing using the doParallel package is built in. Parallel processing is enabled by setting the number of cores in the "parallel_cores" argument. Use of parallel processing is recommended for largescale (e.g. 100,000 iteration) simulations. To avoid unnecessary issues, ensure that the number of cores specified does not exceed number of threads provided by hardware.

Usage

analyse_sim(
  data,
  LR = TRUE,
  RMST = NA,
  landmark = NA,
  stratum = "",
  parallel_cores = 1,
  Time = "Time",
  Event = "Censored",
  censoringOne = TRUE,
  Trt = "Trt",
  Iter = "Iter"
)

Arguments

data

Output file from simulate_trials(). Only simulate_trials() or simulate_trials_strata() output is supported, in either "list" or "matrix" format.

LR

Requests log-rank test and Cox regression. Default=TRUE

RMST

Requests Restricted Mean Survival Time analysis with specified (positive integer) restriction time, leave NULL for no analysis. Default=NULL (no RMST analysis).

landmark

Requests Landmark analysis at specified (positive integer) time, leave NULL for no analysis. Default=NULL (no landmark analysis).

stratum

Specify name of column of a stratification factor and turn on stratified (LR/LM) and covariate-adjusted (Cox/RMST) analysis. By default, "", and no stratification.

parallel_cores

Positive integer specifying number of cores to use. If 1 specified then no parallel processing. Default=1 (no parallel processing).

Time

String specifying the name of the time column. Default="Time"

Event

String specifying the name of the censoring/event column. Default="Censored" (and by default it is a censoring column unless censoringOne=FALSE)

censoringOne

Boolean specifying whether censoring is denoted in the censoring/event column by a one (TRUE) or zero (FALSE). Default=TRUE (censorings denoted by 1, events by 0)

Trt

String specifying the name of the treatment column. Default="Trt"

Iter

String specifying the name of the iterations column. Default="Iter"

Value

Returns a table with one row per simulation. Table contains the following columns:

Author(s)

James Bell

References

Uno H, Claggett B, Tian L, Inoue E, Gallo P, Miyata T, Schrag D, Takeuchi M, Uyama Y, Zhao L, Skali H, Solomon S, Jacobus S, Hughes M, Packer M, Wei LJ. Moving beyond the hazard ratio in quantifying the between-group difference in survival analysis. Journal of clinical Oncology 2014,32, 2380-2385. Tian L, Zhao L, Wei LJ. Predicting the restricted mean event time with the subjects baseline covariates in survival analysis. Biostatistics 2014, 15, 222-233.

Examples

example_sim <- simulate_trials(active_ecurve=Weibull(250,0.8),control_ecurve=Weibull(100,1),
rcurve=LinearR(12,100,100), assess=20,iterations=100,seed=12345,detailed_output=TRUE)

example_analysis1 <- analyse_sim(example_sim)
example_analysis2 <- analyse_sim(data=example_sim,RMST=15,landmark=15)

example_strat_sim <- simulate_trials_strata(stratum_probs=c(0.5,0.5),
active_ecurve=c(Weibull(250,0.8),Weibull(100,1)), control_ecurve=Weibull(100,1),
rcurve=LinearR(12,100,100),assess=20,iterations=100,seed=12345)

example_strat_analysis <- analyse_sim(data=example_strat_sim,RMST=15,landmark=15,stratum="Stratum")

[Package gestate version 1.6.0 Index]