surv_param_sim_pre_resampled: Simulation of parametric survival model with an...

View source: R/surv_param_sim_pre_resampled.R

surv_param_sim_pre_resampledR Documentation

Simulation of parametric survival model with an already-resampled dataset

Description

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.

Details

See surv_param_sim() for additional details.

Value

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


survParamSim documentation built on June 3, 2022, 9:06 a.m.