View source: R/paket_nph_2-1_1.R
rSurv_fun | R Documentation |
Draws independent random survival times from mixpch
objects.
rSurv_fun(n, x)
n |
Number of random draws |
x |
An object of class |
The mixpch object stores the survival function up to some time T. For random times equal or larger T, the value T is returned.
A vector of random survival times.
Robin Ristl, robin.ristl@meduniwien.ac.at
Robin Ristl, Nicolas Ballarini, Heiko Götte, Armin Schüler, Martin Posch, Franz König. Delayed treatment effects, treatment switching and heterogeneous patient populations: How to design and analyze RCTs in oncology. Pharmaceutical statistics. 2021; 20(1):129-145.
rSurv_conditional_fun
, sample_fun
, sample_conditional_fun
A <- pop_pchaz(Tint = c(0, 90, 1500), lambdaMat1 = matrix(c(0.2, 0.1, 0.4, 0.1), 2, 2) / 365, lambdaMat2 = matrix(c(0.5, 0.2, 0.6, 0.2), 2, 2) / 365, lambdaProg = matrix(c(0.5, 0.5, 0.4, 0.4), 2, 2) / 365, p = c(0.8, 0.2), timezero = FALSE, discrete_approximation = TRUE) rSurv_fun(n = 10, x = A)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.