Announcement

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

  • Panel data random/fixed effects

    Hi, I am wiritng my bachelor thesis about the effect of NAFTA on income inequality (using the GINI) in 17 industries from 1990-2010 in the US. I have panel data. I ran a Hausman test whcih showed me i should do random effect. I would like to control for year specific random effects and industry specific national effects. However when i run this in stata, one of my industry coefficients is omitted and 3 of the years are omitted, stata says that they both omitted are due to collinearity.

    this is the code i have used :
    xtset Industry_code year
    xtreg GINI c.NAFTA_dummy##c.ed_cat GDP Inflation employmentrate union_membership_rate i.Industry_code i.year, re robust

    Could someone help me figure out why or how i can fix this.
    Thank you in advnace!!


  • #2
    Claudia:
    welcome to this forum.
    You can't if you do not change your regression specification.
    In addition:
    1) you cannot include your fixed as a predictor;
    2) why prefixing the categorical variable -NAFTA_dummy- with -c.-?
    3) why not sharing what you typed and what Stata gave you back (as per FAQ)? Thanks.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Claudia: Please do take Carlo’s helpful advice. The industry fixed effects are already accounted for when you use FE. And you can’t include them with RE. I’m guessing GDP, inflation, employmentrate only vary by time, not industry. They are perfectly collinear with the year dummies. Stata drops the last collinear variables listed. Instead, you should drop the aggregate economic variables unless you interact them with variables that change with industry.

      Comment


      • #4
        Thank you for your response, I am not sure i understand what you mean by, I cannot include my fixed as a predictor. As for your second point, would it be better if i only prefixed the ed_cat variable with -c.- (This is also a categorical variable that shows average educational attainment for each industry ranging from 1-5). I was not sure if i could upload images, I have added an attachment to what STATA shows me. In addition, you are correct that GDP and inflation dont vary by industry but employment rate is the employment rate per industry. Jeff Woolridge, when using RE, would you recommend that i drop my aggregate economic variables (GDP, inflation) but still keep the industry economic controls (employment rate, union memebrship)?

        Thank you,
        Claudia
        Attached Files

        Comment


        • #5
          Claudia:
          1) you went -re- and the between_Rsq=1. You have overiftted your regression and should go for a more parsimonious (that is, less predictors) specification;
          2) as per -help fvvarlist-, categorical and continous predctors should be prefixed with -i.- and -c.-, respectively;
          3) as per FAQ, screenshots are deprectaed on this forum; please use CODE delimiters (see the FAQ agan) instead. Thanks.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #6
            Good evening,
            I am not sure if i have used the code delimitters correct, but is this better? I dont understand what your first point is.

            Code:
            . xtreg GINI i.NAFTA_dummy##i.ed_cat GDP Inflation employmentrate union_membership_rate i.Industry_code i.year, re robust
            note: 15.Industry_code omitted because of collinearity.
            note: 17.Industry_code omitted because of collinearity.
            note: 2008.year omitted because of collinearity.
            note: 2009.year omitted because of collinearity.
            note: 2010.year omitted because of collinearity.
            
            Random-effects GLS regression                   Number of obs     =        357
            Group variable: Industry_c~e                    Number of groups  =         17
            
            R-squared:                                      Obs per group:
                 Within  = 0.5730                                         min =         21
                 Between = 1.0000                                         avg =       21.0
                 Overall = 0.9454                                         max =         21
            
                                                            Wald chi2(16)     =          .
            corr(u_i, X) = 0 (assumed)                      Prob > chi2       =          .
            
                                              (Std. err. adjusted for 17 clusters in Industry_code)
            ---------------------------------------------------------------------------------------
                                  |               Robust
                             GINI | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
            ----------------------+----------------------------------------------------------------
                    1.NAFTA_dummy |  -.3139705   .0751851    -4.18   0.000    -.4613306   -.1666104
                                  |
                           ed_cat |
                               3  |  -.1979845   .0161172   -12.28   0.000    -.2295736   -.1663954
                               4  |  -.0812386   .0044113   -18.42   0.000    -.0898845   -.0725927
                                  |
               NAFTA_dummy#ed_cat |
                             1 3  |   .0155751   .0091585     1.70   0.089    -.0023753    .0335254
                             1 4  |   .0520322   .0055078     9.45   0.000     .0412371    .0628273
                                  |
                              GDP |   .0000473   .0000114     4.15   0.000     .0000249    .0000696
                        Inflation |   -.007009   .0013343    -5.25   0.000    -.0096242   -.0043938
                   employmentrate |  -.1262629   .0913699    -1.38   0.167    -.3053447    .0528189
            union_membership_rate |   .0262066   .0079493     3.30   0.001     .0106262     .041787
                                  |
                    Industry_code |
                               2  |  -.1702832   .0009962  -170.93   0.000    -.1722357   -.1683306
                               3  |   -.110989   .0034156   -32.49   0.000    -.1176834   -.1042945
                               4  |  -.1046701   .0031195   -33.55   0.000    -.1107842    -.098556
                               5  |  -.1327124   .0057879   -22.93   0.000    -.1440564   -.1213684
                               6  |  -.1650394   .0034425   -47.94   0.000    -.1717865   -.1582923
                               7  |   .0262884   .0138716     1.90   0.058    -.0008994    .0534762
                               8  |  -.0324865   .0166321    -1.95   0.051    -.0650848    .0001117
                               9  |   .0852957   .0118918     7.17   0.000     .0619882    .1086032
                              10  |  -.0018851   .0110897    -0.17   0.865    -.0236205    .0198502
                              11  |   .1056735     .01204     8.78   0.000     .0820755    .1292715
                              12  |   .1384792   .0147776     9.37   0.000     .1095156    .1674427
                              13  |    .183775   .0028767    63.89   0.000     .1781369    .1894131
                              14  |   .1264933    .006412    19.73   0.000     .1139259    .1390606
                              15  |          0  (omitted)
                              16  |   .0267203   .0189949     1.41   0.160    -.0105091    .0639497
                              17  |          0  (omitted)
                                  |
                             year |
                            1991  |  -.0152509   .0028752    -5.30   0.000    -.0208862   -.0096157
                            1992  |  -.0415306   .0063162    -6.58   0.000      -.05391   -.0291512
                            1993  |  -.0536018   .0101474    -5.28   0.000    -.0734902   -.0337133
                            1994  |   .2327217   .0616373     3.78   0.000     .1119149    .3535286
                            1995  |   .2185078   .0582936     3.75   0.000     .1042544    .3327611
                            1996  |    .224553   .0544952     4.12   0.000     .1177444    .3313617
                            1997  |   .2019201   .0489647     4.12   0.000     .1059511    .2978891
                            1998  |   .1719832   .0406253     4.23   0.000      .092359    .2516074
                            1999  |   .1445081   .0342935     4.21   0.000     .0772941    .2117221
                            2000  |   .1178479   .0281513     4.19   0.000     .0626724    .1730235
                            2001  |   .1202633   .0277467     4.33   0.000     .0658806    .1746459
                            2002  |   .1020844   .0220827     4.62   0.000     .0588031    .1453657
                            2003  |   .0896017   .0209128     4.28   0.000     .0486133      .13059
                            2004  |   .0606832   .0143416     4.23   0.000     .0325743    .0887922
                            2005  |    .046964   .0115106     4.08   0.000     .0244036    .0695243
                            2006  |   .0246485   .0065286     3.78   0.000     .0118527    .0374443
                            2007  |   .0031926   .0027936     1.14   0.253    -.0022828    .0086681
                            2008  |          0  (omitted)
                            2009  |          0  (omitted)
                            2010  |          0  (omitted)
                                  |
                            _cons |   .0873464   .1111908     0.79   0.432    -.1305836    .3052764
            ----------------------+----------------------------------------------------------------
                          sigma_u |          0
                          sigma_e |  .01641237
                              rho |          0   (fraction of variance due to u_i)
            ---------------------------------------------------------------------------------------
            Kind regards,
            Claudia

            Comment


            • #7
              Claudia:
              1) CODE delimiters are perfect: thanks;
              2) my point is that a between R_sq=1 (you should consider it when gong -re-) is a clear warning chime that your regression raises issues;
              3) this is also highlighted by the -sigma_u-=0 that means no panel-wise effect and points you to pooled OLS.
              Kind regards,
              Carlo
              (StataNow 18.5)

              Comment


              • #8
                great! However I don't quite understand why some of my coefficients are missing (for industries 17 and 15 and years 2008-2010).
                Thank you,
                Claudia

                Comment


                • #9
                  Claudia: if you put in industry dummies then you’re doing fixed effects. And you should be in this context. Once you include those dummies there’s no role for random effects. And the standard errors can’t be trusted. That’s why you’re getting a weird R-squared and why variables are being dropped. Your data dimensions are small and so clustering standard errors is questionable. You could compare with Driscoll-Kraay using xtscc. You’d still be doing FE but getting different stnd errors.

                  Comment


                  • #10
                    Jeff Wooldridge, I tried to run xtscc however stata tells me the command is unrecognised, I have STATA 17, I am not sure if this changed anything. So, you would suggest that I run fe instead of re ?
                    Thank you

                    Comment


                    • #11
                      It's a user-written command so you have to install:

                      Code:
                      ssc install xtscc
                      Your problem calls for fixed effects. By putting in industry dummies, you are doing fixed effects. You either include the dummies in OLS or use xtreg, fe -- with the latter preferred because it won't report incorrect standard errors on the industry dummies. Both xtreg, fe and xtscc, fe use fixed effects. They compute standard errors differently. You have to specify a lag with xtscc. With T = 21, no more than two, I would think. You will get the same point estimates with xtreg, fe and xtscc, fe if you do it properly.

                      You should drop the GDP, inflation, and employmentrate variables because they change only across t, I think. You cannot identify the coefficients on these when you put in a full set of year dummies. So the coefficients are meaningless. You get estimates because Stata is dropping the last three collinear variables -- the year dummies. If you put GDP, inflation, and employmentrate at the end, I believe Stata will drop them rather than the time dummies.

                      The most flexible thing to do is to include industry and time fixed effects. Doing so makes variables that only change over time redundant. You don't need these control variables, just like you don't need to control for variables that change only across industry.

                      You should show your new output from xtreg, fe and xtscc, fe.

                      Comment


                      • #12
                        In my data i use an interaction term between NAFTA and educational category, which differs per industry but not through time. GDP and inflation only differ through time and not by industry. union membership rates and educational attainment differ both between industry and time.

                        This is what STATA gives me if i run xtscc, fe (while keeping GDP, inflation, employment rate and union membership)

                        Code:
                        . xtscc GINI i.NAFTA_dummy##i.ed_cat i.Industry_code i.year GDP Inflation employmentrate union_membership_rate, fe lag(20)
                        
                        Regression with Driscoll-Kraay standard errors   Number of obs     =       357
                        Method: Fixed-effects regression                 Number of groups  =        17
                        Group variable (i): Industry_code                F( 24,    20)     =    215.41
                        maximum lag: 20                                  Prob > F          =    0.0000
                                                                         within R-squared  =    0.5730
                        
                        ---------------------------------------------------------------------------------------
                                              |             Drisc/Kraay
                                         GINI | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
                        ----------------------+----------------------------------------------------------------
                                  NAFTA_dummy |
                                           0  |          0  (empty)
                                           1  |   .0259817   .0014118    18.40   0.000     .0230368    .0289267
                                              |
                                       ed_cat |
                                           2  |          0  (empty)
                                           3  |          0  (omitted)
                                           4  |          0  (omitted)
                                              |
                           NAFTA_dummy#ed_cat |
                                         0 2  |          0  (empty)
                                         0 3  |          0  (empty)
                                         0 4  |          0  (empty)
                                         1 2  |          0  (empty)
                                         1 3  |   .0155751   .0028394     5.49   0.000     .0096522     .021498
                                         1 4  |   .0520322    .008337     6.24   0.000     .0346415    .0694229
                                              |
                                Industry_code |
                                           1  |          0  (empty)
                                           2  |          0  (omitted)
                                           3  |          0  (omitted)
                                           4  |          0  (omitted)
                                           5  |          0  (omitted)
                                           6  |          0  (omitted)
                                           7  |          0  (omitted)
                                           8  |          0  (omitted)
                                           9  |          0  (omitted)
                                          10  |          0  (omitted)
                                          11  |          0  (omitted)
                                          12  |          0  (omitted)
                                          13  |          0  (omitted)
                                          14  |          0  (omitted)
                                          15  |          0  (omitted)
                                          16  |          0  (omitted)
                                          17  |          0  (omitted)
                                              |
                                         year |
                                        1990  |          0  (empty)
                                        1991  |   .0259155   .0005052    51.30   0.000     .0248617    .0269692
                                        1992  |   .0501688   .0008813    56.92   0.000     .0483304    .0520073
                                        1993  |   .0469881    .000893    52.62   0.000     .0451253    .0488509
                                        1994  |   .0148554   .0002133    69.65   0.000     .0144105    .0153003
                                        1995  |          0  (omitted)
                                        1996  |   .0108128   .0001881    57.47   0.000     .0104204    .0112052
                                        1997  |   .0206166   .0000924   223.19   0.000     .0204239    .0208093
                                        1998  |   .0305462    .000299   102.17   0.000     .0299226    .0311698
                                        1999  |  -.0062718   .0001055   -59.47   0.000    -.0064918   -.0060518
                                        2000  |  -.0633944   .0007884   -80.41   0.000    -.0650389   -.0617499
                                        2001  |  -.0384837   .0005796   -66.39   0.000    -.0396928   -.0372746
                                        2002  |  -.0073203   .0001881   -38.92   0.000    -.0077127    -.006928
                                        2003  |  -.0354672   .0012382   -28.64   0.000      -.03805   -.0328843
                                        2004  |   -.066588   .0015509   -42.93   0.000    -.0698232   -.0633528
                                        2005  |  -.0942223   .0013594   -69.31   0.000     -.097058   -.0913866
                                        2006  |  -.1010411   .0014248   -70.92   0.000    -.1040132    -.098069
                                        2007  |  -.1021389   .0013374   -76.37   0.000    -.1049287   -.0993491
                                        2008  |  -.1400376   .0017151   -81.65   0.000    -.1436152   -.1364601
                                        2009  |          0  (omitted)
                                        2010  |   -.061578   .0009086   -67.77   0.000    -.0634733   -.0596827
                                              |
                                          GDP |   .0000258   1.96e-07   131.29   0.000     .0000254    .0000262
                                    Inflation |    .028589   .0004009    71.32   0.000     .0277529    .0294252
                               employmentrate |  -.1262629   .0289652    -4.36   0.000    -.1866832   -.0658425
                        union_membership_rate |   .0262066   .0116508     2.25   0.036     .0019034    .0505097
                                        _cons |          0  (omitted)
                        ---------------------------------------------------------------------------------------
                        This is what STATA shows me when i do xtscc and drop the control variables:

                        Code:
                        . xtscc GINI i.NAFTA_dummy##i.ed_cat i.Industry_code i.year, fe lag(20)
                        
                        Regression with Driscoll-Kraay standard errors   Number of obs     =       357
                        Method: Fixed-effects regression                 Number of groups  =        17
                        Group variable (i): Industry_code                F( 22,    20)     =     25.17
                        maximum lag: 20                                  Prob > F          =    0.0000
                                                                         within R-squared  =    0.5558
                        
                        ------------------------------------------------------------------------------------
                                           |             Drisc/Kraay
                                      GINI | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
                        -------------------+----------------------------------------------------------------
                               NAFTA_dummy |
                                        0  |          0  (empty)
                                        1  |   .0307346   .0014173    21.69   0.000     .0277782     .033691
                                           |
                                    ed_cat |
                                        2  |          0  (empty)
                                        3  |          0  (omitted)
                                        4  |          0  (omitted)
                                           |
                        NAFTA_dummy#ed_cat |
                                      0 2  |          0  (empty)
                                      0 3  |          0  (empty)
                                      0 4  |          0  (empty)
                                      1 2  |          0  (empty)
                                      1 3  |   .0131869   .0018586     7.10   0.000     .0093099    .0170638
                                      1 4  |   .0516688   .0075091     6.88   0.000     .0360051    .0673324
                                           |
                             Industry_code |
                                        1  |          0  (empty)
                                        2  |          0  (omitted)
                                        3  |          0  (omitted)
                                        4  |          0  (omitted)
                                        5  |          0  (omitted)
                                        6  |          0  (omitted)
                                        7  |          0  (omitted)
                                        8  |          0  (omitted)
                                        9  |          0  (omitted)
                                       10  |          0  (omitted)
                                       11  |          0  (omitted)
                                       12  |          0  (omitted)
                                       13  |          0  (omitted)
                                       14  |          0  (omitted)
                                       15  |          0  (omitted)
                                       16  |          0  (omitted)
                                       17  |          0  (omitted)
                                           |
                                      year |
                                     1990  |          0  (empty)
                                     1991  |  -.0075282   4.71e-16 -1.6e+13   0.000    -.0075282   -.0075282
                                     1992  |  -.0087243   1.67e-16 -5.2e+13   0.000    -.0087243   -.0087243
                                     1993  |  -.0066486   1.89e-15 -3.5e+12   0.000    -.0066486   -.0066486
                                     1994  |  -.0412917   2.09e-15 -2.0e+13   0.000    -.0412917   -.0412917
                                     1995  |    -.04297   2.33e-15 -1.8e+13   0.000      -.04297     -.04297
                                     1996  |  -.0175846   1.95e-15 -9.0e+12   0.000    -.0175846   -.0175846
                                     1997  |  -.0112601   2.92e-15 -3.8e+12   0.000    -.0112601   -.0112601
                                     1998  |  -.0090653   2.18e-15 -4.2e+12   0.000    -.0090653   -.0090653
                                     1999  |  -.0117613   3.58e-15 -3.3e+12   0.000    -.0117613   -.0117613
                                     2000  |  -.0209324   1.91e-15 -1.1e+13   0.000    -.0209324   -.0209324
                                     2001  |  -.0082572   1.44e-15 -5.7e+12   0.000    -.0082572   -.0082572
                                     2002  |  -.0064432   1.83e-15 -3.5e+12   0.000    -.0064432   -.0064432
                                     2003  |   -.006215   1.82e-15 -3.4e+12   0.000     -.006215    -.006215
                                     2004  |  -.0110298   1.94e-15 -5.7e+12   0.000    -.0110298   -.0110298
                                     2005  |  -.0029857   1.78e-15 -1.7e+12   0.000    -.0029857   -.0029857
                                     2006  |  -.0032011   1.67e-15 -1.9e+12   0.000    -.0032011   -.0032011
                                     2007  |  -.0064752   1.64e-15 -3.9e+12   0.000    -.0064752   -.0064752
                                     2008  |  -.0156316   1.54e-15 -1.0e+13   0.000    -.0156316   -.0156316
                                     2009  |  -.0067819   1.50e-15 -4.5e+12   0.000    -.0067819   -.0067819
                                     2010  |          0  (omitted)
                                           |
                                     _cons |   .4125109   1.90e-16  2.2e+15   0.000     .4125109    .4125109
                        ------------------------------------------------------------------------------------
                        Finally, this is the output when using xtreg,fe without the controls:

                        Code:
                        . xtreg GINI i.NAFTA_dummy##i.ed_cat i.Industry_code i.year, fe 
                        note: 3.ed_cat omitted because of collinearity.
                        note: 4.ed_cat omitted because of collinearity.
                        note: 2.Industry_code omitted because of collinearity.
                        note: 3.Industry_code omitted because of collinearity.
                        note: 4.Industry_code omitted because of collinearity.
                        note: 5.Industry_code omitted because of collinearity.
                        note: 6.Industry_code omitted because of collinearity.
                        note: 7.Industry_code omitted because of collinearity.
                        note: 8.Industry_code omitted because of collinearity.
                        note: 9.Industry_code omitted because of collinearity.
                        note: 10.Industry_code omitted because of collinearity.
                        note: 11.Industry_code omitted because of collinearity.
                        note: 12.Industry_code omitted because of collinearity.
                        note: 13.Industry_code omitted because of collinearity.
                        note: 14.Industry_code omitted because of collinearity.
                        note: 15.Industry_code omitted because of collinearity.
                        note: 16.Industry_code omitted because of collinearity.
                        note: 17.Industry_code omitted because of collinearity.
                        note: 2010.year omitted because of collinearity.
                        
                        Fixed-effects (within) regression               Number of obs     =        357
                        Group variable: Industry_c~e                    Number of groups  =         17
                        
                        R-squared:                                      Obs per group:
                             Within  = 0.5558                                         min =         21
                             Between = 0.0277                                         avg =       21.0
                             Overall = 0.0952                                         max =         21
                        
                                                                        F(22,318)         =      18.09
                        corr(u_i, Xb) = 0.0032                          Prob > F          =     0.0000
                        
                        ------------------------------------------------------------------------------------
                                      GINI | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                        -------------------+----------------------------------------------------------------
                             1.NAFTA_dummy |   .0307346   .0063228     4.86   0.000     .0182947    .0431745
                                           |
                                    ed_cat |
                                        3  |          0  (omitted)
                                        4  |          0  (omitted)
                                           |
                        NAFTA_dummy#ed_cat |
                                      1 3  |   .0131869   .0046729     2.82   0.005     .0039932    .0223805
                                      1 4  |   .0516688   .0099126     5.21   0.000     .0321662    .0711714
                                           |
                             Industry_code |
                                        2  |          0  (omitted)
                                        3  |          0  (omitted)
                                        4  |          0  (omitted)
                                        5  |          0  (omitted)
                                        6  |          0  (omitted)
                                        7  |          0  (omitted)
                                        8  |          0  (omitted)
                                        9  |          0  (omitted)
                                       10  |          0  (omitted)
                                       11  |          0  (omitted)
                                       12  |          0  (omitted)
                                       13  |          0  (omitted)
                                       14  |          0  (omitted)
                                       15  |          0  (omitted)
                                       16  |          0  (omitted)
                                       17  |          0  (omitted)
                                           |
                                      year |
                                     1991  |  -.0075282   .0057231    -1.32   0.189     -.018788    .0037317
                                     1992  |  -.0087243   .0057231    -1.52   0.128    -.0199842    .0025355
                                     1993  |  -.0066486   .0057231    -1.16   0.246    -.0179084    .0046113
                                     1994  |  -.0412917   .0057231    -7.21   0.000    -.0525516   -.0300319
                                     1995  |    -.04297   .0057231    -7.51   0.000    -.0542299   -.0317102
                                     1996  |  -.0175846   .0057231    -3.07   0.002    -.0288444   -.0063247
                                     1997  |  -.0112601   .0057231    -1.97   0.050    -.0225199   -2.36e-07
                                     1998  |  -.0090653   .0057231    -1.58   0.114    -.0203251    .0021945
                                     1999  |  -.0117613   .0057231    -2.06   0.041    -.0230211   -.0005014
                                     2000  |  -.0209324   .0057231    -3.66   0.000    -.0321922   -.0096725
                                     2001  |  -.0082572   .0057231    -1.44   0.150    -.0195171    .0030026
                                     2002  |  -.0064432   .0057231    -1.13   0.261     -.017703    .0048167
                                     2003  |   -.006215   .0057231    -1.09   0.278    -.0174749    .0050448
                                     2004  |  -.0110298   .0057231    -1.93   0.055    -.0222896    .0002301
                                     2005  |  -.0029857   .0057231    -0.52   0.602    -.0142455    .0082741
                                     2006  |  -.0032011   .0057231    -0.56   0.576     -.014461    .0080587
                                     2007  |  -.0064752   .0057231    -1.13   0.259    -.0177351    .0047846
                                     2008  |  -.0156316   .0057231    -2.73   0.007    -.0268914   -.0043718
                                     2009  |  -.0067819   .0057231    -1.19   0.237    -.0180418    .0044779
                                     2010  |          0  (omitted)
                                           |
                                     _cons |   .4125109   .0040468   101.93   0.000      .404549    .4204728
                        -------------------+----------------------------------------------------------------
                                   sigma_u |   .0627177
                                   sigma_e |  .01668543
                                       rho |  .93390094   (fraction of variance due to u_i)
                        ------------------------------------------------------------------------------------
                        F test that all u_i=0: F(16, 318) = 284.21                   Prob > F = 0.0000
                        
                        .
                        Thank you

                        Comment


                        • #13
                          Several problems here. When you do FE, you don't also include the dummy variables for industry. Including them IS fixed effects. Those should be dropped. Second, you cannot use a lag of 20 in xtscc when T = 21. I said at most two. Now it appears that ed_cat does not change over time, so those also drop out of FE. But you can interact NAFTA with ed_cat still to see if there are differential effects.

                          Code:
                          xtreg GINI c.NAFTA_dummy c.NAFTA_dummy#i.ed_cat i.year, fe vce(robust)
                          xtscc GINI c.NAFTA_dummy c.NAFTA_dummy#i.ed_ca i.year, fe lag(2)

                          Comment


                          • #14
                            And potentially an even bigger problem. I wonder if your NAFTA_dummy changes only across time. I was assuming you had selecting some control industries that would not be affected by NAFTA and treated industries that would be affected. But the fact that the 2010 dummy is dropping out makes me think NAFTA_dummy goes from zero to one for all industries. Is that true?

                            Comment


                            • #15
                              Indeed, this is true that NAFTA goes from 0 to 1 for all industries (as all industries experienced NAFTA at the same time). My only concern now is that I cannot see how NAFTA affected income inequality within different industries. I cannot see the fixed effect of each industry, like I can for the years. Would it be possible to also incorporate this ? Just to make sure i have the correct understanding of my interaction term coefficients, they are both relative to when educational level is equal to 2 (so 2 is the reference category). In addition, just to confirm, ed_cat is the same over time.
                              Thank you very much for your help!

                              Comment

                              Working...
                              X