Learn R Programming

survivalmodels (version 0.1.9)

simsurvdata: Simulate Survival Data

Description

Function for simulating survival data.

Usage

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

Arguments

n

(integer(1)) Number of samples

trt, age, sex

(numeric(1)) Coefficients for covariates.

cutoff

(numeric(1)) Deprecated, in future use cens.

cens

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

Value

data.frame()

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
# NOT RUN {
simsurvdata()

# }

Run the code above in your browser using DataLab