Skip to contents

Function to generate a random sample of survival data.

Usage

rsurv(
  formula,
  covariates,
  baseline = "weibull",
  gamma,
  psi = NULL,
  phi = NULL,
  max_fu
)

Arguments

formula

formula specifying the linear predictors

covariates

data frame containing the covariates used to generate the survival times

baseline

baseline model (currently only the Weibull distribution is available)

gamma

baseline parameters

psi

short-term regression coefficients

phi

long-term regression coefficients

max_fu

maximum follow-up time