Announcement

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

  • Year and State Fixed Effects

    Hello guys,

    Please, I need help. I have questions about a year and state fixed effects. I have panel data for 51 states and 12 years.

    I used OLS and FE regression. When I tried to fixed-effects for a year, Stata treated it as category variables (The first year as a reference) Is that correct?

    HTML Code:
    *Death_OLS
    regress  Death_rate Unemployment 
    regress  Death_rate Unemployment Real_GDP HealthCare
    regress  Death_rate Unemployment Real_GDP HealthCare Homeownership Female Citizen Children Worke Earnings  High_School Bachelors_Degree 
    regress Death_rate Unemployment Real_GDP HealthCare Homeownership Female Citizen Children Worke Earnings  High_School Bachelors_Degree Age0_18 Age19_25 Age26_34 Age35_54 Age55_64 Age65 
    * Fixed effect
    xtset state year, yearly
    xtreg Death_rate Unemployment Real_GDP HealthCare Homeownership Female Citizen Children Worke Earnings  High_School Bachelors_Degree Age0_18 Age19_25 Age26_34 Age35_54 Age55_64 Age65 i.state, fe
    xtreg Death_rate Unemployment Real_GDP HealthCare Homeownership Female Citizen Children Worke Earnings  High_School Bachelors_Degree Age0_18 Age19_25 Age26_34 Age35_54 Age55_64 Age65 i.state i.year, fe

    Also, as you can see that when I add more variables, the coefficient on unemployment drops very quickly and eventually becomes small and not statistically significant. This indicates that the unemployment rate has a lot of omitted variable bias. When I control for more state characteristics, it’s the effect on mortality is less clear.

    In linear regression, omitted variables are common since it is often impossible to include all relevant variables.

    What can I do to fix an omitted variable bias?
    How can I mitigate the effects of omitted variable bias?
    Through introducing control variables and introducing proxy variables.

    Thank you.

    Click image for larger version

Name:	1111ture.JPG
Views:	1
Size:	115.7 KB
ID:	1704812


  • #2
    Seed:
    a) different regression specifucations produce different coefficients;
    b) I think that specififcation 1) and 2) would not be considered by any decent technical journal;
    c) how could you include -i.state- as a predictor in -xtreg,fe- sounds like a mistery to me, as -i.state- should have been omitted since you already -xtset- your data with -state- as the -panelvar-:
    Code:
    . use "https://www.stata-press.com/data/r17/nlswork.dta"
    (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
    
    . xtreg ln_wage c.age##c.age i.idcode i.year if idcode<=2, fe
    note: c.age#c.age omitted because of collinearity.
    note: 2.idcode omitted because of collinearity.
    note: 88.year omitted because of collinearity.
    
    Fixed-effects (within) regression               Number of obs     =         24
    Group variable: idcode                          Number of groups  =          2
    
    R-squared:                                      Obs per group:
         Within  = 0.7847                                         min =         12
         Between = 1.0000                                         avg =       12.0
         Overall = 0.5854                                         max =         12
    
                                                    F(12,10)          =       3.04
    corr(u_i, Xb) = -0.0931                         Prob > F          =     0.0440
    
    ------------------------------------------------------------------------------
         ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             age |   .0482585    .018305     2.64   0.025     .0074724    .0890446
                 |
     c.age#c.age |          0  (omitted)
                 |
        2.idcode |          0  (omitted)
                 |
            year |
             71  |  -.0965511   .3356834    -0.29   0.780    -.8445005    .6513982
             72  |   .0587938   .3241531     0.18   0.860    -.6634643    .7810519
             73  |   .2775258   .3132686     0.89   0.396    -.4204802    .9755317
             75  |   .3207273   .2937204     1.09   0.300    -.3337225    .9751771
             77  |   .1721147   .2776449     0.62   0.549    -.4465167    .7907462
             78  |   .4630984   .2711078     1.71   0.118    -.1409674    1.067164
             80  |   .4139782   .2614103     1.58   0.144    -.1684803    .9964367
             82  |   .1948474   .3334152     0.58   0.572     -.548048    .9377427
             83  |   .2717022   .2561549     1.06   0.314    -.2990466     .842451
             85  |   .2351155   .2591385     0.91   0.386    -.3422809     .812512
             87  |    .128281    .267153     0.48   0.641     -.466973     .723535
             88  |          0  (omitted)
                 |
           _cons |   .3741238   .5877343     0.64   0.539    -.9354298    1.683677
    -------------+----------------------------------------------------------------
         sigma_u |  .29477487
         sigma_e |  .27976654
             rho |  .52610446   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(1, 10) = 12.21                      Prob > F = 0.0058
    
    .
    d) in your last specification, the unemployment coefficient may well slim down due to a -i.year- within-panel variation (other things being equal);
    e) while omission due to perfect collinearity is common in -regress-, it shoud be expected with -xtreg,fe- for time-invariant variables.
    Last edited by Carlo Lazzaro; 08 Mar 2023, 01:54.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Seed Al View Post
      What can I do to fix an omitted variable bias?
      Not omitting those variables... Easier said than done, but still that is the best solution. All the other "solutions" out there, e.g. fixed effects models, instrumental variables, are more a matter of faith than solid empirical science. These methods try to control for stuff we haven't seen. Information has to come from somewhere; if it is not from the data then it is from our imagination (i.e. assumptions). In practice, we have to deal with the data we have and not with the data we want. So often this kind of "solution" is unavoidable, but it is good to keep in mind that that these methods are a necessary evil and not in some sense desirable.

      Originally posted by Seed Al View Post
      How can I mitigate the effects of omitted variable bias?
      See above.
      ---------------------------------
      Maarten L. Buis
      University of Konstanz
      Department of history and sociology
      box 40
      78457 Konstanz
      Germany
      http://www.maartenbuis.nl
      ---------------------------------

      Comment


      • #4
        Thank you so much for your response.

        Based on my variables, how can I determine endogenous variables and instrumental variables?

        Thank you.


        Click image for larger version

Name:	2211ture.JPG
Views:	1
Size:	46.5 KB
ID:	1704859

        Comment


        • #5
          Originally posted by Seed Al View Post
          Based on my variables, how can I determine endogenous variables and instrumental variables?
          Instrumental variables are extremely rare. So these kinds of methods are useful if you have data that is known to contain instrumental variables. It could be that this follows from the research design or some external shock. Just opening a dataset and starting to look for instrumental variables is just not going to work. These are just too rare, and using a variable as an instrument when that isn't true will make your estimates worse. As a general rule: Garbage in --> Garbage out.
          ---------------------------------
          Maarten L. Buis
          University of Konstanz
          Department of history and sociology
          box 40
          78457 Konstanz
          Germany
          http://www.maartenbuis.nl
          ---------------------------------

          Comment

          Working...
          X