cond_sample.weibull: Simulate random variables from a Weibull distribution. The...

Description Usage Arguments Value

View source: R/weibull_functions.R View source: R/cond_sample.weibull.R

Description

Simulate random variables from a Weibull distribution. The function is parameterized with hazard: ν λ t^{nu-1}

Usage

1
2
## S3 method for class 'weibull'
cond_sample(u, t0, trt = 0, params)

Arguments

u

numeric vector, 0 ≤q u ≤q 1 for all elements in u.

t0

Nonnegative real number. The time the survival function is conditioned on. t0 = 0 will return samples from the unconditional distribution

params

a named list containing lambda, the Weibull scale parameter, and nu, the Weibull shape parameter, and log_HR, log hazard ratio

Value

a vector of failure times conditional on t0


kravitz-eli/simCondSurv documentation built on April 14, 2020, 6:02 a.m.