# Calculating life expectancy in Stata

I've been looking for resources on calculation of life expectancy uising Stata.

Combing Google results so far I've only been able to locate this module:

LXPCT_2: Stata module to calculate multistate life expectancies

Could you point me to any materials, preferably with sample code on this topic?

Thanks!

-
Are you aware of the ltable command and the survival analysis capacities, the so-called st commands? Both are part of the "official" Stata. –  user5644 Dec 21 '11 at 13:46
@lejohn: Yes, I'm. But the manuals for those commands are not answering my question so far. I was looking for something easier to digest for a novice - tutorial, example code with comments or even book chapter. –  radek Dec 21 '11 at 13:54
What kind of data do you have? Individual level data or grouped/aggregated data? –  user5644 Dec 21 '11 at 14:34
@lejohn: Starting point will be individual level records from cohort study. Working now on getting age/sex specific mortality rates and person years. –  radek Dec 21 '11 at 14:59
How is the data structured, though? The hard part about the st commands is getting the data in the right shape. From there, ltable and other commands are quite intuitive. Also see ats.ucla.edu/stat/stata/topics/survival.htm –  Keith Dec 22 '11 at 2:27