[R] two-level poisson, again

From: Shige Song <shigesong_at_gmail.com>
Date: Wed 17 Aug 2005 - 16:52:50 EST


Hi,

I compare results of a simple two-level poisson estimated using lmer and those estimated using MLwiN and Stata (v.9).

In R, I trype:



m2 <- lmer(.D ~ offset(log(.Y)) + (1|pcid2) + educy + agri, male, poisson)

In Stata, I type:



xtpois _D educy agri, e(_Y) i(pcid2)

Results using R look like:



...
Random effects:
     Groups        Name    Variance    Std.Dev. 
      pcid2 (Intercept)       5e-10  2.2361e-05 
# of obs: 25360, groups: pcid2, 174

Estimated scale (compare to 1) 7.190793

Fixed effects:

               Estimate Std. Error z value Pr(>|z|)

(Intercept) -3.28548086  0.00408771 -803.75 < 2.2e-16 ***
educy        0.00507475  0.00039616   12.81 < 2.2e-16 ***
agri         0.01346887  0.00334837    4.02 5.758e-05 ***
...

Results using Stata look like:


          _D | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------
       educy |   .0120431   .0004441    27.12   0.000     .0111725    .0129136
        agri |   .0293177   .0035586     8.24   0.000      .022343    .0362924
       _cons |  -3.325073   .0076275  -435.93   0.000    -3.340023   -3.310123
          _Y | (exposure)
-------------+----------------------------------------------------------------
    /lnalpha |  -4.982977   .1156474                     -5.209641   -4.756312
-------------+----------------------------------------------------------------
       alpha |   .0068536   .0007926                      .0054636    .0085973

------------------------------------------------------------------------------

As you can see, the discrepency is significant! And results using MLwiN agree with Stata. Any help will be greately appreciated!

Shige



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Aug 17 16:58:30 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:50 EST