Obtains the probability of being at risk at given analysis times.
patrisk(time, piecewiseSurvivalTime, lambda, gamma)A vector of analysis times at which to calculate the probability of being at risk.
A vector that specifies the starting time of
piecewise exponential survival time intervals. Must start with 0, e.g.,
c(0, 6) breaks the time axis into 2 event intervals:
\([0, 6)\) and \([6, \infty)\).
Defaults to 0 for exponential distribution.
A vector of hazard rates for the event. One for each analysis time interval.
The hazard rate for exponential dropout, or a vector of hazard rates for piecewise exponential dropout.
A vector of probabilities of being at risk at the specified analysis times after enrollment for a patient in a treatment group with specified piecewise exponential survival and dropout distributions.