R code for chapter 3
Section 3.2 First simulation example: with constant cause-specifc hazards. |
|
Second example: α02(t) Weibull. Here, we use the inversion method to generate the event times. |
|
For illustration, we create a function to generate event times using uniroot(). It takes as arguments n, the sample size and max.int which means that the solution will be searched between 0 and max.int. As output you will get the event times. |
|
Example: |
|
Kontakt
Klicken Sie hier um zu unserer Kontaktseite zu gelangen.