biv.rec.sim {BivRec}R Documentation

Bivariate Recurrent Response and Covariate Data Simulation

Description

This function simulates a series of alternating recurrent events based on simulations in Lee CH, Huang C-Y, Xu G, Luo X (2017).

Usage

biv.rec.sim(nsize, beta1, beta2, tau_c, set)

Arguments

nsize

sample size which refers to the number of subjects in the data set where each subject could have multiple episodes of events.

beta1

true coefficients for first gap time in the accelerated failure time model (AFT).

beta2

true coefficients for second gap time in the accelerated failure time model (AFT).

tau_c

maximum support of censoring time. Can take values as follows:

  • tau_c=63: corresponds to cr=15% and corresponding m_bar for each scenario in tables 1 and 2 of Lee CH, Huang C-Y, Xu G, Luo X (2017).

  • tau_c=30: corresponds to cr=30% and corresponding m_bar for each scenario in tables 1 and 2 of Lee CH, Huang C-Y, Xu G, Luo X (2017).

set

Simulation setting based on scenarios outlined in tables 1 and 2 in Lee CH, Huang C-Y, Xu G, Luo X (2017). Choose 1.1 (default) for scenario 1 with ρ=1 in the covariance matrix of the frailty vector, 1.2 for scenario 1 with ρ=0.5, 1.3 for scenario 1 with ρ=0 and 2.0 for scenario 2.

Value

Data frame with alternating recurrent event data and two covariates

References

  1. Lee C, Huang CY, Xu G, Luo X (2017). Semiparametric regression analysis for alternating recurrent event data. Statistics in Medicine, 37: 996-1008. https://doi.org/10.1002/sim.7563

Examples

library(BivRec)
set.seed(1234)
biv.rec.sim(nsize=150, beta1=c(0.5,0.5), beta2=c(0,-0.5), tau_c=63, set=1.1)

[Package BivRec version 1.0.0 Index]