Re: Life expectancy [message #27146 is a reply to message #23200] |
Tue, 20 June 2023 11:57 |
|
Hi!
I want to extend this conversation.
I am working on complete life tables for life expectancies.
Github STATA code library Ch16 AM (AM rates do file) provides logic for calculating the age specific rates.
In this regards, Exposure years calculated involves macros in logic. These macros are not much understandable. I need to have simplified form of it.
Following is my logic build from explanation of DHS statistics mannual guide. Kindly review the following code.
************************************************************ ************************************************************ *************
******Exposure years from Persons Record - For Signle Year Complete Life Table*************
gen deoi=doi-1
lab var deoi "Date of End of Interview"
gen ageeoe=deoi-cmcdob
lab var ageeoe "Age in months at the end of the period"
gen ageeoe1=ageeoe/12.
lab var ageeoe1 "The single age group at end of period"
gen agem=ageeoe-ageeoe1*12+1
lab var agem "The number of months in this age group - months"
gen remexp=36-agem
lab var remexp "remaining exposure in the 36-month period"
table qh07 if qh05==1 , contents(count remexp)
************************************************************ ************************************************************ *************
Can somebody from DHS share most simplified form of code to calculated the exposure years for ASDR. Explanatory notes to these simplified codes will be really helpfull.
Regards
Waqas Imran
Waqas Imran
|
|
|