Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Random effects logistic regression: -metan- v -xtlogit-


From   "Paul Pharoah" <[email protected]>
To   <[email protected]>
Subject   st: Random effects logistic regression: -metan- v -xtlogit-
Date   Fri, 1 Dec 2006 09:50:44 -0000

multiple case-control studies differ (substantially) between metan-
and �xtlogit- ?

Data are from nine unmatched cases control studies of SNP genotype

study � study variable
gene00	RR genotype frequency in controls
gene01	RQ genotype frequency in controls
gene02	QQ genotype frequency in controls
gene10	RR genotype frequency in cases
gene11	RQ genotype frequency in cases
gene12	QQ genotype frequency in cases

study	gene00	gene01	gene02	gene10	gene11	gene12
1	228	141	19	241	188	31
2	149	144	21	148	119	41
3	252	299	74	254	290	58
4	256	274	68	251	251	83
5	425	499	127	314	307	86
6	309	353	108	354	350	104
7	328	391	109	609	669	194
8	947	1030	313	740	875	254
9	1054	1173	360	1083	1268	348

The following command generates the random effects pooled OR for QQ vs RR
genotype

. metan  gene00 gene02 gene10 gene12, random or

           Study |       OR   [95% Conf. Interval]    % Weight
-----------------+-------------------------------------------------------
1                |  1.54357     .847914   2.80996      3.92373
2                |  1.96557     1.10822   3.48619       4.2419
3                |  .777612      .52893   1.14322      8.12115
4                |   1.2449     .864373   1.79296      8.81242
5                |  .916545     .672142   1.24982      11.0651
6                |  .840552      .61681   1.14546      11.0958
7                |  .958588     .731544    1.2561      13.1761
8                |   1.0385     .857574    1.2576      18.8354
9                |  .940782     .793702   1.11512      20.7284
-----------------+-------------------------------------------------------
  D+L pooled OR  |  1.00456     .885302   1.13988
-----------------+-------------------------------------------------------
  Heterogeneity chi-squared =  12.59 (d.f. = 8) p = 0.127
  Estimate of between-study variance Tau-squared =  0.0125
  Test of OR=1 : z= 0.07 p = 0.944


And, the RQ vs RR random effects pooled OR

. metan  gene00 gene01 gene10 gene11, random or

           Study |       OR   [95% Conf. Interval]    % Weight
-----------------+-------------------------------------------------------
1                |  1.26141     .949866   1.67514      6.51369
2                |  .831973     .596507   1.16039      4.98645
3                |  .962263     .758749   1.22036      8.60693
4                |  .934307     .731869   1.19274      8.25621
5                |  .832716     .679269   1.02083      10.7657
6                |  .865463     .699804   1.07034      10.1444
7                |  .921522     .767211   1.10687      12.4064
8                |  1.08715     .952918   1.24029      18.0585
9                |  1.05204     .936656   1.18164      20.2618
-----------------+-------------------------------------------------------
  D+L pooled OR  |  .978139     .902773    1.0598
-----------------+-------------------------------------------------------
  Heterogeneity chi-squared =  12.01 (d.f. = 8) p = 0.151
  Estimate of between-study variance Tau-squared =  0.0047
  Test of OR=1 : z= 0.54 p = 0.589


If the data are reshaped from wide into long using the following series of
commands

. reshape long gene0 gene1 gene2, i(study) j(case)
. reshape long weight ,  i(study case)  j(alleles)
. expand weight

The fixed effects pooled genotype specific effects obtained by logistic
regression are the same as the fixed effects from �metan-.  I.e.

. xi: logistic case i.alleles, nolog

i.alleles         _Ialleles_0-2       (naturally coded; _Ialleles_0 omitted)

Logistic regression                               Number of obs   =
18961
                                                  LR chi2(2)      =
0.10
                                                  Prob > chi2     =
0.9501
Log likelihood = -13142.621                       Pseudo R2       =
0.0000

----------------------------------------------------------------------------
--
        case | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
 _Ialleles_1 |   .9914684   .0308417    -0.28   0.783     .9328256
1.053798
 _Ialleles_2 |   .9884827    .046065    -0.25   0.804     .9021974
1.08302
----------------------------------------------------------------------------
--


But, the random effects estimates using xtlogit and study as the panel
variable are very different and clearly wrong.

. xi: xtlogit case i.alleles , i(study) re or
i.alleles         _Ialleles_0-2       (naturally coded; _Ialleles_0 omitted)

Fitting comparison model:

Iteration 0:   log likelihood = -13142.672
Iteration 1:   log likelihood = -13142.621

Fitting full model:

tau =  0.0     log likelihood = -5971.0991
tau =  0.1     log likelihood = -5971.4368

Random-effects logistic regression              Number of obs      =
18961
Group variable (i): study                       Number of groups   =
9

Random effects u_i ~ Gaussian                   Obs per group: min =
622
                                                               avg =
2106.8
                                                               max =
5286

                                                Wald chi2(2)       =
7.45
Log likelihood  = -5965.7258                    Prob > chi2        =
0.0242

----------------------------------------------------------------------------
--
        case |         OR   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
 _Ialleles_1 |   1.050559   .1153838     0.45   0.653     .8470957
1.302893
 _Ialleles_2 |   1.778091   .3759296     2.72   0.006     1.174871
2.691025
-------------+--------------------------------------------------------------
--
    /lnsig2u |  -5.132952
1.966205                     -8.986643   -1.279262
-------------+--------------------------------------------------------------
--
     sigma_u |   .0768057   .0755079                      .0111834
.527487
         rho |   .0017899    .003513                       .000038
.0779804
----------------------------------------------------------------------------
--
Likelihood-ratio test of rho=0: chibar2(01) =  1.4e+04 Prob >= chibar2 =
0.000

The QQ vs RR OR is bigger than all but one of the study specific ORs, so is
clearly wrong.

So
                     Metan        xtlogit

Pooled OR RQ vs RR   0.98         1.05

Pooled OR QQ vs RR   1.00         1.74

Any ideas?

Many thanks

Paul Pharoah
Cancer Research UK Senior Clinical research Fellow
Strangeways Research Raboratory
Dept of Oncology
University of Canbridge


*
*   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