Announcement

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

  • Using OLS on panel dataset for each time period

    Hi, I am investigating the determinants of house prices over a 25 year period, my approach has been to use a fixed effects model for the entire sample period, however after 2011 there is a breakdown in the relationship between incomes and house prices and the results on my split sample (2011-2022) are not significant when using a fixed effects model. My question is, can I simply use OLS for single year subsamples? I want to run 25 different regressions for each year to get a better understanding of how the relationship between house prices and incomes evovles over time. Is there anything I should be aware of when using this approach?
    Thanks

  • #2
    Linus:
    welcome to this forum.
    If -xtreg,fe- shows evidence of a panel-wise effect (and if you're actually dealing with a panel dataset and not with a repeated cross-sectional study) you'd better to stick with that.
    The lack of statistical significance is by no means a reason to switch to 25 different OLS.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Linus:
      welcome to this forum.
      If -xtreg,fe- shows evidence of a panel-wise effect (and if you're actually dealing with a panel dataset and not with a repeated cross-sectional study) you'd better to stick with that.
      The lack of statistical significance is by no means a reason to switch to 25 different OLS.
      Carlo,

      Thank you for your reply. I should have been more specific in my main post, I still plan to use a fixed effect model, but want to run individual OLS regressions as a kind of robustness check. Part of the issue is that, my fixed effects model uses interaction terms of variables which affect house prices along with incomes because these variables are constant across time. So my question is more, will I run into any econometric problems running individual OLS regressions or introduce any kind of bias?

      Thanks

      Comment


      • #4
        Linus: The choice of model and estimation method depends on the purpose of the study. The reason to use fixed effects is typically because you're trying your best to uncover a causal effect -- of income, in your case. I assume you have data aggregated at some sort of geographic level. If you think the income effect has changed over time, then you can allow this in the context of FE estimation. You could just use something like

        Code:
        xtset id year
        xtreg hpricec.income i.year i.year#c.income controls, fe vce(cluster id)
        Even better, using log(hprice) and log(income) to obtain elasticities.

        Using separate regressions do not allow you to control for community fixed effects -- those time-constant factors that affect both housing prices and income. So your findings about how the effect of income varies over time might be spurious.

        Comment


        • #5
          Originally posted by Jeff Wooldridge View Post
          Linus: The choice of model and estimation method depends on the purpose of the study. The reason to use fixed effects is typically because you're trying your best to uncover a causal effect -- of income, in your case. I assume you have data aggregated at some sort of geographic level. If you think the income effect has changed over time, then you can allow this in the context of FE estimation. You could just use something like

          Code:
          xtset id year
          xtreg hpricec.income i.year i.year#c.income controls, fe vce(cluster id)
          Even better, using log(hprice) and log(income) to obtain elasticities.

          Using separate regressions do not allow you to control for community fixed effects -- those time-constant factors that affect both housing prices and income. So your findings about how the effect of income varies over time might be spurious.
          Dr. Wooldridge,

          Thank you for your response. Based on the code you have provided, I gather that to control for income changing over time, it is possible to interact income with the time (year) dummies. However, when I include a specification for a year dummy and a year dummy interacted with income stata drops one of these variables due to collinearity.

          Comment


          • #6
            Originally posted by Linus Seb View Post

            Dr. Wooldridge,

            Thank you for your response. Based on the code you have provided, I gather that to control for income changing over time, it is possible to interact income with the time (year) dummies. However, when I include a specification for a year dummy and a year dummy interacted with income stata drops one of these variables due to collinearity.

            Dr. Wooldridge,

            Thank you for your response. Based on the code you have provided, I gather that to control for income changing over time, it is possible to interact income with the time (year) dummies. However, when I include a specification for a year dummy and a year dummy interacted with income stata drops one of these variables due to collinearity.

            Comment


            • #7
              You always drop one dummy and one interaction because the overall intercept (accounted by firm fixed effects) is for a base time period and the coefficient on income is for the base time period. The other coefficients then measure the difference between the corresponding time period and the base period. This is the so-called "dummy variable trap" taught in intro econometrics.

              In my experience, Stata does not always drop the time period you want to use for the base. There's a way to specific the base but I usually flub it. You can define a dummy variable for each time period separately. So, if the years are 2000 to 2005, defined dummies for 2001 to 2005. Then use 1.d2001, 1.d2002, and so on; and 1.d2001#c.income, 1.d2002#c.income, and so on. Then 2000 is the base year and the coefficients on the interactions are relative to that year.


              Please note that you're asked to show what you typed and what Stata returned if you want the maximize the chance for a helpful answer.

              Comment

              Working...
              X