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: Re: Loglinear quasi-symmetric agreement


From   "Scholes, Shaun" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: Re: Loglinear quasi-symmetric agreement
Date   Thu, 7 Jun 2012 17:06:52 +0000

Martyn, I can't help you with your question but it may be worth taking a close look at:

http://www.ats.ucla.edu/stat/stata/examples/icda/icdast9.htm

Best wishes
Shaun



-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martyn Sherriff
Sent: 07 June 2012 16:24
To: [email protected]
Subject: st: Re: Loglinear quasi-symmetric agreement

I am trying to use loglinear models to assess agreement using the quasi-symmetry model and have used the data from Agresti (An Introduction to Categorical Analysis, p 245) to check my method.

     +-------------------------+
     | px   py   count   qasym |
     |-------------------------|
  1. |  1    1      22       1 |
  2. |  1    2       2        2 |
  3. |  1    3       2        3 |
  4. |  1    4       0        4 |
  5. |  2    1       5        2 |
     |-------------------------|
  6. |  2    2       7        5 |
  7. |  2    3      14       6 |
  8. |  2    4       0        7 |
  9. |  3    1       0        3 |
 10. |  3    2       2       6 |
     |-------------------------|
 11. |  3    3      36       8 |
 12. |  3    4       0        9 |
 13. |  4    1       0        4 |
 14. |  4    2       1        7 |
 15. |  4    3      17       9 |
     |-------------------------|
 16. |  4    4      10      10 |
     +-------------------------+

The simple symmetry model is satisfactory:
 glm count i.px i.py, fam(poi) nolog

Generalized linear models                          No. of obs      =        16
Optimization     : ML                              Residual df     =         9
                                                   Scale parameter =         1
Deviance         =  117.9568605                    (1/df) Deviance =  13.10632
Pearson          =  120.2634516                    (1/df) Pearson  =  13.36261

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

                                                   AIC             =  10.79847
Log likelihood   = -79.38776817                    BIC             =  93.00356

------------------------------------------------------------------------------
             |                 OIM
       count |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------
-------------+------
          px |
          2  |  -4.07e-08   .2773501    -0.00   1.000    -.5435962    .5435962
          3  |   .3794896   .2545139     1.49   0.136    -.1193485    .8783277
          4  |   .0741079   .2723524     0.27   0.786    -.4596929    .6079088
             |
          py |
          2  |  -.8109302   .3469443    -2.34   0.019    -1.490929   -.1309318
          3  |   .9382696   .2270017     4.13   0.000     .4933544    1.383185
          4  |  -.9932518   .3701851    -2.68   0.007    -1.718801   -.2677022
             |
       _cons |   1.783249   .2588899     6.89   0.000     1.275834    2.290664
------------------------------------------------------------------------------

However when I attempt the quasi-symmetric model I get very large and equal standard errors which do not make sense to me:

. glm count i.px i.py i.qasym, fam(poi) nolog
note: 7.qasym omitted because of collinearity
note: 9.qasym omitted because of collinearity
note: 10.qasym omitted because of collinearity

Generalized linear models                          No. of obs      =        16
Optimization     : ML                                  Residual df
=         3
                                                               Scale
parameter =         1
Deviance         =   .978304658                    (1/df) Deviance =  .3261016
Pearson          =   .621982784                    (1/df) Pearson  =  .2073276

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

                                                                 AIC
          =  4.237311
Log likelihood   = -20.89849023                    BIC             = -7.339462

------------------------------------------------------------------------------
             |                 OIM
       count |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------
-------------+------
          px |
          2  |  -10.64727   1131.109    -0.01   0.992     -2227.58    2206.286
          3  |  -9.987129   1131.109    -0.01   0.993     -2226.92    2206.945
          4  |   8.229144   1131.109     0.01   0.994    -2208.703    2225.161
             |
          py |
          2  |  -11.32026   1131.109    -0.01   0.992    -2228.253    2205.613
          3  |  -8.486948   1131.109    -0.01   0.994    -2225.419    2208.445
          4  |  -9.017585   1131.109    -0.01   0.994     -2225.95    2207.915
             |
       qasym |
          2  |   9.089909   1131.109     0.01   0.994    -2207.843    2226.023
          3  |   5.887591   1131.109     0.01   0.996    -2211.045     2222.82
          4  |  -27.11437   2775.396    -0.01   0.992    -5466.791    5412.562
          5  |   20.82242   2262.218     0.01   0.993    -4413.043    4454.688
          6  |   18.70797   2262.217     0.01   0.993    -4415.157    4452.573
          7  |          0  (omitted)
          8  |   18.96654   2262.217     0.01   0.993    -4414.898    4452.831
          9  |          0  (omitted)
         10  |          0  (omitted)
             |
       _cons |   3.091024   .2132027    14.50   0.000     2.673155    3.508894
------------------------------------------------------------------------------

I would be grateful for any advice on what I am doing wrong. I am using Stata 12.

Thank you,
Martyn
*
*   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/


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