Skip to contents

Simulation of parametric survival model with an already-resampled dataset

Usage

surv_param_sim_pre_resampled(
  object,
  newdata.resampled,
  newdata.orig = NULL,
  censor.dur = NULL,
  coef.var = TRUE,
  na.warning = TRUE
)

Arguments

object

A survreg class object. Currently accept exponential, lognormal, weibull, loglogistic, and gaussian distributions.

newdata.resampled

A required input, the already resampled dataset for simulation. This dataset must have: (a) rep variable indicating the #simulation groups, and (b) the same number of subjects per each rep

newdata.orig

An optional input needed for calculating KM and HR for the observed data.

censor.dur

A two elements vector specifying duration of events censoring. Censoring time will be calculated with uniform distribution between two numbers. No censoring will be applied if NULL is provided.

coef.var

Boolean specifying whether parametric bootstrap are performed on survival model coefficients, based on variance-covariance matrix. If FALSE, prediction interval only reflects inherent variability from survival events.

na.warning

Boolean specifying whether warning will be shown if newdata contain subjects with missing model variables.

Value

A survparamsim object that contains the original survreg class object, newdata, and a data frame for predicted survival profiles.

Details

See surv_param_sim() for additional details.