Learn R Programming

survivalmodels (version 0.1.191)

simsurvdata: Simulate Survival Data

Description

Function for simulating survival data.

Usage

simsurvdata(n = 100, trt = 2, age = 2, sex = 1.5, cens = 0.3)

Value

data.frame()

Arguments

n

(integer(1))
Number of samples

trt, age, sex

(numeric(1))
Coefficients for covariates.

cens

(numeric(1))
Proportion of censoring to be generated, cut-off time is then selected as the quantile that results in cens.

Details

Currently limited to three covariates, Weibull survival times, and Type I censoring. This will be expanded to a flexible simulation function in future updates. For now the function is primarily limited to helping function examples.

Examples

Run this code
simsurvdata()

Run the code above in your browser using DataLab