Hi All
I am using a GEE model for panel data analysis where I have data for 6 waves and I am looking at a dependant var by waves. I first included waves as a continuous var and the output is as follows
. xi:xtgee depvar wave , eform i(idauniq) fam(bin) link(logit) corr(exchangeable)
Iteration 1: tolerance = .64951125
Iteration 2: tolerance = .013703
Iteration 3: tolerance = .00064495
Iteration 4: tolerance = .00003776
Iteration 5: tolerance = 2.180e-06
Iteration 6: tolerance = 1.338e-07
GEE population-averaged model Number of obs = 57126
Group variable: idauniq Number of groups = 15783
Link: logit Obs per group: min = 1
Family: binomial avg = 3.6
Correlation: exchangeable max = 6
Wald chi2(5) = 3965.99
Scale parameter: 1 Prob > chi2 = 0.0000
-------------------------------------------------------------------------------
depvar | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
--------------+----------------------------------------------------------------
wave | 1.212814 .0044039 53.14 0.000 1.204214 1.221477
_cons | .6416439 .0204127 -13.95 0.000 .6028574 .6829258
-------------------------------------------------------------------------------
and then used it as a categorical variable with the following output
. xi:xtgee depvar i.wave , eform i(idauniq) fam(bin) link(logit) corr(exchangeable)
i.wave _Iwave_1-6 (naturally coded; _Iwave_1 omitted)
Iteration 1: tolerance = .55485767
Iteration 2: tolerance = .01454043
Iteration 3: tolerance = .00080836
Iteration 4: tolerance = .0000476
Iteration 5: tolerance = 2.803e-06
Iteration 6: tolerance = 1.711e-07
GEE population-averaged model Number of obs = 57126
Group variable: idauniq Number of groups = 15783
Link: logit Obs per group: min = 1
Family: binomial avg = 3.6
Correlation: exchangeable max = 6
Wald chi2(9) = 4238.64
Scale parameter: 1 Prob > chi2 = 0.0000
-------------------------------------------------------------------------------
depvar | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
--------------+----------------------------------------------------------------
_Iwave_2 | 1.002251 .0199846 0.11 0.910 .9638378 1.042196
_Iwave_3 | 1.698867 .0335438 26.84 0.000 1.634378 1.7659
_Iwave_4 | 1.799413 .0354028 29.86 0.000 1.731346 1.870156
_Iwave_5 | 2.217938 .0444731 39.73 0.000 2.132463 2.306839
_Iwave_6 | 2.42179 .0493268 43.43 0.000 2.327016 2.520424
_cons | .7771827 .0243593 -8.04 0.000 .7308763 .8264229
-------------------------------------------------------------------------------
I want to compare the two models to see whether it is better to fit 'wave' as a continuous or categorical variable. I know that one could use likelihood ratio test to see whether it should be fitted as a continuous variable or categorical one but you cant use LRT here within a GEE model. I am trying to use testparm command to check which model is better but not sure about the syntax and interpretation. Any help will be greatly appreciated.
Thanks,
Nafeesa
I am using a GEE model for panel data analysis where I have data for 6 waves and I am looking at a dependant var by waves. I first included waves as a continuous var and the output is as follows
. xi:xtgee depvar wave , eform i(idauniq) fam(bin) link(logit) corr(exchangeable)
Iteration 1: tolerance = .64951125
Iteration 2: tolerance = .013703
Iteration 3: tolerance = .00064495
Iteration 4: tolerance = .00003776
Iteration 5: tolerance = 2.180e-06
Iteration 6: tolerance = 1.338e-07
GEE population-averaged model Number of obs = 57126
Group variable: idauniq Number of groups = 15783
Link: logit Obs per group: min = 1
Family: binomial avg = 3.6
Correlation: exchangeable max = 6
Wald chi2(5) = 3965.99
Scale parameter: 1 Prob > chi2 = 0.0000
-------------------------------------------------------------------------------
depvar | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
--------------+----------------------------------------------------------------
wave | 1.212814 .0044039 53.14 0.000 1.204214 1.221477
_cons | .6416439 .0204127 -13.95 0.000 .6028574 .6829258
-------------------------------------------------------------------------------
and then used it as a categorical variable with the following output
. xi:xtgee depvar i.wave , eform i(idauniq) fam(bin) link(logit) corr(exchangeable)
i.wave _Iwave_1-6 (naturally coded; _Iwave_1 omitted)
Iteration 1: tolerance = .55485767
Iteration 2: tolerance = .01454043
Iteration 3: tolerance = .00080836
Iteration 4: tolerance = .0000476
Iteration 5: tolerance = 2.803e-06
Iteration 6: tolerance = 1.711e-07
GEE population-averaged model Number of obs = 57126
Group variable: idauniq Number of groups = 15783
Link: logit Obs per group: min = 1
Family: binomial avg = 3.6
Correlation: exchangeable max = 6
Wald chi2(9) = 4238.64
Scale parameter: 1 Prob > chi2 = 0.0000
-------------------------------------------------------------------------------
depvar | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
--------------+----------------------------------------------------------------
_Iwave_2 | 1.002251 .0199846 0.11 0.910 .9638378 1.042196
_Iwave_3 | 1.698867 .0335438 26.84 0.000 1.634378 1.7659
_Iwave_4 | 1.799413 .0354028 29.86 0.000 1.731346 1.870156
_Iwave_5 | 2.217938 .0444731 39.73 0.000 2.132463 2.306839
_Iwave_6 | 2.42179 .0493268 43.43 0.000 2.327016 2.520424
_cons | .7771827 .0243593 -8.04 0.000 .7308763 .8264229
-------------------------------------------------------------------------------
I want to compare the two models to see whether it is better to fit 'wave' as a continuous or categorical variable. I know that one could use likelihood ratio test to see whether it should be fitted as a continuous variable or categorical one but you cant use LRT here within a GEE model. I am trying to use testparm command to check which model is better but not sure about the syntax and interpretation. Any help will be greatly appreciated.
Thanks,
Nafeesa
Comment