Description Usage Arguments Details Value Author(s) References Examples
Estimate density function from a vector of right-censored survival times using kernel functions.
Options include three types of bandwidth functions, three types of boundary correction, and four shapes
for the kernel function. Uses the global and local bandwidth selection algorithms and the boundary kernel
formulations described in Mueller and Wang (1994). The nearest neighbor bandwidth formulation is based
on that described in Gefeller and Dette (1992). The statistical properties of many of these estimators
are reported and compared in Hess et al. The mudens(.)
function is an R wrapper around C code
and returns an object of class 'mudens' based on the density estimation in the HADES program developed
by H.G. Mueller.
1 2 3 |
times |
A vector of survival times. It does not need to be sorted. |
delta |
A vector indicating censoring: |
subset |
A logical vector indicating the observations used in analysis.
|
min.time |
Left bound of the time domain used in analysis. If missing, |
max.time |
Right bound of the time domain used in analysis.
If missing, |
bw.grid |
Bandwidth grid used in the MSE minimization.
If |
bw.pilot |
Pilot bandwidth used in the MSE minimization. If missing, the default value is the one recommended by Mueller and Wang (1994):
where |
bw.smooth |
Bandwidth used in smoothing the local bandwidths. Not used if
|
bw.method |
Algorithm to be used. Possible values are: |
b.cor |
Boundary correction type. Possible values are:
|
n.min.grid |
Number of points in the minimization grid. This value greatly influences the computing time. Default value is |
n.est.grid |
Number of points in the estimation grid, where hazard estimates are computed. Default value is |
kern |
Boundary kernel function to be used. Possible values are:
|
Estimate density function from a vector of right-censored survival times.
The mudens object contains a list of the input data and parameter values as well as a variety of output data.
The density function estimate is contained in the haz.est
element and the corresponding time points are in est.grid
.
The unsmoothed and smoothed local bandwidths are in bw.loc
and bw.loc.sm
, respectively.
When setting bw.method='local'
or 'knn'
, to check the shape of the bandwidth function used in the estimation,
use plot(fit$pin$min.grid, fit$bw.loc)
to plot the unsmoothed bandwidths and
use lines(fit$est.grid, fit$bw.loc.sm)
to superimpose the smoothed bandwidth function.
We can also use bw.smooth
to change the amount of smoothing used on the bandwidth function.
For bw.method='global'
, use plot(fit$bw.grid, fit$globlmse)
to check the minimization process, and
plot the estimated IMSE values over the bandwidth search grid; while for
bw.method='k'
, use plot(fit$k.grid, fit$k.imse)
.
You may want to repeat the search using a finer grid over a shorter interval to fine-tune the optimization or if the observed minimum is at the extreme of the grid you should specify a different grid.
Returns an object of class 'mudens'
, containing input and output values.
Methods working on such an object are:
plot
, lines
, summary
. For a detailed description of its components,
see object.mudens
in the mudens package.
Kenneth R. Hess
Hess, K.R. and Zhong, M. Density Function Estimation for Possibly Right-Censored Data Using Kernel Functions. Submitted.
H.G. Mueller and J.L. Wang. Hazard Rates Estimation Under Random Censoring with Varying Kernels and Bandwidths. Biometrics 50:61-76, March, 1994.
O.Gefeller and H. Dette. Nearest Neighbor Kernel Estimation of the Hazard Function From Censored Data. J. Statist. Comput. Simul., Vol.43:93-101, 1992.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.