simrec allows simulation of recurrent event data following the multiplicative intensity model described in Andersen and Gill (1982), with the baseline hazard being a function of the total/calendar time.
To induce between-subject-heterogeneity, a random effect covariate (frailty term) can be incorporated.
Furthermore, viasimreccomp simulation of data following a multistate model with recurrent event data of one type and a competing event is possible.
simrecint gives the possibility to additionally simulate a recruitment time for each individual and cut the data to an interim data set.
WithsimrecPlot andsimreccompPlot the data can be plotted.
To install the development version for the packagesimrec, please start a current version of R and type (usingremotes):
# currently this can be done via githubinstall.packages("remotes")# if neededremotes::install_github("federicomarini/simrec")# or if needed:remotes::install_github("federicomarini/simrec", build_vignettes=TRUE, dependencies=TRUE)To inspect the vignette and the code used in it, type:
vignette("simrec-vignette-Rhelp")## and/orbrowseVignettes("simrec")