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, statalist.org is already up and running.


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

Re: st: RE: RE: Re: Loglinear quasi-symmetric agreement


From   brendan.halpin@ul.ie (Brendan Halpin)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: RE: Re: Loglinear quasi-symmetric agreement
Date   Mon, 11 Jun 2012 21:20:17 +0100

On Fri, Jun 08 2012, Scholes, Shaun wrote:

> The problem may be due to the presence of zero counts in the dataset rather than using -xi-/not using -xi-.

That is right. -glm- is trying to estimate the log of 0 and/or infinity
and failing. Instead it is giving you a big number with a huge SE. 

However, there is more to the xi/not xi difference than meets the eye. I
suspect the count variable has been changed (e.g., by replacing zero
cells with a small number such as 0.001 or adding such a constant to all
cells, a practice less in favour than it used to be, but recommended by
Agresti). Computers find it much easier to deal with log(0.001). 


. gen n = count
. replace n = 0.001 if count==0
. glm n i.px i.py i.qasym, fam(poi)

Generalized linear models                          No. of obs      =        16
Optimization     : ML                              Residual df     =         3
                                                   Scale parameter =         1
Deviance         =  .9782177411                    (1/df) Deviance =  .3260726
Pearson          =  1.580424814                    (1/df) Pearson  =  .5268083

Variance function: V(u) = u                        [Poisson]
Link function    : g(u) = ln(u)                    [Log]

                                                   AIC             =  4.237908
Log likelihood   = -20.90326338                    BIC             = -7.339548

------------------------------------------------------------------------------
             |                 OIM
           n |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          px |
          2  |  -6.954584     28.884    -0.24   0.810    -63.56618    49.65701
          3  |  -6.294418   28.87475    -0.22   0.827    -62.88789    50.29905
          4  |   4.536497   28.87152     0.16   0.875    -52.05064    61.12364
             |
          py |
          2  |  -7.627542   28.88293    -0.26   0.792    -64.23705    48.98197
          3  |  -4.794332   28.87187    -0.17   0.868    -61.38215    51.79349
          4  |  -5.324955   28.87152    -0.18   0.854    -61.91209    51.26218
             |
       qasym |
          2  |   5.397211   28.88398     0.19   0.852    -51.21434    62.00876
          3  |   2.195089    28.8786     0.08   0.939    -54.40594    58.79611
          4  |  -16.14475   76.37546    -0.21   0.833    -165.8379    133.5484
          5  |   13.43699     57.763     0.23   0.816    -99.77641    126.6504
          6  |   11.32266   57.74145     0.20   0.845    -101.8485    124.4938
          7  |          0  (omitted)
          8  |   11.58123   57.73826     0.20   0.841    -101.5837    124.7461
          9  |          0  (omitted)
         10  |          0  (omitted)
             |
       _cons |   3.091042   .2132007    14.50   0.000     2.673177    3.508908
------------------------------------------------------------------------------

Regards,

Brendan
-- 
Brendan Halpin,   Department of Sociology,   University of Limerick,   Ireland
Tel: w +353-61-213147  f +353-61-202569  h +353-61-338562;  Room F1-009 x 3147
mailto:brendan.halpin@ul.ie    ULSociology on Facebook: http://on.fb.me/fjIK9t
http://teaching.sociology.ul.ie/bhalpin/wordpress         twitter:@ULSociology
*
*   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/


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