surv_sims: Function to simulate survival data.

Description Usage Arguments Details Value

View source: R/ehr_simulation.R

Description

Model: proportional hazards, h(t; cov_mat, beta) = exp(cov_mat indicators for Type I censoring (common censoring time 'tc').

Usage

1
2
3
surv_sims(cov_mat, beta, cens_type = c("typeI", "noninformative"),
  baseline_hazard, cens_hazard = 0.04, cens_prob = 0, scale = 1,
  weibull_shape = 1)

Arguments

cov_mat

n x p matrix of cov_matiates

beta

p-vector of regression coefficients

cens_type

typeI censoring or non-informative based on exponential distribution

baseline_hazard

for modelling death dates

cens_hazard

log(hazard) for non-informative censoring

cens_prob

expected censoring fraction (0 <= cens_prob < 1). Used for typeI censoring

scale

value to scale up the time variable by

weibull_shape

shape parameter for the weibull distribution. 1 is the same as an exponential

Details

Weibull_shape is the k (shape) parameter from a weibull distribution

Value

Censored exponential survival times and censoring


rOpenHealth/rEHR documentation built on March 19, 2018, 7:58 a.m.