Nonparametric regression with survival data.

Usage

sm.survival(x, y, status, h, hv=0.05, p=0.5, status.code=1, 
  eval.points=NA, ngrid=50, display="lines", xlab=NA, ylab=NA, 
  lty=1, add=F, ...)

Arguments

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 status.code defines a complete survival time.
h the smoothing parameter applied to the covariate scale. A normal kernel function is used and h is its standard deviation.
hv a smoothing parameter applied to the weighted Kaplan-Meier functions 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 status which defines a complete survival time.
eval.points the points at which the estimate will be evaluated.
ngrid the number of points in a regular grid over the covariate scale at which the estimate will be evaluated, if eval.points is set to NA.
display The setting "none" will prevent any graphical output from being produced. The default setting "lines" (or indeed any other value) will produce a plot of the data and estimate.
xlab the label attached to the x-axis.
ylab the label attached to the y-axis.
lty the line type used to plot the estimate.
add a logical value which controls whether the estimate is added to the current plot. Its default value is F, which creates a new plot.
... additional graphical parameters.

Description

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 Kaplan-Meier 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.

Details

see Section 3.5 of the reference below.

Value

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.

Side Effects

none.

References

Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis: the Kernel Approach with S-Plus Illustrations. Oxford University Press, Oxford.

See Also

sm.regression

Examples

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)


[Package Contents]