Announcement

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

  • 2SLS with first stage OLS and second stage PPML

    Hi, I am using a panel data set to estimate the gravity model using PPML. I have trade flow data y, with an endogenous regressor x (continuous), a set of exogenous regressors w (including exporter (32), importer (49), time (18) dummy variables).

    I am trying to do two-stage regression. I set an endogenous variable (x) as a function of instruments and exporter, importer dummies in exogenous regressors (w).

    Hence, in the first stage, I regress the endogenous variable (x) on instruments (z) and exogenous regressors (w) through OLS and then obtain predicted x.

    In the second stage, I estimated y=exp(constant + predicted x + w) by using PPML proposed by Silva and Tenreyro (2006).

    My code is:
    Code:
    *STAGE 1
    reg x w z
    predict yhat if e(sample)
    
    
    *STAGE 2
    ppml y w yhat, cluster(dist)
    My question is:
    (1) is it possible to do estimation like this? (first stage OLS, second stage PPML)
    (2) Is there anything that I need to care about?
    (3) Is it better to use different methods? (such as ivpoission GMM)

  • #2
    Generally speaking, it is not legitimate to combine a linear first stage with a non-linear second stage estimation (the PPML is a non-linear estimator in parameters).

    Comment


    • #3
      I agree with Chinmay,
      However you have the option of using a control function approach. Specifically
      Code:
       *STAGE 1
      reg x w z predict res if e(sample), res
        *STAGE 2
      ppml y w x res, cluster(dist)
      with the caveat that you need to Bootstrap your standard errors to correct for the two step process

      Comment


      • #4
        Dear Rios and Sharma,

        Thank you for your valuable advice! I will try the control function approach. Have a great weekend!

        Comment


        • #5
          Good day

          I am also using running a gravity model using PPML analysing the effects of trade on bilateral migration. My trade variable is endogenous, but I have an instrument and used the control function approach as adviced by @FernandosRios above. However, I am having problems with bootstrapping the standard errors after running the second stage regression. The stata commands that I used are:

          1. bootstrap, reps(1000) seed(50): ppml y z(instrument) x(exogenous variables)

          The error message is "varlist required"

          2. bootstrap, reps(1000) seed(50) cluster(group_id): ppml y z(instrument) x(exogenous variables)

          The error message is "repeated time values within panel the most likely caused for this misspecifying the cluster (), idcluster(), or group() option.

          What am I missing? What is the correct command for bootstrapping standard errors using ppml?

          Comment


          • #6
            Dear Refilwe Lepelle,

            I may be able to help. Please email me and if the solution I have in mind works, I'll post it here later.

            Best wishes,

            Joao

            Comment

            Working...
            X