Announcement

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

  • Margins after xtgee

    Dear all,

    I am running a GEE regression:

    Code:
    xi:qic access var1 var2 var3, i(city) family(gauss) link(identity) corr(unstructured) robust
    All the explanatory variables are continuous and in logs while the dependent variable. I was wondering if wanted elasticities can I do the following:

    Code:
    margins, eyex(var1 var2 var3) atmeans
    Thank you!



  • #2
    Hi Chiara,

    Your title of the post and the description of what you plan to do are a little confusing.

    From my understanding, -qic- is a user-written command which can perform GEE analyses and also produces the QIC criterion to select the best-working correlation structure. However, -qic- is an older command which does not support Stata's -margins- command. So, after comparing the criterion measures of different correlation structures produced from -qic-, you can select the model and correlation structure to run in -xtgee-. Then, you can use the -margins- command to calculate the elasticities.

    Hope this helps!

    Tom

    Comment


    • #3
      Dear Tom,

      Thank you for your reply. Apologies for he mistake, I forgot to paste the -xtgee- command after using -qic- to select the appropriate correlation structure.

      Code:
      xtgee access var1 var2 var3, i(city) family(gauss) link(identity) corr(unstructured) robust
      Then the following should give me the average marginal effects of all covariates

      Code:
      margins, dydx(*)
      But I am interested in elasticity and my specification is linear-log, so should I be using -dyex- to compute the elasticities? Or should it be

      Code:
      margins, dydx(var1 var2 var3)
      Apologies for not providing all the information in the original post? Thanks again!

      Comment


      • #4
        Hi Chiara,

        From the -margins- help file, you can produce the following:

        dydx(varlist) estimate marginal effect of variables in varlist
        eyex(varlist) estimate elasticities of variables in varlist
        dyex(varlist) estimate semielasticity -- d(y)/d(lnx)
        eydx(varlist) estimate semielasticity -- d(lny)/d(x)

        dydx(varlist), eyex(varlist), dyex(varlist), and eydx(varlist) request that margins report derivatives of the response with respect to varlist rather than on the response itself. eyex(), dyex(), and eydx() report derivatives as elasticities; see Expressing derivatives as elasticities in [R] margins.

        Tom

        Comment


        • #5
          Tom Weichle - thank you very much!

          Comment

          Working...
          X