[R] GEE Modelle in Stata und R

Christian Bieli christian.bieli at unibas.ch
Wed Feb 8 18:17:44 CET 2006


Hall Christian

Ich habe Dir hier den Output desselben Models mir den selben Daten mit R 
und mit Stata gerechnet angehängt.
Wie Du siehst sind die Unterschiede nicht unbeträchtlich. Da Du bestimmt 
schon ähnliche Erfahrungen gemacht hast, wollte ich Dich fragen, ob 
diese Unterschiede im Rahmen  dessen sind, wie man sie zwischen zwei 
verschiedenen packages erwarten kann, oder nicht.

Für eine kurze Antwort wäre ich Dir sehr dankbar.
Liebe Grüsse
Christian

R output:

     GEE:  GENERALIZED LINEAR MODELS FOR DEPENDENT DATA
     gee S-function, version 4.13 modified 98/01/27 (1998)

    Model:
     Link:                      Logit
     Variance to Mean Relation: Binomial
     Correlation Structure:     Exchangeable

    Call:
    gee(formula = y ~ Var1 * Var2 + Var3, id = Var4,
        data = mydata, family = binomial, corstr = "exchangeable",
        scale.fix = TRUE)

    Summary of Residuals:
            Min          1Q      Median          3Q         Max
    -0.16457139 -0.10916961 -0.05774320 -0.01334249  0.98519918

    Coefficients:
                       Estimate Naive S.E.     Naive z Robust S.E.    
    Robust z
    (Intercept)     -2.02946378  0.6152142 -3.29879234   0.6276423 
    -3.23347186
    Var1med         -0.06978758  0.8108207 -0.08607031   0.8280726 
    -0.08427713
    Var1hi           0.08988940  0.9738316  0.09230487   0.9851523  
    0.09124417
    Var2yes         -2.16869738  1.2386945 -1.75079278   1.4269696 
    -1.51979227
    Var3yes         -0.10520805  0.5724176 -0.18379597   0.6881670 
    -0.15288157
    Var1med:Var2yes  1.58088457  1.3503015  1.17076411   1.3682419  
    1.15541309
    Var1hi:Var2yes   2.48367129  1.4694804  1.69016976   1.4707481  
    1.68871291

    Estimated Scale Parameter:  1

Stata Output:

    xi: xtgee y i.Var1*i.Var2 Var3, family(binomial) link(logit) i(Var4)

    GEE population-averaged model                   Number of obs     
    =       309
    Group variable:                       Var4      Number of groups  
    =       215
    Link:                                logit      Obs per group: min
    =         1
    Family:                           binomial                     avg
    =       1.4
    Correlation:                  exchangeable                     max
    =         8
                                                    Wald chi2(6)      
    =      7.68
    Scale parameter:                         1      Prob > chi2       
    =    0.2628

    ------------------------------------------------------------------------------
               y |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
    Interval]
    -------------+----------------------------------------------------------------
           _cons |  -1.938584   .8662878    -2.24   0.025    -3.636477  
    -.2406913
        _IVar1_2 |  -.0610133   .8087995    -0.08   0.940   
    -1.646231    1.524205
        _IVar1_3 |   .0944082   .9720986     0.10   0.923    
    -1.81087    1.999686
        _IVar2_2 |  -2.178428   1.240422    -1.76   0.079    
    -4.60961    .2527538
            Var3 |  -.0977918   .5719084    -0.17   0.864   
    -1.218712    1.023128
    _IVarXVa~2_2 |   1.575095   1.351553     1.17   0.244   
    -1.073901     4.22409
    _IVarXVa~3_2 |   2.483814   1.470152     1.69   0.091   
    -.3976316     5.36526
    ------------------------------------------------------------------------------


Christian

-- 
Christian Bieli, project assistant
Institute of Social and Preventive Medicine
University of Basel, Switzerland
Steinengraben 49
CH-4051 Basel
Tel.: +41 61 270 22 12
Fax:  +41 61 270 22 25
christian.bieli at unibas.ch
www.unibas.ch/ispmbs




More information about the R-help mailing list