Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# Re: st: R: death rate calculation - (flag: Stata 9/2 SE)

 From Steven Samuels To statalist@hsphsun2.harvard.edu Subject Re: st: R: death rate calculation - (flag: Stata 9/2 SE) Date Sat, 30 Oct 2010 15:09:18 -0400

```--
```
Here are some more illustrations for computing rates with -poisson- as well as -ratio-. One can argue that, because separate reports were made for each household, CIs should be based on HH variation. So, I've included an example of that.
```

Steve

Steven J. Samuels
sjsamuels@gmail.com
18 Cantine's Island
Saugerties NY 12477
USA
Voice: 845-246-0774
Fax:    206-202-4783

******************************************************
sysuse auto, clear
rename foreign death
gen exp1000 =mpg/1000
recode rep78 1/2=3

/* Overall Rates */
ratio death/exp1000
bootstrap, reps(100): ratio death/exp1000

quietly poisson death, exposure(exp1000)
nlcom exp(_b[_cons]) //CI based on the Poisson Assumption

quietly poisson death, exposure(exp1000) robust
nlcom exp(_b[_cons]) //CI based on robust SE

gen household = int(_n/5)  //artificial HH cluster variable

quietly poisson death, exposure(exp1000) vce(cluster household)
nlcom exp(_b[_cons]) //CI based on hh variation

/* Subgroup computations */
total death, over(rep78)

bootstrap, reps(100): ratio death/exp1000, over(rep78)
estat bootstrap    //better CIs

levelsof rep78, local(lv)
foreach i of local lv {
di "rep78 = `i'"
quietly poisson death if rep78==`i', exposure(exp1000) robust
nlcom exp(_b[_cons]) //CI based on robust SE
}
******************************************************

```
```RAM:
```
I thought that's what you meant, but I'm still a little confused. If you have complete counts of people and events between 2006 and 2009, how did you use external data? Ignoring external data, I assume you have the following variables, or something like them:
```
date_enter   // date entered into observation
?Jan 1 2006 individuals living in the HH in Jan 2006
```
? Month of entry to the HH for individuals who were not living in the HH in Jan 1 2006 ( month of birth for children)
```date_exit   //date observation ended
? Date of interview for persons alive at interview
? Month of death for deaths
? Month of exit for those who left the HH for other reasons

death ( indicator for end point)
= 1 for those who died
= 0 for those alive at the date that observation ended

```
Note: because you have only month of deaths and of some entries and exits, there will be measurement error. I suggest that you assign day of month either as the 15-th or assign it randomly to a number between 1 & the number of days. Using the 15-th will reduce the maximum error to ± 1 month. Also, if you want age-specific death rates, , then some people will cross an age-group boundary during the course of follow-up. You would have to split the observation time for such people between age groups. See -stset- and -stsplit-.
```
*********************************************
gen exposure = (date_enter - date_exit)
**********************************************
```
Comment: There are two situations in which these dates and exposure times will be problematic: 1) deaths in the first month of observation; and 2) infant deaths in the first month of life.
```
To get deaths per 1,000 person years,
***************************************
gen exp1000 = exposure/(1000*365.25)
**************************************
ratio death/exp1000
ratio death/exp1000, over(age_gp gender)
****************************************

```
Many investigators put confidence intervals around rates computed from complete data. They consider that the rates display "natural variability" ( http://stat-www.berkeley.edu/~brill/Papers/biometrics.pdf) . I agree with this approach. To get better CIs in Stata 9 I would use:
```**************************************
bootstrap, reps(1000):  ratio death/exp1000
****************************************

For modeling, try -poisson- or one of Stata's other count commands.

Regards,

Steve

Steven J. Samuels
sjsamuels@gmail.com
18 Cantine's Island
Saugerties NY 12477
USA
Voice: 845-246-0774
Fax:    206-202-4783

```
```
```
On Fri, Oct 29, 2010 at 4:15 AM, Steven Samuels <sjsamuels@gmail.com> wrote:
```-
```
You recently asked for assistance with a sample survey, but you say nothing about a sample in this thread. Since you used the word "census" (which means an attempted 100% count), may we assume that you have observations from all
```the households in the study population?

Steve

On Oct 28, 2010, at 7:38 AM, Rajaram Subramanian Potty wrote:

Dear All,
But my data set is not in the form to do a event history analysis.  I
have the details of all the usual residents in the household and
collected information on age, sex and other paritculars of the persons
present (surviving) at the time of survey. And for all the person who
dead after the reference period, i.e. after 2006, we have collected
age at death, sex of the person, month of death and year of death.
From this information, I want to calculate the death rate.

Is any one know how my data can be converted to do the analysis that
is suggested by Carlo?

Thanks and regards,

RAM
```
On Thu, Oct 28, 2010 at 2:39 PM, Carlo Lazzaro <carlo.lazzaro@tin.it> wrote:
```
Dera Rajaram,

- help stptime -

can light the way.

Kind Regards,
Carlo
-----Messaggio originale-----
Da: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Rajaram
Subramanian Potty
Inviato: giovedì 28 ottobre 2010 7.33
A: statalist@hsphsun2.harvard.edu
Oggetto: st: death rate calculation

Dear All,

I would like to calculate the death rate from a Household Census
conducted in the selected areas of a district. In the household we
have listed information on all the usual members in the household and
the number of usual residents died since January 2006. The census was
```
carried out in the year 2009. I just want to know how to calculate the death rate using the stata. Presently, I am calculating the death rate using excel after obtaining the total usual resident deaths during the
```reference period and the total usual resident population (converting
the population enumerated into the person years lived during the
reference period using the population growth in the district).

Thanks and regards,

RAM
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

```
```
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

```
```
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```