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

# st: RE: nbreg and median estimates

 From "Kieran McCaul" To Subject st: RE: nbreg and median estimates Date Thu, 19 Aug 2010 05:24:20 +0800

```...

While length of stay is a count of the number of days in hospice care,
it is not a count variable that would be expected to have an underlying
Poisson distribution.  It's a time variable, more specifically a
time-to-event variable. If anything, it will have an underlying
exponential distribution. So if you want to estimate the median length
of stay, you should be using survival analysis.  Kaplan-Meier will allow
you to estimate this, providing at least 50% of the sample have failed
during the course of follow-up.

Also, if you have a large number of zeros - zero lengths of stay, I
presume - this is likely due to measuring length of stay in days, so
that anyone with a length of stay of less than a whole day is coded
zero.  If this is so, then the zeros arise because length of stay is not
being measured with sufficient precision.

Ideally, this could be resolved if you had the time of day for both
entry and exit, but I suspect that this may not be available to you.

In the absence of time of day, you could calculate the survival time as:

gen surv = (exitdate - entrydate) + 1

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Hardy, Dale S
Sent: Wednesday, 18 August 2010 11:30 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: nbreg and median estimates

Hi All,

I have a dataset with count data for length-of-stay (days) in hospice
care.I am using a poisson regression model with the negative binomial
distribution (nbreg command) to correct for overdispersion of zeros in
the data. However, the estimates I got are based on the means. How can I
obtain estimates based on the median length-of-stay.

Thanks a bunch.

Dale Hardy, PhD

*
*   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/
```