sm.survival {sm}  R Documentation 
This function creates a smooth, nonparametric estimate of the quantile of the distribution of survival data as a function of a single covariate. A weighted productlimit estimate of the survivor function is obtained by smoothing across the covariate scale. A small amount of smoothing is then also applied across the survival time scale in order to achieve a smooth estimate of the quantile.
sm.survival(x, y, status, h , hv = 0.05, p = 0.5, status.code = 1, ...)
x 
a vector of covariate values. 
y 
a vector of survival times. 
status 
an indicator of a complete survival time or a censored value. The value of

h 
the smoothing parameter applied to the covariate scale. A normal kernel
function is used and 
hv 
a smoothing parameter applied to the weighted to the productlimit estimate derived from the smoothing procedure in the covariate scale. This ensures that a smooth estimate is obtained. 
p 
the quantile to be estimated at each covariate value. 
status.code 
the value of 
... 
other optional parameters are passed to the 
see Section 3.5 of the reference below.
a list containing the values of the estimate at the evaluation points and the values of the smoothing parameters for the covariate and survival time scales.
a plot on the current graphical device is produced, unless the option
display="none"
is set.
Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis: the Kernel Approach with SPlus Illustrations. Oxford University Press, Oxford.
x < runif(50, 0, 10) y < rexp(50, 2) z < rexp(50, 1) status < rep(1, 50) status[z<y] < 0 y < pmin(z, y) sm.survival(x, y, status, h=2)