The U.S. 2002 Life Table
|
The file us2002s.dat has two columns representing age and
the survival function by single years of age, for ages 0 to 100.
The data come from the latest period life table for the U.S.
(National Vital Statistics Reports, Volume 53, Number 6, 2002. Available at http://www.cdc.gov/nchs/data/nvsr/nvsr53/nvsr53_06.pdf.)
Here's how to read and plot the survival function, and how to compute and plot the (log of the) hazard function in Stata. I also include a command to check visually that the Gompertz provides a good fit to mortality above age 30. | |
// survival
infile age S using us2002s.dat
twoway line S age
// hazard
gen H = - log(S)
gen h = H[_n] - H[_n-1]
list in 1/5
gen logh = log(h)
gen agem = age - 0.5 if h < .
twoway line logh agem
// Gompertz
twoway (line logh agem if age > 30) ///
(lfit logh agem if age > 30)
|
|
