I am using xtgee to estimate risk ratios for a data set with repeated measures. I want to test an interaction between two factors, 1 with 2 levels (arm1) and the other with 3 levels (indication): i.e. 2 interaction parameters. I had expected that using the test command would yield a chi-squared statistic (2df) equal to the difference between the chi-squared statistics for models with and without the interaction. That isn't what I get. The Wald chi(2) (5 df) for the model with the interaction = 10.21. The Wald chi(2) (3df) for the model without the interaction is 8.44 a difference of 1.77. The chi squared value produced by the the test command is 1.60. Can anyone explain the difference? Output below.
xtgee prim_outcome i.arm1##i.indication if arm1!=3, family(binomial) link(log) corr(exch) vce(robust) eform
GEE population-averaged model Number of obs = 6,749
Group variable: participan~m Number of groups = 6,287
Family: Binomial Obs per group:
Link: Log min = 1
Correlation: exchangeable avg = 1.1
max = 4
Wald chi2(5) = 10.21
Scale parameter = 1 Prob > chi2 = 0.0696
(Std. err. adjusted for clustering on participantnum)
-----------------------------------------------------------------------------------------------------------------
| Semirobust
prim_outcome | exp(b) std. err. z P>|z| [95% conf. interval]
------------------------------------------------+----------------------------------------------------------------
arm1 |
Dexa 4x6mg | .8965813 .1559133 -0.63 0.530 .6376286 1.260699
|
indication |
Preterm labor with intact membranes | .6763322 .1428367 -1.85 0.064 .4470871 1.023123
Planned delivery | .9138782 .1248478 -0.66 0.510 .6992025 1.194466
|
arm1#indication |
Dexa 4x6mg#Preterm labor with intact membranes | 1.168356 .3464885 0.52 0.600 .6533442 2.089335
Dexa 4x6mg#Planned delivery | 1.278983 .2505847 1.26 0.209 .8711508 1.877745
|
_cons | .1040274 .0124361 -18.93 0.000 .0822981 .131494
-----------------------------------------------------------------------------------------------------------------
. test 2.arm1#2.indication 2.arm1#3.indication
( 1) 2.arm1#2.indication = 0
( 2) 2.arm1#3.indication = 0
chi2( 2) = 1.60
Prob > chi2 = 0.4493
. xtgee prim_outcome i.arm1 i.indication if arm1!=3, family(binomial) link(log) corr(exch) vce(robust) eform
GEE population-averaged model Number of obs = 6,749
Group variable: participan~m Number of groups = 6,287
Family: Binomial Obs per group:
Link: Log min = 1
Correlation: exchangeable avg = 1.1
max = 4
Wald chi2(3) = 8.44
Scale parameter = 1 Prob > chi2 = 0.0378
(Std. err. adjusted for clustering on participantnum)
------------------------------------------------------------------------------------------------------
| Semirobust
prim_outcome | exp(b) std. err. z P>|z| [95% conf. interval]
-------------------------------------+----------------------------------------------------------------
arm1 |
Dexa 4x6mg | 1.083794 .0823057 1.06 0.289 .9339095 1.257734
|
indication |
Preterm labor with intact membranes | .7305089 .1081895 -2.12 0.034 .5464637 .9765394
Planned delivery | 1.035454 .1013354 0.36 0.722 .8547268 1.254394
|
_cons | .0945754 .009167 -24.33 0.000 .078212 .1143624
------------------------------------------------------------------------------------------------------
xtgee prim_outcome i.arm1##i.indication if arm1!=3, family(binomial) link(log) corr(exch) vce(robust) eform
GEE population-averaged model Number of obs = 6,749
Group variable: participan~m Number of groups = 6,287
Family: Binomial Obs per group:
Link: Log min = 1
Correlation: exchangeable avg = 1.1
max = 4
Wald chi2(5) = 10.21
Scale parameter = 1 Prob > chi2 = 0.0696
(Std. err. adjusted for clustering on participantnum)
-----------------------------------------------------------------------------------------------------------------
| Semirobust
prim_outcome | exp(b) std. err. z P>|z| [95% conf. interval]
------------------------------------------------+----------------------------------------------------------------
arm1 |
Dexa 4x6mg | .8965813 .1559133 -0.63 0.530 .6376286 1.260699
|
indication |
Preterm labor with intact membranes | .6763322 .1428367 -1.85 0.064 .4470871 1.023123
Planned delivery | .9138782 .1248478 -0.66 0.510 .6992025 1.194466
|
arm1#indication |
Dexa 4x6mg#Preterm labor with intact membranes | 1.168356 .3464885 0.52 0.600 .6533442 2.089335
Dexa 4x6mg#Planned delivery | 1.278983 .2505847 1.26 0.209 .8711508 1.877745
|
_cons | .1040274 .0124361 -18.93 0.000 .0822981 .131494
-----------------------------------------------------------------------------------------------------------------
. test 2.arm1#2.indication 2.arm1#3.indication
( 1) 2.arm1#2.indication = 0
( 2) 2.arm1#3.indication = 0
chi2( 2) = 1.60
Prob > chi2 = 0.4493
. xtgee prim_outcome i.arm1 i.indication if arm1!=3, family(binomial) link(log) corr(exch) vce(robust) eform
GEE population-averaged model Number of obs = 6,749
Group variable: participan~m Number of groups = 6,287
Family: Binomial Obs per group:
Link: Log min = 1
Correlation: exchangeable avg = 1.1
max = 4
Wald chi2(3) = 8.44
Scale parameter = 1 Prob > chi2 = 0.0378
(Std. err. adjusted for clustering on participantnum)
------------------------------------------------------------------------------------------------------
| Semirobust
prim_outcome | exp(b) std. err. z P>|z| [95% conf. interval]
-------------------------------------+----------------------------------------------------------------
arm1 |
Dexa 4x6mg | 1.083794 .0823057 1.06 0.289 .9339095 1.257734
|
indication |
Preterm labor with intact membranes | .7305089 .1081895 -2.12 0.034 .5464637 .9765394
Planned delivery | 1.035454 .1013354 0.36 0.722 .8547268 1.254394
|
_cons | .0945754 .009167 -24.33 0.000 .078212 .1143624
------------------------------------------------------------------------------------------------------

Comment