Announcement

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

  • ivpoisson with panel-data fixed effects

    Dear all,

    I am using Stata 14 to run Poisson iv regressions for a panel of 6000 firms, across 15-years, from 25 countries. I want to run 2 regressions as follows:

    1- iv Poisson with firm + year fixed effects
    2- iv Poisson with firm + country-year fixed effects

    The problem when including firm or country-year fixed effects as factor variables (dummies), the program either crashed or never converges because of the large number of dummy variables.

    I would appreciate any suggestions on how to handle this.

    Many thanks,
    Soha

  • #2
    Dear Soha,

    -ivpoisson- is not valid with fixed effects.

    Joao

    Comment


    • #3
      Thanks for your reply. Is this problem specific to the -ivpoisson- command, or is it a general problem to instrumental variable Poisson regressions? In other words, is there another command that can handle the fixed effects with Instrumental variables Poisson?

      Thanks
      Soha

      Comment


      • #4
        Soha: I have some recommendations. Is your endogenous explanatory variable continuous? What are N and T? I trust you have a time-varying instrument.

        Comment


        • #5
          Dear Jeff,

          Hi. I am facing a problem similar to Soha's (maybe the recommendations you were thinking about apply to may case as well). My endogenous variable is continuous, my total number of observations is around 300,000, I have 10,000 firms, and T –measured in months– is 51 (it is an unbalanced panel; on average each firm "appears" 40 times (months)). And yes, I have a time-varying instrument.

          Thank you so much in advance!


          Comment


          • #6
            I am also interested in any solutions to this problem. How does one control for unobserved heterogeneity given one or more continuous endogenous variables and a count dependent variable?

            Can the control function method mentioned in the linked discussion be adapted to this problem? Can I run a fixed effects regression of the EEV on all exogenous variables and one or more instruments using -xtreg-, then regress the count dependent variable on the exogenous variables and the residuals using fixed effects with -xtpoisson-?

            Aside from bootstrapping the standard errors with -xtpoisson- and perhaps adding squares or cross-products of the residuals in the second stage, are there any other additional considerations here? Assuming a control function method can be extended to a fixed effects model in this way, what are the assumptions to keep in mind when interpreting the coefficient on the EEV in the second stage? When do we get a consistent estimate of the effect of the EEV on the count dependent variable?

            In my particular case, I am trying to obtain a consistent estimate of the effect of a continuous measure of concealed firearms on crime. Because it is likely that individuals obtain concealed firearms to protect themselves given increases in crime, I am interested in accounting for possible simultaneity. I am using an unbalanced panel of 887 counties with an average of 7 years per county. Any further discussion of this problem would be much appreciated.
            I have a database with counts as dependent variable. This variable suffers from over-dispersion problem. That's why I need to use negative binomial regression.
            Last edited by Giovanni Colitti; 27 May 2018, 07:04.

            Comment


            • #7
              I know that it has been a while since this thread was posted, but I would be very grateful if Jeff Woolridge, you could mention what kind of estimator you were going to suggest to Soha for a Poisson model, with fixed effects and an endogenous (continuous) variable, instrumented by a time-varying variable?

              Comment


              • #8
                Dear,
                Joao Santos Silva Jeff Wooldridge

                We work with panel data (N=8091 municipalities, T= 10 years) and our dependent variable is a count variable. This measures the number of hospitalizations (for specific diseases) in a municipality/year. Our main explanatory variable is likely endogenous and we have a valid instrument that works well in OLS setting with high dimensional FE (municipality FE, year FE).

                Since our Y is count, we would also like to use our instrument in count models, like Poisson. However, we struggle finding an appropriate Stata command that can support both IV-procedure and FE at the same time.

                We were wondering if implementing the following 2-stage procedure manually could work and, in case, what are the related concerns.

                1st stage:
                reghdfe X IV controls, absorb(municipality year)

                then we predict X_HAT, xbd

                2nd stage: we use Poisson on the instrumented coverage:
                ppmlhdfe Y X_HAT controls, absorb(municipality year)


                Thank you for your time,
                All the best
                dante

                Comment


                • #9
                  Hi Dante:

                  Unfortunately, there is no statistical justification for the procedure you propose. It could suffer from the incidental parameters problem, although maybe using fixed effects in the second stage eliminates that. But I do know that to justify plugging in fitted values into an exponential function imposes strong assumptions.

                  What is the nature of X? Can it be treated as roughly a continuous variable? If so, I have an easy solution for you. If X is discrete, I have a somewhat harder solution for you (but not so hard for someone with decent Stata programming skills).

                  Best,
                  Jeff

                  Comment


                  • #10
                    Dear
                    Jeff Wooldridge

                    Thank you for the explanation.
                    Yes, our X is a continuos variable. It would be incredibly helpful to hear about your proposed solution.

                    Thanks, All the best
                    dante

                    Comment


                    • #11
                      DearJeff Wooldridge
                      I wonder if you have any update on your proposed solution for the matter above.

                      Thank you,
                      All the best

                      dante

                      Comment


                      • #12
                        Sorry for the delay. I'm attaching a link to the paper that proposed the following method. The paper is published in a book but it is behind a pay wall.

                        The method is very simple, but you have to compute the proper standard errors. We did it via the panel bootstrap. Note that every variable is allowed to be correlated with the so-called fixed effect. This allows y2 to be correlated with idiosyncratic shocks, too. The z are assumed exogenous with respect to idiosyncratic shocks.

                        Code:
                        xtreg y2 z1 ... zJ zJp1 ... zM i.year, fe
                        predict double v2h_fe, e
                        xtpoisson y1 y2 v2h_fe z1 ... zJ i.year, fe vce(robust)
                        The t statistic on v2h_fe is a valid test of the null that lfare is exogenous. The first FE estimation is the first stage or reduced form for the endogenous variable y2. The second is Poisson FE with a control function, v2h_fe.

                        Incidentally, the test is always valid when you make it robust. But for the correction to be justified, the y2 variable should be roughly continuous, probably. If you decide to include the control function, you need to adjust the standard errors.

                        Once people like you start to use this, it will really catch on. ;-)

                        link_to_paper

                        Comment


                        • #13
                          DearJeff Wooldridge
                          Thank you very much. We will have a deep look at this material.
                          All the best,

                          dante

                          Comment


                          • #14
                            You're welcome! One correction: "lfare" should be "y2." I initially had a specific example and changed it to generic notation.

                            Comment


                            • #15
                              Thank you very much for this thread, it already helped me in a similar situation!

                              I have one further doubt here. Would this approach be valid for any combination of models? For example, Poisson FE as the first stage and FE in the second?

                              Thank you very much!

                              Comment

                              Working...
                              X