Announcement

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

  • Post-estimation for GEE model

    Dear Stata users,

    I am quite new to Stata, so my question can sound basic.
    I am running a GEE model for binary outcomes in Stata, and would like to extract marginal probabilities, to then estiamte marginal risk ratios.

    To demonstrate the problem, I will use a toenail example, available for Stata users.

    use http://www.stata-press.com/data/mlmus3/toenail, clear

    quietly xtset patient

    xtgee outcome i.treatment##c.month, link(logit) family(binomial) corr(exchangeable) vce(robust) eform

    margins, at(month=(1 2 3)) predict(mu) post

    nlcom (_b[2.month] / _b[1.month])

    So, after running the GEE, I calculate marginal probabilties of toenail infection at months 1,2,3. Then, I would like to estiamte risk ratios (ratio of probabilities) of infection at month 1 versus month 2.
    I tried to do that with nlcom, but Stata does not recognize _b[2.month]. I tried to modify the reference to month using "_at", but nothing seems to work.

    Can somebody let me know what's wrong? Is there a way to check how exactly Stata stores the risk estimates for each month?

    Thank you in advance!

    Marina

  • #2
    Why not use the log link instead of the logit.That will give you the risk ratios directly.

    As to your question: you entered month linearly, so 2.month does not exist.


    Code:
    use http://www.stata-press.com/data/mlmus3/toenail, clear
    
    xtset patient
    
    xtgee outcome i.treatment##c.month, link(log) family(binomial) corr(exchangeable) vce(robust) eform
    
    margins, expression(exp(_b[1.treatment]+month*_b[1.treatment#c.month])) at(month=(0/15))
    marginsplot, ytitle(risk ratio)
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Hey Maarten,

      Thank you for the advise, it worked to run GEE with a log link. I did not want to use it in the first place, becase I got convergence problems (with my own data, not toenail).


      How would you advice to proceed with a log-binomial model fails to converge? I heard that this is quite a common problem.

      Marina

      Comment


      • #4
        Marina: GEE only delivers potential efficiency gains over using a pooled method. In my experience, that gain can be minor. First, I would use the pooled estimation method and cluster your standard errors. But you also have to be carful in computing the marginal effects. The treatment variable is w = treatment*post (assuming common timing). Then logit and poisson can be used:

        Code:
        logit outcome i.w#i.month i.month treatment, vce(cluster id) eform
        margins, dydx(w) predict(xb) at  at(month=(1 2 3)) 
        poisson outcome i.w#i.month i.month treatment, vce(cluster id)

        Comment


        • #5
          Hi Jeff,

          Thank you for the tips! I will try the logistic or Poisson regression, it might work just fine for my data (I have only 2 repeated measurements).

          Comment

          Working...
          X