Announcement

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

  • Change in the sign of coefficient

    I am doing a panel regression on the data of 18 countries over a period of 10 years. The correlation between my main explanatory variable and dependent variable is positive. But in regression the coefficient of my explanatory variable is negative when I include year fixed effects in the model. But if I don't include year fixed effect the sign is positive?

    Why is the sign changing with year fixed effects?
    Should I include year fixed effects or not?

  • #2
    Time effects capture time-varying country-invariant factors such as fluctuations in crude oil prices or the occurrence of global pandemics which can significantly impact economic variables, and their exclusion might lead to biased and unreliable results. To enhance the model's robustness, it is imperative to include time effects. You cannot rely on a simple pairwise correlation between the variable of interest and the outcome due to omitted variable bias. Adding country and time fixed effects helps to mitigate this risk of omitted variable bias, providing a more accurate representation of the true relationship between the variable and the outcome.

    Comment


    • #3
      Sara:
      welcome to this forum.
      As an aside to Andrew's excellent advice, please follows the FAQ and share what you typed and what Stata gave you back. Thanks.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Thank you Andrew and Carlo for your response.
        For more guidance I am attaching the image of what I typed and what Stata gave me back.
        Click image for larger version

Name:	stata forum.PNG
Views:	2
Size:	125.2 KB
ID:	1737371
        Click image for larger version

Name:	stata forum 1.PNG
Views:	2
Size:	109.8 KB
ID:	1737372
        Attached Files

        Comment


        • #5
          The last regression without the -robust- option. 18 clusters are too few. If you have Stata 18, you can consider wild cluster bootstrap instead, see https://www.stata.com/new-in-stata/w...trap-inference. If you have earlier versions,

          Code:
          ssc install boottest, replace
          help boottest
          for the same.

          Comment

          Working...
          X