Announcement

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

  • ppml with interaction effects

    I am trying to run ppml on my model after reading a long exchange in 2014 in which you participated. My model has quadratic terms and interaction effects that appear as
    Code:
    ppml y X x c.x#c.x z c.x#c.z c.x#c.x#c.z
    When using ppml I get the error "factor-variable and time-series operators not allowed".
    However, these interactions are not factor variables nor time-series operators.
    I can of course hardcode the interactions but that disables the use of the margins command afterward which is really what I need.

    Is there a way to solve this problem?

    Thanks in advance
    Simon

  • #2
    Your interaction terms are indeed part of Stata's "factor variable" setup, see the output of help factor variables which says

    Factor variables create indicator variables from categorical variables, interactions of indicators of categorical variables, interactions of categorical and continuous variables, and interactions of continuous variables (polynomials).
    You are using factor variable notation to create interactions of continuous variables. So if you use ppml with your model you will not be able to take advantage of the margins command afterward.

    The description of ppml suggests that it solves a particular estimation problem that poisson may encounter. Have you actually encountered that problem using poisson with your data? If not, perhaps you should first try poisson using factor variable notation.

    You refer to a long exchange on Statalist in 2014, but you did not provide a link, so we cannot know what advice you took from that discussion.

    Comment


    • #3
      Dear William,

      Thanks for the feedback. Apologies for not posting the initial exchange I was referring to (it is here).
      You are absolutely correct that ppml is solves a specific problem.
      I read the Santos-Silva and Tenreyo (2010) paper and when running ppml without any interaction effects (or with hard-coded interaction effects), I don't have any dropped variables so probably I do not need to work with that command.
      What's troublesome to me is that the results are so different when I run a ppml v poisson and very different again when i run xtpoisson and add fixed effects (which is the expected thing to do for my research question). In addition, the results of xtpoisson are significantly different from the xtnbreg results which also surprised me (mean of the response is 9.8 with standard deviation 10.8 so I had assumed poisson distribution would be a better fit).

      For clarity, the unit of analysis is invention, the response is impact of the invention (a count), the focal variables relate to teams, and fixed effects are added at the firm level.

      If you'd know of any good book or paper that specifically focuses on model selection for such data structure I'd be very grateful. Currently I have Long & Freese (2006) "Regression Models for Categorical Dependent Variables Using Stata" which is useful but does not talk about the xt models a lot. I also have Agresti's (2013/3d edition) "Categorical Data Analysis" which is perhaps more useful but also quite daunting for a non-econometrician...

      Simon

      Comment


      • #4
        Hello Simon -

        Thank you for the reference to the very long discussion, of which it appears your problem is treading on some of the same ground - inexplicable differences in results.

        Here is my advice. You have, for now at least, put to rest the concern with ppml. You have instead other concerns, which I might summarize as determining the most appropriate model for your data - which I understand to be xtpoisson or xtbnreg, each with fixed effects, since something like that is what is expected for your research question. You are having problems, perhaps, interpreting the output in the sense of understanding why there are apparently substantial differences between the messages the two models present. Since you have cross-sectional data, I don't think poisson is appropriate - so narrow your focus to the most appropriate models. Sometimes trying to move from a simpler (less appropriate) model to a more complex (more appropriate) model just confuses things.

        I suggest you start a new topic with a title descriptive of this problem - something like "choosing between xtpoisson and xtbinreg" and then describe the question you are analyzing and your data. They you will need to display from your Results window your xtpoisson and xtbinreg commands and all their output, including initial iteration information. (In doing so you may need to be selective and eliminate the fixed effect results if you have a large number of firms.) Basically, take everything in your post #3 starting at "What's troublesome", expand on it with a bit more background on what you're modeling and the structure of the data - interventions by teams nested within firms, with response measured as a count of something - do I have that right? - if so, a little more about the intervention and what's being counted.

        In doing this, first refresh your memory of the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post. Note especially sections 9-12 on how to best pose your question, including of course using CODE delimiters to post your results, which you have used in the past to post commands.

        The more you help others understand your problem, the more likely others are to be able to help you solve your problem.

        With this up, perhaps it will get the range of attention it needs from some of the knowledgeable members who participated in the discussion that influenced you. In the current topic, it's likely many non-users of ppml are no longer following the topic.

        Comment


        • #5
          Dear Simon,

          William has provided excellent advice, but let me try to had something.

          As you say, ppml, poisson, and xtpoisson should produce the same results if the right dummies are included in ppml and poisson. If you do not get the same results that suggests that you are making an error and I suggest you try to understand what is the source of the problem.

          On the choice between xtpoisson and xtnbreg when using fixed effects, keep in mind that the FE NegBin estimator is not a real fixed effects estimator. So, if you want to use a proper count data model with fixed effects you need to stick to xtpoisson. Fortunately, the Poisson FE estimator is very robust and very reliable.

          Best wishes,

          Joao

          Comment


          • #6
            Thanks William and Joao for the suggestions and advice. I have another question posted here
            which is more focused on interpreting the differences between the different regression models and how to interpret margins. I think it follows the FAQ guidelines so hopefully I will get an answer there. Note that I have omitted the ppml regression there because it does not enable me to add interaction terms or use post estimation margins.

            Comment

            Working...
            X