Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Negative values in margin command following xtgee

    I used xtgee command in stata

    xtgee counts week_center2 c.time2 i.flag2,family("poisson") corr(ar1) vce(robust) eform

    and margin command on intervention (flag2[before=0,after=1]).

    I was wondering why it is showing negative value for lower limit (-.1011584 ) as it is counts (0 to 8)?

    Thank you





    GEE population-averaged model Number of obs = 731
    Group and time vars: id week_center2 Number of groups = 7
    Link: log Obs per group:
    Family: Poisson min = 89
    Correlation: AR(1) avg = 104.4
    max = 116
    Wald chi2(3) = 0.65
    Scale parameter: 1 Prob > chi2 = 0.8842

    (Std. Err. adjusted for clustering on id)
    ------------------------------------------------------------------------------
    | Robust
    counts | IRR Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    week_center2 | .9940413 .0083027 -0.72 0.474 .9779008 1.010448
    time2 | 1.013084 .018704 0.70 0.481 .9770803 1.050415
    1.flag2 | .7877304 .5323796 -0.35 0.724 .2094603 2.962467
    _cons | .3142238 .0590433 -6.16 0.000 .2174186 .4541315
    ------------------------------------------------------------------------------


    margin flag2

    Predictive margins Number of obs = 731
    Model VCE : Robust

    Expression : Exponentiated linear prediction, predict()

    ------------------------------------------------------------------------------
    | Delta-method
    | Margin Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    flag2 |
    0 | .394614 .1283235 3.08 0.002 .1431045 .6461236
    1 | .3108495 .210212 1.48 0.139 -.1011584 .7228574
    ------------------------------------------------------------------------------




    Data example:
    flag2 time2 week_center2 counts
    0 0 -8 0
    0 0 -7 0
    0 0 -6 0
    0 0 -5 1
    0 0 -4 2
    0 0 -3 0
    0 0 -2 0
    0 0 -1 0
    1 1 0 7
    1 2 1 0
    1 3 2 0
    1 4 3 0
    1 5 4 0
    1 6 5 0
    1 7 6 1
    1 8 7 0
    1 9 8 2
    Last edited by Muhammad Faisal; 07 Feb 2018, 03:38.

  • #2
    We ask that people use their full real name here.

    Please read https://www.statalist.org/forums/help#realnames and https://www.statalist.org/forums/help#adviceextras for why that is the request and what to do about it.

    Comment


    • #3
      I have requested to change my name. Thank you Nick!

      Comment


      • #4
        On your substantive question, the mean predicted value is positive. It then applies a standard deviation around that mean to give a confidence interval. The main thing we often look for in a confidence interval is whether it spans 0 which is very similar to asking does the random variable (here a predicted value) statistically significant difference from zero. And in this case, it does not (p=.139).

        Comment


        • #5
          In this Poisson model for margins is "Exponentiated linear prediction, predict()" predicting counts then for the two levels of flag2? Thanks.

          Comment

          Working...
          X