This function estimates the survival probability at tx when a piecewise exponential distribution is fitted to (times,cens) cens = 0 for censored, cens = 1 for uncensored. the change point is tchange and lamest is the estimated parameters
pexeest(times, cens, tchange, tx)
Arguments
times: All the event/censoring times used to fit the model
cens: censoring status used to fit the model
tchange: Change-points
tx: Time points to estimate the survival probability
Returns
quan survival probability lamest Lambda estimates for time periods divided by the change-points