Announcement

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

  • Marginal Effects After PPMLHDFE

    Dear all,

    This thread is partially related to comment #6 here: https://www.statalist.org/forums/for...ative-binomial and to this thread: https://www.stata.com/statalist/arch.../msg00889.html. I am using the command ppmlhdfe from ssc install by Sergio Correia.

    Suppose I have three variables, Y, X1 and X2. I am actually interested in the interaction between X1 and X2. Y is a non-negative count variable, prompting the use of Poisson. My research question is the following: if X2 rises by 1, how does that affect the relationship between Y and X1? X2 is therefore a so-called moderating variable. Ideally, I would like to know the marginal effect of X1 on Y at different levels of X2.

    I also have a three fixed effects vectors: survey respondent-by-season, canton-by-month, sector-by-month. Survey-by-season fixed effects are the only incidental parameters, which grow with sample size; the others are fixed.

    The code looks like this:

    Code:
    ppmlhdfe y c.x1##c.x2, sep(fe ir) abs(i.respondent#i.year) cluster(respondent)
    In comment #6 in the abovementioned thread, Joao Santos Silva very helpfully points out that in nonlinear models, presumably due to the incidental parameters problem, marginal effects are meaningless.

    In conditional non-linear model, such as conditional logit, the fixed effects are conditioned out by a sufficient statistic, and are therefore not estimated. Marginal effects can therefore not be computed.

    My understanding of ppmlhdfe is that fixed effects included in absorb() are profiled out using the Frisch Waugh theorem, and that estimation is carried out using the residuals. Fixed effects are therefore not estimated per se.

    Do the marginal effects still directly depend on the values of the profiled-out fixed effects? In this context, would the margins command give any meaningful results?

    If not, will the Poisson coefficient on the interaction term yield the effect that I am interested in?

  • #2
    Dear Maxence Morlet,

    I believe I answered that question here; please check if that helps.

    Just to clarify, in the Poisson case we can actually compute the partial effects because we can compute the estimated fixed effects easily; please check the option d in the ppmlhdfe command. So, in this respect, Poisson is very different from the logit. The problem, as you suggest, is that if the fixed effects are estimated with small number of observations, the estimates will be noisy and that affects the partial effects estimates. Fortunately, in the Poisson case, you do not really need to compute those.

    Best wishes,

    Joao

    Comment


    • #3
      EDIT: I found the answer in the post you linked. Thank you very much for your help!
      Last edited by Maxence Morlet; 07 Sep 2023, 13:27.

      Comment


      • #4
        Thank you very much for your answer Joao Santos Silva!

        Actually one quick follow up question:

        Regarding your answer in the thread you've linked, I may have a following question, regarding Poisson, fixed effects aside:

        "More precisely, the difference between the effect of a RTA with and without ND is given by exp(B_rta) - exp(B_rta + B_rta*nd), where B_rta is the coefficient on RTA and B_rta*nd is the coefficient on the interaction.".

        Specifically, if we were to think about a regression:

        Code:
        Y = b1*rta + b2*nd + b3*nd*rta
        b3 corresponds to exp(B_rta) - exp(B_rta + B_rta*nd), correct?

        Suppose one wanted to calculate the marginal effect of RTA (perhaps supposing that it is continuous might help) on Y when ND is 1 and when ND is 0. Would this be the appropriate code?

        Code:
        poisson y i.rta##i.nd, vce(robust)
        margins, dydx(rta) at(rta=(0 1))
        marginsplot
        Many thanks again for your response!

        Apologies if my question is unclear, please let me know and I would be happy to reformulate it. I guess it is the interpretation of Poisson coefficients as semi-elasticities but the fact the quantity economists are often interested in is the average partial effect that is confusing me.

        Comment


        • #5
          Dear Maxence Morlet,

          I am afraid I am not familiar enough with the margins command to help with this, but note that poisson estimates an exponential model, not a linear one as you describe. Anyway, if the model has fixed effects, it is better to report semi-elasticities than partial effects.

          Best wishes,

          Joao

          Comment

          Working...
          X