Learn R Programming

psborrow2 (version 0.0.4.0)

create_event_dist: Specify a Time to Event Distribution

Description

Uses simsurv::simsurv to generate time to event data. See simsurv help for more details.

Usage

create_event_dist(
  dist = NULL,
  lambdas = NULL,
  gammas = NULL,
  mixture = FALSE,
  pmix = 0.5,
  hazard = NULL,
  loghazard = NULL,
  cumhazard = NULL,
  logcumhazard = NULL,
  ...
)

null_event_dist()

Value

A SimDataEvent object

null_event_dist returns an object with no parameters specified that does not simulate event times.

Arguments

dist

Specify the distribution "exponential"

lambdas

Scale parameter

gammas

Second parameter needed for Weibull or Gompertz distributions

mixture

Use mixture model?

pmix

Proportion of mixtures

hazard

A user defined hazard function

loghazard

Alternatively, a user defined log hazard function

cumhazard

Alternatively, a user defined cumulative hazard function

logcumhazard

Alternatively, a user defined log cumulative hazard function

...

Other simsurv parameters

Examples

Run this code
weibull_surv <- create_event_dist(dist = "weibull", lambdas = 1 / 200, gammas = 1)
exp_event_dist <- create_event_dist(dist = "exponential", lambdas = 1 / 36)
null_event_dist()

Run the code above in your browser using DataLab