Announcement

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

  • #16
    I am sorry. I am not familiar with reghdf, could you please explain why is the easiest way to do fixed-effect. apparently, it is not short cut by comparing these two codes with each other.
    It is the easiest way to do fixed-effects regression when there are multiple fixed effects.

    In your situation, here's what you gain.

    With
    Code:
    reghdfe mig_jump immi_sh `control' if year>=1996 , absorb(id index index#per) cluster (dep)
    you will get output showing you the coefficients, standard errors, confidence intervals, and test statistics for immi_sh and all of the `control' variables. That is what you are interested in actually seeing. (Well, maybe you don't really need to see the results for the `control' variables.)

    But with to do it with -xtreg, fe- you need to code it as
    Code:
    xtset id
    xtreg mig_jump immi_sh `control' i.index i.index#per if year>=1996 , fe cluster (dep)
    This will give you the same results for immi_sh and the `control' variables. But it will also spit out results for all but one of the index levels, and then another series of output lines with the index levels # per. That's 236 (= 2*(119-1)) lines of output cluttering up your screen and log files but providing no useful information.

    That's why -reghdfe- is more convenient for this.

    Comment


    • #17
      Prof, in this model, the terms Fi s,T and Fi r,T are, respectively, sector-by-period and region-by-period fixed effects at a frequency of T years where T=2. How should I exactly make T=2, Do you have any ideas? Thank you.

      Comment


      • #18
        I'm confused. I was under the impression that the variable per takes on two, and only two values, so it is something like a pre-post variable. Perhaps I misunderstood. Now you say that T has a frequency of 2 years. So do you mean that you want to have the variable per define two-year intervals like 2010-11, 2012-13, 2013-14, etc. If that's what you want, and assuming you have a variable called year, then you would define the variable per with
        Code:
        gen byte per = floor((year-2010)/2)
        If you do that, you will get a correspondence of per = 0 <=> year = 2010, 2011; per = 1 <=> year = 2012, 2013; per = 2 <=> year = 2014, 2015, etc. Is that what you are looking for?

        Comment


        • #19
          Originally posted by Clyde Schechter View Post
          So do you mean that you want to have the variable per define two-year intervals like 2010-11, 2012-13, 2013-14, etc.
          Exactly, but only for Fi s,T and Fi r, T for the rest variables t=2010-2021 one year.
          Two-year period fixed effects imply that we have a dummy variable for a given region (sector) every two years.
          As one period lasts two years, those fixed effects fully absorb changes in the labor market legislation that evolve slowly over time.
          Of course, I am going to take three and five-year period dimensions for the fixed effects as well.
          then I can say:
          Code:
          g byte per= floor((year-2010)/3)
          g byte per= floor((year-2010)/5)
          Last edited by Paris Rira; 28 Jan 2023, 16:33.

          Comment


          • #20
            Prof, I tried to prepare the data (hopefully correctly).

            Here are the regression only for one year.

            Code:
            * Example generated by -dataex-. For more info, type help dataex
            clear
            input double year float(n_imm immi_sh) double firm_age float(foreign_aff head sector region) double NPC_FIC byte dummy_I
            2010  6 .023003105 151 0 1  3 1 500979142 0
            2010  0 .023003105  37 1 1  7 1 500979162 0
            2010  0 .023003105  37 0 0  3 1 500979168 0
            2010  0 .023003105  74 1 0  3 1 500979172 0
            2010  1  .14340276  86 1 0  3 3 500979182 0
            2010  0 .023003105  38 1 1  7 1 500979184 0
            2010  3  .14340276  85 1 0  7 3 500979206 0
            2010  0 .023003105  70 1 1  7 1 500979220 0
            2010  1 .023003105  37 1 1  3 1 500979239 0
            2010  0  .05160134  67 1 1  3 2 500979255 0
            2010  0   .2548563  66 1 1  3 4 500979261 0
            2010  0 .023003105  44 1 1  3 1 500979266 0
            2010  0  .05160134  45 1 1  3 2 500979269 0
            2010  0 .023003105  71 1 1  7 1 500979271 0
            2010  0 .023003105  45 1 1  3 1 500979383 0
            2010  0 .023003105  48 1 1  3 1 500979456 0
            2010  4  .05160134  81 1 1  3 2 500979474 0
            2010  2 .023003105  40 1 1  7 1 500979489 0
            2010  1 .023003105  92 1 1  3 1 500979491 0
            2010  1 .023003105  53 1 1  3 1 500979522 0
            2010  1  .05160134  56 1 1  3 2 500979526 0
            2010  2  .06698633  53 1 1  3 5 500979530 0
            2010  0  .06698633  55 1 1  3 5 500979532 0
            2010  1  .05160134  56 1 1  3 2 500979537 0
            2010  0  .06698633  48 1 1  3 5 500979543 0
            2010  0  .05160134  47 1 1  3 2 500979551 0
            2010  0 .023003105  48 1 1  3 1 500979561 0
            2010  0  .05160134  59 1 1  3 2 500979563 0
            2010  0 .023003105  51 1 1  3 1 500979564 0
            2010  0  .14340276  55 1 1  3 3 500979566 0
            2010  0 .023003105  52 1 1  3 1 500979567 0
            2010  7  .05160134  54 1 1  3 2 500979569 0
            2010  0  .05160134  68 1 1  3 2 500979596 0
            2010  0  .14340276  49 1 1  7 3 500979634 0
            2010  0 .023003105  53 0 0  7 1 500979705 0
            2010  8 .023003105  69 1 0  3 1 500979725 0
            2010  0  .14340276  80 1 1  7 3 500979737 0
            2010  0  .05160134  32 1 1  3 2 500979740 0
            2010  0  .05160134  52 1 1  3 2 500979750 0
            2010  0  .05160134  56 1 1  3 2 500979758 0
            2010  6 .023003105  40 1 1  3 1 500979797 0
            2010  0 .023003105  40 1 1  7 1 500979809 0
            2010  0  .05160134  50 1 1  7 2 500979820 0
            2010  0  .05160134  47 1 1  3 2 500979825 0
            2010  0  .14340276  44 1 1  7 3 500979874 0
            2010  0  .14340276  50 1 1  3 3 500979890 0
            2010  0  .14340276  61 0 1  7 3 500979959 0
            2010 17  .14340276  39 1 1  9 3 500979964 0
            2010  1  .14340276  55 1 0  7 3 500979983 0
            2010  4 .023003105  51 1 1  3 1 500979987 0
            2010 29  .14340276  69 1 0  6 3 500980019 0
            2010  0 .023003105  35 1 1  3 1 500980048 0
            2010  0 .023003105  42 1 1  3 1 500980053 0
            2010  0 .023003105  39 1 1  7 1 500980104 0
            2010  1  .14340276  55 1 1  7 3 500980110 0
            2010  1 .023003105  82 0 1  7 1 500980138 0
            2010  0 .023003105  36 1 1  3 1 500980167 0
            2010  1  .05160134  38 1 1  3 2 500980175 0
            2010  9 .023003105  52 1 1  6 1 500980231 0
            2010  0 .023003105  49 1 0  3 1 500980233 0
            2010  0  .05160134  47 1 1  3 2 500980243 0
            2010  0 .023003105  42 1 1  7 1 500980247 0
            2010  0  .14340276  39 1 1  3 3 500980265 0
            2010  0  .05160134  47 1 1  3 2 500980319 0
            2010  0 .023003105  39 1 1  7 1 500980385 0
            2010  0 .023003105  44 1 1  3 1 500980401 0
            2010  2  .14340276  39 1 1  3 3 500980402 0
            2010  0  .14340276  20 0 1  7 3 500980415 0
            2010  1 .023003105  47 0 1  7 1 500980421 0
            2010  0  .05160134  38 1 1  7 2 500980485 0
            2010  1 .023003105  76 1 1  7 1 500980507 0
            2010  0 .023003105  31 1 1  3 1 500980532 0
            2010  0  .06698633  45 1 1  3 5 500980598 0
            2010  0 .023003105  54 1 1  3 1 500980626 0
            2010  0 .023003105  40 1 0  6 1 500980638 0
            2010  3  .05160134  90 1 0  7 2 500980722 0
            2010  3  .05160134  51 1 0 11 2 500980854 0
            2010  1 .023003105  61 1 0  7 1 500980855 0
            2010  1  .05160134  57 1 1  7 2 500980873 0
            2010  0 .023003105  66 1 1  8 1 500980898 0
            2010  0  .14340276  38 1 1  7 3 500980903 0
            2010  0  .05160134  39 1 1  3 2 500980907 0
            2010  3  .14340276  39 1 1  3 3 500980935 0
            2010 14  .05160134  37 1 1  3 2 500980936 0
            2010  7  .05160134  36 1 0  3 2 500980938 0
            2010  1  .14340276  62 0 1  7 3 500980947 0
            2010  0  .05160134  64 1 1  3 2 500980992 0
            2010  0  .14340276  42 1 0  7 3 500981007 0
            2010  0  .05160134 106 1 1  3 2 500981020 0
            2010  0 .023003105 101 1 1  3 1 500981066 0
            2010  0  .14340276  57 0 1  7 3 500981084 0
            2010  0 .023003105  42 1 1  3 1 500981094 0
            2010 15  .05160134  37 0 1  2 2 500981140 0
            2010  1  .14340276  39 0 0  3 3 500981156 0
            2010  0 .023003105  47 1 0  7 1 500981164 0
            2010  0  .14340276  38 1 1  8 3 500981265 0
            2010  0 .023003105  40 1 1  7 1 500981281 0
            2010  1 .023003105  41 1 0  7 1 500981292 0
            2010  1  .14340276  47 1 0  7 3 500981317 0
            2010  3 .023003105  56 1 1  7 1 500981318 0
            2010  5 .023003105  40 1 1  3 1 500981327 0
            2010  0  .14340276  46 1 1  3 3 500981338 0
            2010  0  .14340276  38 1 1  7 3 500981342 0
            2010  0  .14340276  72 1 1  7 3 500981385 1
            2010  0 .023003105  36 1 1  3 1 500981392 0
            2010  5  .14340276  44 1 1  8 3 500981401 0
            2010  0 .023003105  45 0 1  3 1 500981403 0
            2010  0  .06698633  44 1 1  3 5 500981408 0
            2010 29  .14340276  71 1 0  9 3 500981447 0
            2010  2 .023003105  44 1 1  3 1 500981482 0
            2010  0 .023003105  41 1 1  3 1 500981526 0
            2010  0 .023003105  27 1 1  7 1 500981546 0
            2010  0  .05160134  52 1 1  3 2 500981571 0
            2010  0 .023003105  41 1 1  7 1 500981576 0
            2010  2  .05160134  36 1 0  3 2 500981681 0
            2010  5 .023003105  40 1 1  3 1 500981706 0
            2010  1  .05160134  83 1 1  3 2 500981725 0
            2010  0  .05160134  69 1 1  3 2 500981726 0
            2010  5  .14340276  44 0 1  3 3 500981741 0
            2010  0  .05160134  45 1 1  3 2 500981755 0
            2010  3  .14340276  45 1 1 10 3 500981789 0
            2010  0  .05160134  77 1 1  7 2 500981793 0
            2010  0  .14340276  37 1 0  7 3 500981795 0
            2010  0  .05160134  39 1 1  3 2 500981826 0
            2010  0  .05160134  40 1 1  3 2 500981833 0
            2010  0  .05160134  53 0 1  3 2 500981840 0
            2010 14  .05160134  45 1 1  3 2 500981883 0
            2010  0  .05160134  39 1 1  3 2 500981884 0
            2010  0 .023003105  46 1 1  3 1 500981885 0
            2010 11 .023003105  46 0 0  3 1 500981899 0
            2010  0  .05160134  48 1 1  3 2 500981917 0
            2010  1  .14340276  40 1 1 10 3 500981918 0
            2010 19  .14340276  68 1 1  3 3 500981919 0
            2010  2  .14340276  16 1 1  7 3 500981936 0
            2010  4  .14340276  48 1 1 12 3 500981950 0
            2010  1 .023003105  40 1 0  3 1 500981996 0
            2010 24  .14340276  41 1 1  3 3 500982017 0
            2010  1 .023003105  55 0 1  3 1 500982019 0
            2010  3 .023003105  92 1 0  3 1 500982040 0
            2010  2  .14340276  65 1 0  6 3 500982044 0
            2010 11  .05160134  43 1 1  3 2 500982045 0
            2010  0  .06698633  63 1 1  1 5 500982051 0
            2010  0 .023003105 254 1 0  1 1 500982066 0
            2010  2 .023003105  92 1 1  3 1 500982070 0
            2010  0 .023003105 105 0 1  7 1 500982073 0
            2010  0  .14340276  97 0 1  7 3 500982086 0
            2010  6  .14340276  51 0 1  6 3 500982100 0
            2010  0  .14340276  38 1 1  7 3 500982103 0
            2010  0  .14340276  46 1 1  7 3 500982106 0
            2010 10 .023003105  51 1 1  6 1 500982115 0
            2010  0 .023003105  38 1 1  3 1 500982117 0
            2010  0 .023003105  45 1 0  3 1 500982123 0
            2010  0  .05160134  37 1 1  3 2 500982133 0
            2010  6 .023003105  38 1 1  3 1 500982164 0
            2010  3   .2548563  60 1 1  3 4 500982177 0
            2010  3  .14340276  38 0 1  6 3 500982202 0
            2010  4  .14340276  54 0 1  3 3 500982210 0
            2010 10 .023003105  37 1 1  6 1 500982214 0
            2010  5 .023003105  64 1 1  6 1 500982265 0
            2010  0  .14340276  40 1 1 12 3 500982268 0
            2010  0  .14340276  46 0 1  3 3 500982281 0
            2010  2  .14340276  46 1 0  7 3 500982283 0
            2010  3  .14340276  41 1 1 10 3 500982292 0
            2010 17  .05160134  41 1 1  7 2 500982320 0
            2010  0  .05160134  44 1 0  7 2 500982329 0
            2010  1  .14340276  58 1 0  7 3 500982354 0
            2010  1  .14340276  52 1 1  3 3 500982355 0
            2010  2  .14340276  17 0 1  7 3 500982373 0
            2010  1  .14340276  41 1 1  6 3 500982385 0
            2010 17  .05160134  41 1 1  3 2 500982393 0
            2010  1  .14340276  41 1 1  7 3 500982395 0
            2010  2 .023003105  84 1 1  3 1 500982405 0
            2010  0   .2548563  38 1 0  7 4 500982424 0
            2010  2  .05160134  48 1 1  3 2 500982430 0
            2010 72  .14340276  18 1 0  8 3 500982432 0
            2010  0  .05160134   3 1 1  7 2 500982454 0
            2010  1  .14340276  71 1 0  7 3 500982462 0
            2010  0 .023003105  46 1 1  7 1 500982463 0
            2010  0 .023003105  69 1 1  3 1 500982477 0
            2010  0 .023003105  68 1 1  3 1 500982504 0
            2010  4 .023003105  43 1 0  3 1 500982506 0
            2010  0  .14340276  74 0 1  7 3 500982528 0
            2010  0 .023003105  37 1 1  3 1 500982571 0
            2010  0 .023003105  46 1 1  3 1 500982601 0
            2010  0  .14340276  41 1 0  7 3 500982608 0
            2010  1 .023003105  37 1 1  3 1 500982654 0
            2010  3  .14340276  42 0 1  3 3 500982711 0
            2010  0  .14340276  69 1 1  7 3 500982718 0
            2010  0 .023003105  43 1 1  3 1 500982748 0
            2010  0  .14340276  39 1 1  7 3 500982755 0
            2010 10  .14340276  20 1 0  1 3 500982799 0
            2010  0  .14340276  62 1 1  7 3 500982809 1
            2010  1 .023003105  55 1 1  3 1 500982824 0
            2010  2 .023003105  64 0 1  3 1 500982843 0
            2010  0 .023003105  37 1 1  3 1 500982895 0
            2010 60  .14340276  54 1 1  6 3 500982915 0
            2010  0 .023003105  58 1 1  7 1 500982925 0
            2010 11  .14340276  55 1 1  3 3 500982968 0
            2010  0  .05160134  40 1 1  3 2 500982971 0
            2010  8   .2548563  51 1 1  6 4 500982974 0
            end
            
            
            
            . reg   n_imm  immi_sh  `control'  i.sector i.region
            note: 7.region omitted because of collinearity.
            
                  Source |       SS           df       MS      Number of obs   =     6,948
            -------------+----------------------------------   F(22, 6925)     =     14.29
                   Model |  165442.477        22  7520.11259   Prob > F        =    0.0000
                Residual |  3643903.44     6,925  526.195443   R-squared       =    0.0434
            -------------+----------------------------------   Adj R-squared   =    0.0404
                   Total |  3809345.92     6,947  548.344021   Root MSE        =    22.939
            
            ------------------------------------------------------------------------------
                   n_imm | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
            -------------+----------------------------------------------------------------
                 immi_sh |  -114.9403   90.47272    -1.27   0.204    -292.2946    62.41395
                         |
                  sector |
                      2  |  -2.942764   4.184636    -0.70   0.482    -11.14593    5.260405
                      3  |  -2.717735   2.224021    -1.22   0.222    -7.077497    1.642027
                      4  |  -5.274405   5.581828    -0.94   0.345     -16.2165     5.66769
                      5  |   4.818247   3.934923     1.22   0.221    -2.895409     12.5319
                      6  |   .7214588   2.609438     0.28   0.782     -4.39384    5.836758
                      7  |  -3.507378   2.227571    -1.57   0.115    -7.874101    .8593444
                      8  |   .6414042   3.042239     0.21   0.833    -5.322317    6.605125
                      9  |   19.53643   3.254327     6.00   0.000     13.15695    25.91591
                     10  |  -4.850148    2.69965    -1.80   0.072    -10.14229    .4419939
                     11  |    -2.8259    4.34932    -0.65   0.516     -11.3519    5.700101
                     12  |  -4.624622   2.604331    -1.78   0.076    -9.729909    .4806642
                     13  |   24.87907    3.20178     7.77   0.000      18.6026    31.15554
                     14  |  -.5602637   4.558222    -0.12   0.902    -9.495777    8.375249
                     15  |  -3.061372   4.200087    -0.73   0.466    -11.29483    5.172087
                     16  |   .7729104    3.81564     0.20   0.839    -6.706914    8.252735
                     17  |  -4.095699   3.821091    -1.07   0.284    -11.58621    3.394811
                         |
                  region |
                      2  |   3.733277   2.583226     1.45   0.148    -1.330638    8.797192
                      3  |   18.35789   10.78315     1.70   0.089    -2.780386    39.49618
                      4  |     28.989   20.91026     1.39   0.166    -12.00151    69.97952
                      5  |   6.013237   4.089548     1.47   0.142     -2.00353       14.03
                      6  |  -1.783736   3.353474    -0.53   0.595    -8.357574    4.790102
                      7  |          0  (omitted)
                         |
                   _cons |   6.412715   3.116418     2.06   0.040     .3035797    12.52185
            ------------------------------------------------------------------------------
            
            .
            end of do-file
            
            . do "C:\Users\35193\AppData\Local\Temp\STD2bec_000000.tmp"
            
            . reghdfe  n_imm  immi_sh `control', absorb(NPC_FIC i.region i.sector i.region#i.year i.sector#i.year )
            insufficient observations
            Could you please have a look at the result to see why it says "insufficient observations"? Thank you so much.
            Last edited by Paris Rira; 02 Feb 2023, 15:34.

            Comment


            • #21
              When you absorb (i.e. include fixed effects for) all of the variables NPC_FIC i.region i.sector i.region#i.year i.sector#i.year, you have specified so many segments of the data that each one contains only a single observation. That is, in your data, each combination of NPC_FIC, region, sector, and year is found in only one observation.

              Actually, within your example data, even just NPC_FIC by itself identifies single observations. Perhaps in your full data set that is not true, but I suspect that the combination of NPC_FIC, region, sector, region#year and sector# year does. -regress- doesn't care about single observations, but -reghdfe-, which is a fixed estimator, definitely does.

              Because -reghdfe- is a fixed effects estimator, singleton observations are uninformative, and are dropped. Since everything was a singleton, everything was dropped, and you were left with no data.
              Last edited by Clyde Schechter; 02 Feb 2023, 15:47.

              Comment


              • #22
                So, by adding up 10 years more data, it will be solved?

                Comment


                • #23
                  Well, I can't say for sure because I haven't seen your full data set. If the full data set contains only year 2010, then, yes, adding more years will probably solve the problem. But if you already have multiple years, then, no, just having more of them won't solve the problem. You will have to remove some of the fixed effects, in particular the region#year and sector#year ones.

                  Comment


                  • #24
                    Originally posted by Clyde Schechter View Post
                    That is, in your data, each combination of NPC_FIC, region, sector, and year is found in only one observation.

                    .
                    It is supposed to be so. In the sample, every firm belongs to one specific sector and region (none of them move or changes sector).

                    Comment


                    • #25
                      Your response in #24 does not answer what you quoted. It is fine for each firm to belong to one specific sector and region, never moving or changing sector. What is not OK is if region, sector and year combination contains only one firm. I believe that something like that is happening in your data.

                      Comment


                      • #26
                        I should also note that if companies never change sector or region in your data, then you cannot include region and sector fixed effects in addition to company fixed effects. And you should not try to do that with -reghdfe- as it does not tolerate it. I am actually a bit surprised that you ended up with the error message you got, because usually in this situation the error message is much more obscure, "assertion is false". Anyway, it's ok to have company, region#year, and sector#year. But do not add in region and sector themselves.
                        Last edited by Clyde Schechter; 02 Feb 2023, 17:58.

                        Comment


                        • #27
                          Originally posted by Clyde Schechter View Post
                          Your response in #24 does not answer what you quoted. It is fine for each firm to belong to one specific sector and region, never moving or changing sector. What is not OK is if region, sector and year combination contains only one firm.
                          Code:
                          * Example generated by -dataex-. For more info, type help dataex
                          clear
                          input double NPC_FIC float(region sector)
                          501692616 1 1
                          501166499 1 1
                          501207969 1 1
                          501161386 1 1
                          501665620 1 1
                          501676150 1 1
                          501037705 1 1
                          502484267 1 1
                          501252152 1 1
                          501692810 1 1
                          501997964 1 1
                          501618605 1 1
                          500987509 1 1
                          501666891 1 1
                          501153846 1 1
                          501330298 1 1
                          501098023 1 1
                          501662488 1 1
                          501108179 1 1
                          501997637 1 1
                          500982066 1 1
                          501665828 1 1
                          501659150 1 1
                          501055159 1 1
                          500994820 1 2
                          501086941 1 2
                          500991714 1 2
                          501135044 1 2
                          501035823 1 2
                          501132663 1 2
                          501118003 1 2
                          501032056 1 2
                          500984614 1 2
                          501138629 1 2
                          500988265 1 2
                          500992004 1 2
                          501042544 1 2
                          501083497 1 2
                          501036829 1 2
                          501056726 1 2
                          501011061 1 3
                          501154860 1 3
                          501035076 1 3
                          501594188 1 3
                          501168984 1 3
                          500981392 1 3
                          501070529 1 3
                          501024576 1 3
                          501076400 1 3
                          501078817 1 3
                          501159337 1 3
                          501051131 1 3
                          501123727 1 3
                          501012758 1 3
                          501218442 1 3
                          501347861 1 3
                          501175509 1 3
                          501217824 1 3
                          500995697 1 3
                          501014633 1 3
                          501320036 1 3
                          501190055 1 3
                          500984650 1 3
                          501009534 1 3
                          501129590 1 3
                          500986037 1 3
                          501163805 1 3
                          501198237 1 3
                          501325379 1 3
                          501023675 1 3
                          501037557 1 3
                          501019117 1 3
                          501110904 1 3
                          501071440 1 3
                          500983153 1 3
                          501067669 1 3
                          500991790 1 3
                          501321915 1 3
                          501169579 1 3
                          500989813 1 3
                          501034489 1 3
                          501594482 1 3
                          501112597 1 3
                          501010706 1 3
                          501255800 1 3
                          501143165 1 3
                          500994592 1 3
                          501082071 1 3
                          500984962 1 3
                          501365364 1 3
                          501093909 1 3
                          500985046 1 3
                          501113509 1 3
                          500981706 1 3
                          501023715 1 3
                          501823860 1 3
                          501193932 1 3
                          501156900 1 3
                          501094716 1 3
                          501280120 1 3
                          end
                          Actually, there are a bunch of firms in each region and sector.

                          Comment


                          • #28
                            Originally posted by Clyde Schechter View Post
                            it's ok to have company, region#year, and sector#year. But do not add in region and sector themselves.
                            Is that true in only in the case of reghdfe? or I should consider that in reg as well?

                            Comment


                            • #29
                              In #20, your -reg- command does not include indicators for firm, only region and sector. So that is OK. But if you do include a firm indicator with -reg-, then Stata will drop the region and sector variables because they would be colinear with the firm variable.

                              The general principal is that you can never include, in the same regression, fixed effects for both X and Y if Y does not vary among observations having the same value of X. This is true for all regression commands. And, to be clear, a fixed effect for a variable V is "included" if it is listed among the predictors (i.V), or is the panel variable in an -xtset- command and you are running an -xt- command with the -fe- option, or is listed in the -absorb()- option of a command that has such an option. Those are all just different ways of including a fixed effect, but they all have the same result.

                              Comment


                              • #30
                                Originally posted by Clyde Schechter View Post
                                In #20, your -reg- command does not include indicators for firm, only region and sector. So that is OK. But if you do include a firm indicator with -reg-, .
                                I am afraid I did not quite catch " firm indicator" could you please write it to?
                                I guess I did not add it neither in -reg- nor in -reghdfe-

                                Comment

                                Working...
                                X