Announcement

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

  • Newbie question about ivregress 2sls

    Dear forum members,

    I am running the following commands:

    ivregress 2sls lnpcon (lnppop = L4.lnppop_pnad) lnprenpc ano
    predict lnpcon_predicted, xb

    My data is annual. They start in 1976 and the last year is 2013. Besides, the first lpcon number available is from 1987.

    After running these commands I was expecting Stata to predict lnpcon from 1980 to 2013 (due to the IV's lag). However, this is not what happened. Somehow Stata's predictions (as I can see in the Data Editor) start in 1976, even having no data available between 1972 and 1975.

    This sounds like (and it is) a newbie question. Of course I am doing something wrong. Could you help me please to figure out what the error is?

    Thank you.

  • #2
    Originally posted by Fernando Carnot View Post

    ivregress 2sls lnpcon (lnppop = L4.lnppop_pnad) lnprenpc ano
    Are "lnpop" and "lnpop_pnad" the same variable? Your instrument needs to be exogenous in 2SLS IV regression, so I would first worry about the specification before trying to troubleshoot any estimation issues.

    Comment


    • #3
      Thank you for your comment, Andrew.
      The instrument is exogenous.

      Comment


      • #4
        OK. The default is to make both in-sample and out-of-sample predictions. To get in-sample predictions only:

        Code:
        ivregress 2sls lnpcon (lnppop = L4.lnppop_pnad) lnprenpc ano
        predict lnpcon_predicted if e(sample), xb

        Comment


        • #5
          Originally posted by Andrew Musau View Post
          OK. The default is to make both in-sample and out-of-sample predictions. To get in-sample predictions only:

          Code:
          ivregress 2sls lnpcon (lnppop = L4.lnppop_pnad) lnprenpc ano
          predict lnpcon_predicted if e(sample), xb
          Thank you again, Andrew.

          I understand this, and my goal was to predict lnpcon from 1980 to 2013.

          What I don't understand is how Stata was able to predict lpcon for the period between 1976 and 1979. There was no lagged data available for the period between 1972 and 1975.

          Comment


          • #6
            Well, you do not need the lag data to predict 1976 - 1979. You just need data for lnppop lnprenpc and ano.
            Once the coefficients are estimated, prediction simply multiplies the coefficients by the available data in the variables of the main model. This is how you could use the results to make out-sample predictions.
            F

            Comment


            • #7
              I didn't know this. I thought the lagged variable values were necessary.
              It makes sense. The first stage regression estimation still applies.

              Thank you, Fernando.

              Comment

              Working...
              X