Library: | stats |
See also: | kaplanmeier |
Quantlet: | hazard | |
Description: | Nonparametric estimator of the hazard rate. The bandwidth parameter can be optionally chosen. |
Usage: | h = hazard (y {,bandwidth}) | |
Input: | ||
y | n x 2 matrix | |
bandwidth | scalar | |
Output: | ||
h | vector |
;Nonparametric estimator of the hazard rate for the leukaemia ; data, by using the default grid. ; loads the library stats library("stats") x = read("leukaemia.dat") h = hazard(x) h
Contents of h (first seven points) [ 1,] 5.95 0.16213 [ 2,] 6.12 0.165 [ 3,] 6.29 0.16729 [ 4,] 6.46 0.16895 [ 5,] 6.63 0.16995 [ 6,] 6.8 0.17026 [ 7,] 6.97 0.16986