Thanks to Kit Baum, there is now an updated version of the -stkerhaz-
package downloadable from SSC. In Stata, type
ssc desc stkerhaz
to find out more.
-stkerhaz- computes a kernel smoothed estimate of the hazard (or smr or
excess mortality) starting from the cumulative hazard (or smr or excess
mortality) function.
In this new version I added the estimates even in the time points where _t
is less than the bandwidth (and similarly in the right-hand tail of the
analysis time) applying asymmetric kernels described in the Klein and
Moeschberger's book (pp. 166-177).
Even if to this aim there is an official command -stcurve, hazard-, I
believe that -stkerhaz- still deserves some attention by the Stata Users
because -stkerhaz- :
- can compute log transformed confidence interval according to the formula
in K & M (p 168) or in Breslow and Day (cohort studies)
- allows to specify a by(varname), so in the graph we can simultaneously
assess the hazard function in different groups
- allows to specify and to draw in the same graph up to four different
bandwidths
- run under version 7