Bookmark and Share

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


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

st: RE: Dealing with exposure differences using logarithmic offsets versus rescaling


From   Timothy Mak <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: Dealing with exposure differences using logarithmic offsets versus rescaling
Date   Thu, 15 Aug 2013 16:04:10 +0800

Hi Dimitriy, 

I don't think you should be surprised that it didn't work with Gamma regression. I think you should be surprised it worked with Poisson. You can use the likelihood formulae for Poisson and Gamma regression to see for yourself that the likelihood is equivalent for the Poisson model, but not for the Gamma model. 

Tim

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dimitriy V. Masterov
Sent: 15 August 2013 07:07
To: Statalist
Subject: st: Dealing with exposure differences using logarithmic offsets versus rescaling

I am trying to test my intuition that logarithmic offsets should yield
the same estimates as dividing the outcome by exposure and using
exposure to weight.

This seems to work for count variable BI with the regular poisson or
its glm equivalent. However, when I try it with a continuous variable
GMB (measuring expenditures) using GLM with gamma family and log link,
the equivalence goes away. I am at a loss for why that is the case.
Any ideas or references would be much appreciated:

Here's my code:

gen lnt1 = ln(t1);
lab var lnt1 "Treatment Offset (ln of Days)";

gen bipd1 = bi1/t1;
gen gmbpd1 = gmb1/t1;

/* Simple Poisson Model for BI */
poisson bi1 i.treat, offset(lnt1) robust;
poisson bipm1 i.treat [iw=t1], robust;

/* Poisson Using GLM for BI */
glm bi1 i.treat, offset(lnt1) link(log) family(poisson) robust;
glm bipm1 i.treat [iw=t1], link(log) family(poisson) robust;

/* GMB using GLM */
glm gmb1 i.treat, offset(lnt1) link(log) family(gamma) robust;
glm gmbpm1 i.treat [iw=t1], link(log) family(gamma) robust;
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index