Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: stset for grouped data

From   "Jesper Lindhardsen" <>
To   <>
Subject   RE: st: stset for grouped data
Date   Mon, 18 Apr 2011 11:03:48 +0200

Hi Mukesh,

Sorry if I missed/misunderstood something, but why do you want to stset the data??
While -poisson- is indeed very very useful here, I would also look at -ci- or (if explanatory variables/rate ratios are needed) -ir- as these are specifically made for this use....
For example

** code **

Total incidence per 1000 person-years: 

g pop1000=population/1000

ci cases, e(pop1000)

/* incidence by year or agegp */

bysort year: ci cases, e(pop1000)

bysort agegp: ci cases, e(pop1000)

** end code **

Of course, you would still have to trust that the population equals the time at risk ie no censoring.
As -ci- only accepts one grouping variable, you can use -egen group- to combine eg year and agegp.



Jesper Lindhardsen
MD, PhD candidate
Department of Cardiovascular Research
Copenhagen University Hospital, Gentofte

----Original Message-----
From: [] On Behalf Of Joerg Luedicke
Sent: 16 April 2011 04:33
Subject: Re: st: stset for grouped data

On Fri, Apr 15, 2011 at 4:15 PM, Joerg Luedicke
<> wrote:

> So in case of the data you provided in your OP, there are 2 cases in
> the youngest age group that had a population size of 5000. So the rate
> is 2/5000=0.0004 (btw the rate for the oldest age group is
> 75/7896=0.0095 and 0.0095/0.0004=23.75 which matches the result from
> the regression)  per 100 individuals per year.

Looking at Steven's post I noticed a mistake in mine: 2/5000=0.0004 is
of course 0.0004 per one individual, not per 100. So it's 0.04 per 100
and eventually 0.4 per 1000.


*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index