Announcement

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

  • #31
    Originally posted by Jeff Wooldridge View Post
    The averages are computed by firm, not sector.
    Prof,
    Code:
    bysort sector: egen mean__immi_sh = mean(immi_sh)
    is not sector level?

    Comment


    • #32
      Code:
      bysort id: egen mean__immi_sh = mean(immi_sh)
      bysort id: egen mean__share_9 = mean( share_9)
      bysort id: egen mean__share_12= mean(share_uni)
      bysort id: egen mean__share_uni = mean(logsize)
      bysort id: egen mean__logsize = mean(lavg_firm_age)
      bysort id: egen mean__lavg_firm_age= mean(lavg_firm_age)
      bysort id: egen mean__lage  = mean(lage)
      bysort id: egen  mean__year = mean(year)
      
      .qui xtreg ln_labor_productivity immi_sh share_9 share_12 share_uni  logsize lavg_firm_age lage i.year i.region i.sector mean__immi_sh mean__share_9  mean__share_12 mean__share_uni  mean__logsize    mean__lavg_firm_age mean__lage mean__year, vce(cluster sector)
      
      estimates store mundlak
      
      test mean__immi_sh mean__share_9  mean__share_12 mean__share_uni  mean__logsize mean__lavg_firm_age mean__lage mean__year
      
       ( 1)  mean__immi_sh = 0
       ( 2)  mean__share_9 = 0
       ( 3)  mean__share_12 = 0
       ( 4)  mean__share_uni = 0
       ( 5)  mean__logsize = 0
       ( 6)  o.mean__lavg_firm_age = 0
       ( 7)  mean__lage = 0
       ( 8)  mean__year = 0
             Constraint 6 dropped
      
                 chi2(  7) = 5036.31
               Prob > chi2 =    0.0000
      Also with the interaction term:
      Code:
      
      . qui xtreg ln_labor_productivity immi_sh share_9 share_12 share_uni  logsize lavg_firm_age lage i.year i.region i.sector i.sector#i.re
      > gion mean__immi_sh mean__share_9  mean__share_12 mean__share_uni  mean__logsize    mean__lavg_firm_age mean__lage mean__year, vce(clu
      > ster sector)
      
      . estimates store mundlak
      
      . test mean__immi_sh mean__share_9  mean__share_12 mean__share_uni  mean__logsize mean__lavg_firm_age mean__lage mean__year
      
       ( 1)  mean__immi_sh = 0
       ( 2)  mean__share_9 = 0
       ( 3)  mean__share_12 = 0
       ( 4)  mean__share_uni = 0
       ( 5)  mean__logsize = 0
       ( 6)  o.mean__lavg_firm_age = 0
       ( 7)  mean__lage = 0
       ( 8)  mean__year = 0
             Constraint 6 dropped
      
                 chi2(  7) = 6155.39
               Prob > chi2 =    0.0000
      
      . 
      end of do-file
      Prof, Now the model is implemented properly, right?

      Comment


      • #33
        Are firms repeated in the sample? I don't think you've listed results where you have firms as a fixed effects. The "id" variable you used earlier was observations, not firms (unless there's no firm repetition, since id cluster is same number as observations).

        Comment


        • #34
          Originally posted by George Ford View Post
          The "id" variable you used earlier was observations, not firms (unless there's no firm repetition, since id cluster is same number as observations).
          Prof,
          Code:
          egen id = group(NPC_FIC)
          where NPC_FIC is firmID.

          I don't think you've listed results where you have firms as a fixed effects. No I have not. I just wanna check if sector fixed is suffiecnt or not based on mundlak

          Comment


          • #35
            Is the data a panel in NPC_FIC?

            Comment


            • #36
              yes, thats correct.

              Comment


              • #37
                Here are the result when I used firm (id) as firm fixed effect. I can't use factor variables so I went to c. var.
                Code:
                . qui xtreg ln_labor_productivity immi_sh share_9 share_12 share_uni  logsize lavg_firm_age lage i.id i.year i.region i.sector  mean__i
                > mmi_sh mean__share_9  mean__share_12 mean__share_uni  mean__logsize    mean__lavg_firm_age mean__lage mean__year, vce(cluster sector)
                maxvar too small
                    You have attempted to use an interaction with too many levels or attempted to fit a model with too many variables.  You need to
                    increase maxvar; it is currently 20000.  Use set maxvar; see help maxvar.
                
                    If you are using factor variables and included an interaction that has lots of missing cells, try set emptycells drop to reduce
                    the required matrix size; see help set emptycells.
                
                    If you are using factor variables, you might have accidentally treated a continuous variable as a categorical, resulting in lots
                    of categories.  Use the c. operator on such variables.
                r(907);
                
                end of do-file
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                
                . qui xtreg ln_labor_productivity immi_sh share_9 share_12 share_uni  logsize lavg_firm_age lage c.id c.year c.region mean__immi_sh mea
                > n__share_9  mean__share_12 mean__share_uni  mean__logsize    mean__lavg_firm_age mean__lage mean__year, vce(cluster sector)
                . estimates store mundlak
                
                . test mean__immi_sh mean__share_9  mean__share_12 mean__share_uni  mean__logsize mean__lavg_firm_age mean__lage mean__year
                
                 ( 1)  mean__immi_sh = 0
                 ( 2)  mean__share_9 = 0
                 ( 3)  mean__share_12 = 0
                 ( 4)  mean__share_uni = 0
                 ( 5)  mean__logsize = 0
                 ( 6)  o.mean__lavg_firm_age = 0
                 ( 7)  mean__lage = 0
                 ( 8)  mean__year = 0
                       Constraint 6 dropped
                
                           chi2(  7) = 1330.36
                         Prob > chi2 =    0.0000
                .
                Please comment to make a conclusion of this thread. gratitude.

                Comment


                • #38
                  Dear Prof @Jeff Wooldridge
                  I just ran the test to see if sector-fixed effect is sufficient and I could drop firm-fixed effects. The test yields a p-value of 0.00.
                  My supervisor asked me why I don't follow the base model which uses firm-fixed effects while the model is ols-fixed so I must use firm-fixed effect. I really have no answers to these questions. The reason is that using firm-fixed effect does not give proper results (the coefficients are small and insignificant) so that's why I attempted to use a higher aggregation level as Papke and Wooldridge (2023), which is not convincable to my supervisor. Could you please assist me in this regard? I really need help. Thank you so much.

                  Comment


                  • #39
                    The "proper" results are the ones you get from a properly specified model. You are p-hacking. If you find nothing, then nothing is the answer.

                    Comment


                    • #40
                      Prof Ford,
                      As there is no variation in the sector variable or region within each firm, firms are distinctly characterized by a single sector and region so would capture unobserved factors. Consequently, including firm fixed effects, which are also time-invariant, is not feasible.
                      right? I can't include sector and firm fixed simultaneously, is not p-hacking.

                      Comment


                      • #41
                        "The reason is that using firm-fixed effect does not give proper results (the coefficients are small and insignificant) "

                        Comment


                        • #42
                          If it is the case, why Papke and Wooldridge (2023) estimated the district level VS the school level and proposed the higher aggregation level, instead of just trying to see if the coefficients are small and insignificant?There are other papers that have attempted to conclude that industry effects are as critical as firm effects for firm growth and performance (e.g. Chi, Liew, Hung, and Cheng, 2016; Zhang, Hult, Ketchen, and Calantone, 2020). Additionally, Malka and MacLennan (2021) proposed that using NCA found that " the dominance of industry effects in explaining variance in firm performance over the years under study". Could you please clarify it? Thanks .

                          Comment


                          • #43
                            PW (2016) propose a test for best aggregation level. Use that test.

                            As I understand it, it is a joint test of the Mundlak terms from a model including sector, region, year (and probably sector#region) fixed effects and with clustered errors.

                            Code:
                            bysort firm: egen mean__immi_sh = mean(immi_sh)
                            bysort firm: egen mean__share_9 = mean( share_9)
                            bysort firm: egen mean__share_12= mean(share_uni)
                            bysort firm: egen mean__share_uni = mean(logsize)
                            bysort firm: egen mean__logsize = mean(lavg_firm_age)
                            bysort firm: egen mean__lavg_firm_age= mean(lavg_firm_age)
                            bysort firm: egen mean__lage  = mean(lage)
                            bysort firm: egen mean__year = mean(year)
                            
                            reghdfe ln_labor_productivity immi_sh share_9 share_12 share_uni  logsize         ///
                                lavg_firm_age lage i.year mean__immi_sh mean__share_9              ///
                                mean__share_12 mean__share_uni  mean__logsize  mean__lavg_firm_age             ///
                                mean__lage mean__year, absorb(sector region sector#region)                     ///
                                cluster(sector)
                            
                            test mean__immi_sh mean__share_9  mean__share_12 mean__share_uni                  ///
                                mean__logsize mean__lavg_firm_age mean__lage mean__year
                            HTML Code:
                            https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4172353
                            PW do not recommend district level analysis (it would be data specific in any case) ("Therefore, the district-level FE analysis is rejected in favor of the school-level FE analysis.")
                            But they do make some arguments for the district level (not simply related to statistical significance), though I read it as saying that the results be presented alongside the school results.
                            Last edited by George Ford; 22 May 2024, 16:55.

                            Comment


                            • #44
                              I'm not certain the mean_year is correct. In Jeff's code, its defined differently (observations per year as a share of total observations by firm, but that's for an unbalanced panel). In a panel, that will all be the same. Maybe you can leave mean_year out in a balanced panel.

                              In his simulation, which is balanced, he does not include those terms (only the year fixed effects).
                              Last edited by George Ford; 22 May 2024, 16:52.

                              Comment


                              • #45
                                Code:
                                 reghdfe ln_labor_productivity immi_sh share_9 share_12 share_uni  logsize        ///    
                                avg_firm_age lage  mean__immi_sh mean__share_9                       ///    
                                mean__share_12 mean__share_uni  mean__logsize  mean__lavg_firm_age        ///
                                    mean__lage , absorb(sector region sector#region year)   cluster(sector)  
                                
                                test mean__immi_sh mean__share_9  mean__share_12 mean__share_uni         ///
                                    mean__logsize mean__lavg_firm_age mean__lage

                                Comment

                                Working...
                                X