Announcement

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

  • Use an estimated coefficient as independent variable

    Dear Stata community,

    I have a panel dataset at the regional level for a set of 10 countries (i.e several regions within each of the 10 countries). I first perform an OLS regression country by country:

    Y_(i,t)=β X_(i,t)+ϵ_(i,t)

    I therefore obtain a \hat{β} for each country (\hat{β}^c). I then would like to use this estimated coefficient as an independent variable in another (regional-level) regression (this time, not country by country):

    Z_(i,t)= γ β_(i)+ μ_(i,t)

    Is there any econometric issue of using an estimated coefficient as an independent variable in a regression? Is there a Stata command to handle this? Any reference would be helpful.

    What if, for some countries, the β is not statistically significant in the first stage regression?

    Many thanks in advance for your help,
    Théodore

    PS: sorry for the equations, I hope this is readable.

  • #2
    Theodore.
    welcome to this forum-
    Are you doing an instrumental variables panel data regression (as per your -first stage- mention)?
    If you have a continuous regressand and a N>T panel dataset, you may want to take a look at: -xtivreg-.
    As an aside, please read (and act on) the FAQ on how to post (more) effectively. Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo,

      many thanks for your answer and sorry if I was not clear enough.

      It is not an instrumental variables panel data regression as I am not using the fitted values of X in my second regression but the point estimate of the coefficient β. Since β is a country-level variable, all regions in a given country have the same β.

      I hope this is clearer,
      Théodore

      Comment


      • #4
        Theodore, the independent variable in the second regression is essentially a country-specific variable with 10 different values. Technically, you may run the second regression - the only technical issue in my mind is that you may need to correct the standard errors in the second regression using, for example, bootstrap as it's a generated regressor. But whether the regression makes sense is largely beyond econometrics: What do the 10 coefficients from the first regression mean? Are they really what you want to control for in the second regression? Technically, you may generate the beta variable with the following codes.

        Code:
        egen country_grp = group(countryid)  // country_grp = 1, 2, ..., 10
        gen beta = .
        
        forvalues i = 1(1)10  {
            reg Y X if country_grp == `i'
            replace beta = _b[X] if country_grp == `i'
        }

        Comment


        • #5
          Dear Fei,

          many thanks for your help, your code is exactly why I do. I'm gonna investigate bootstrapping for a generated regressor, even though I thought it was used when using predicted values of a variable as an independent variable, not the point estimate of the β coefficient estimated in my first regression.

          Thanks,
          Theodore

          Comment

          Working...
          X