Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

simsurvdata

Simulate Survival Data


Description

Function for simulating survival data.

Usage

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

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.

Value

Examples

simsurvdata()

survivalmodels

Models for Survival Analysis

v0.1.11
MIT + file LICENSE
Authors
Raphael Sonabend [aut, cre] (<https://orcid.org/0000-0001-9225-4654>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.