
Draw time to event (tte) from a Poisson or Poisson-Gamma (PG) Mixture/Negative Binomial (NB) Process using C++
Source:R/RcppExports.R
rpoisgamma_rcpp.RdDraw time to event (tte) from a Poisson or Poisson-Gamma (PG) Mixture/Negative Binomial (NB) Process using C++
Usage
rpoisgamma_rcpp(
n,
rate,
theta = NULL,
obs_time = 1,
t_reps = NULL,
seed = NULL,
return_ind_rate = FALSE,
return_df = FALSE
)Arguments
- n
The number of observations to be drawn
- rate
rate of the event (events per unit time)
- theta
Optional. If provided, Poisson-Gamma (NB). Represents gamma shape.
- obs_time
period over which events are observable
- t_reps
Optional. Number of TBEs to be generated to capture events within the observation window.
- seed
Optional integer seed for reproducibility.
- return_ind_rate
Logical: include individual rate vector in output when theta provided.
- return_df
Logical: return a data.frame with event-level rows (if TRUE).