Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Discrepancy between logit and log links in glm


From   "roger webb" <[email protected]>
To   [email protected]
Subject   Re: st: Discrepancy between logit and log links in glm
Date   Wed, 21 Jul 2004 09:39:33 +0100

Robert,

I found your post about the reasons for and solutions to convergence problems in log-binomial models very enlightening. I was particularly interested in the point you raise about the discrepancy between the Poisson model (with robust variance) and the log-binomial model increasing as the probability of the outcome event increases (see below):

When I began this reply, I had three alternatives in mind. Since then, Roger
Webb <[email protected]> has mentioned the first to the list: use
-poisson- with the -robust- option. He states that the results are the same
as -glm, fam(binomial) link(log)-. They are not exactly the same, but nearly
the same in most cases. The discrepancy comes from the fact that Poisson
models allow for counts bigger than 0/1, but when your data are all 0/1, the
probability of counts bigger than 1 is usually going to be small, and
oftentimes too small to make a difference. Note, however, that the difference
between binomial/log and Poisson increases with the probability of an event,
so the discrepancy can be higher in cases where binomial/log would fail to
converge in the first place. Be cautious.

In a data set of mine, the probability of poor outcome overall is about 50%, 82% in the exposed group and 36% in the unexposed group, i.e.:

. tab rwbstat2 rwillpn2, col

| rwillpn2
rwbstat2 | 0 1 | Total
-----------+----------------------+----------
0 | 103 8 | 111
| 63.58 17.78 | 53.62
-----------+----------------------+----------
1 | 59 37 | 96
| 36.42 82.22 | 46.38
-----------+----------------------+----------
Total | 162 45 | 207
| 100.00 100.00 | 100.00

The Poisson model (with robust variance) gives an almost identical risk ratio (and SE) to that given by 'binreg' or 'glm, link(log) family(binomial)' (please see below). So I'm now a little confused as when the Poisson model is inappropriate and in what circumstances it becomes significantly discrepant from the log- binomial. I'd be very grateful for you advice on this matter.

Roger Webb
University of Manchester (UK)



i.rwillpn2 _Irwillpn2_0-1 (naturally coded; _Irwillpn2_0 omitted)

Iteration 1 : deviance = 365.2877
Iteration 2 : deviance = 257.9924
Iteration 3 : deviance = 254.6188
Iteration 4 : deviance = 254.5983
Iteration 5 : deviance = 254.5983
Iteration 6 : deviance = 254.5983

Residual df = 205 No. of obs = 207
Pearson X2 = 207 Deviance = 254.5983
Dispersion = 1.009756 Dispersion = 1.241943

Bernoulli distribution, log link
------------------------------------------------------------------------------
| EIM
rwbstat2 | Risk Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Irwillpn2_1 | 2.257627 .2818068 6.52 0.000 1.767671 2.883387
------------------------------------------------------------------------------

. xi: glm rwbstat2 i.rwillpn2, link(log) family(binomial) eform
i.rwillpn2 _Irwillpn2_0-1 (naturally coded; _Irwillpn2_0 omitted)

Iteration 0: log likelihood = -182.64385
Iteration 1: log likelihood = -133.29222
Iteration 2: log likelihood = -127.46681
Iteration 3: log likelihood = -127.29986
Iteration 4: log likelihood = -127.29913
Iteration 5: log likelihood = -127.29913

Generalized linear models No. of obs = 207
Optimization : ML: Newton-Raphson Residual df = 205
Scale parameter = 1
Deviance = 254.5982565 (1/df) Deviance = 1.241943
Pearson = 207 (1/df) Pearson = 1.009756

Variance function: V(u) = u*(1-u) [Bernoulli]
Link function : g(u) = ln(u) [Log]
Standard errors : OIM

Log likelihood = -127.2991283 AIC = 1.249267
BIC = -838.6090961

------------------------------------------------------------------------------
rwbstat2 | Risk Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Irwillpn2_1 | 2.257627 .2818068 6.52 0.000 1.767671 2.883387
------------------------------------------------------------------------------

. xi: poisson rwbstat2 i.rwillpn2, robust irr
i.rwillpn2 _Irwillpn2_0-1 (naturally coded; _Irwillpn2_0 omitted)

Iteration 0: log pseudo-likelihood = -162.8367
Iteration 1: log pseudo-likelihood = -162.83602
Iteration 2: log pseudo-likelihood = -162.83602

Poisson regression Number of obs = 207
Wald chi2(1) = 42.35
Prob > chi2 = 0.0000
Log pseudo-likelihood = -162.83602 Pseudo R2 = 0.0408

------------------------------------------------------------------------------
| Robust
rwbstat2 | IRR Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Irwillpn2_1 | 2.257627 .28249 6.51 0.000 1.766623 2.885097
------------------------------------------------------------------------------

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/








© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index