epa {relsurv} | R Documentation |
Excess hazard function smoothing
Description
An Epanechnikov kernel function based smoother for smoothing the baseline
excess hazard calculated by the rsadd
function with the EM
method.
Usage
epa(fit, bwin, times, n.bwin = 16, left = FALSE)
Arguments
fit |
Fit from the additive relative survival model using the |
bwin |
The relative width of the smoothing window (default is 1). |
times |
The times at which the smoother is to be evaluated. If missing, it is evaluated at all event times. |
n.bwin |
Number of times that the window width may change. |
left |
If |
Details
The function performs Epanechnikov kernel smoothing. The follow up time is
divided (according to percentiles of event times) into several intervals
(number of intervals defined by n.bwin
) in which the width is
calculated as a factor of the maximum span between event times. Boundary
effects are also taken into account on both sides.
Value
A list with two components:
lambda |
the smoothed excess baseline hazard function |
times |
the times at which the smoothed excess baseline hazard is evaluated. |
References
Package. Pohar M., Stare J. (2006) "Relative survival analysis in R." Computer Methods and Programs in Biomedicine, 81: 272–278
Relative survival: Pohar, M., Stare, J. (2007) "Making relative survival analysis relatively easy." Computers in biology and medicine, 37: 1741–1749.
EM algorithm: Pohar Perme M., Henderson R., Stare, J. (2009) "An approach to estimation in relative survival regression." Biostatistics, 10: 136–146.
See Also
Examples
data(slopop)
data(rdata)
#fit an additive model with the EM method
fit <- rsadd(Surv(time,cens)~sex+age,rmap=list(age=age*365.241),
ratetable=slopop,data=rdata,int=5,method="EM")
sm <- epa(fit)
plot(sm$times,sm$lambda)