Learn R Programming

SurvRegCensCov (version 1.7)

TimeSampleWeibull: Generate time-to-event data according to a Weibull regression model

Description

Generates time-to-event data using the transform inverse sampling method, and such that the time-to-event is distributed according to a Weibull distribution induced by censored and/or non-censored covariates. Can be used to set up simulations.

Usage

TimeSampleWeibull(covariate_noncens = NULL, covariate_cens, lambda, gamma, beta)

Arguments

covariate_cens

Censored covariate vector.

covariate_noncens

Matrix where each column represents a non-censored covariate.

lambda

Scale parameter.

gamma

Shape parameter.

beta

Regression parameters, ordered as \(\beta\) linked to the non-censored covariates, \(\beta\) linked to the censored covariate.

Author

Stanislas Hubeaux, stan.hubeaux@bluewin.ch