Announcement

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

  • pweights in reghdfe allow colinear variable to generate a coefficient?


    Hi,

    This is my first post here. This question pertains to the use of pweight in reghdfe. I have a variable that is colinear with the fixed effects (see the output of the first regression. But when I add in the probability weights, reghdfe does manage do output a coefficient (see second regression output below). I was hoping someone could point me to some resources/an explanation to help me understand why this is happening.

    Thank you,

    Claire
    Click image for larger version

Name:	Picture2.jpg
Views:	1
Size:	110.0 KB
ID:	1671510
    Attached Files

  • #2
    reghdfe is from SSC (FAQ Advice #12). The estimation samples across the 2 regressions slightly differ. Try

    Code:
    reghdfe approve covratehat [pw=weight_cumulative], absorb(`fe4') vce(cluster statecty)
    reghdfe approve covratehat if e(sample), absorb(`fe4') vce(cluster statecty)
    and see whether the difference in observations explains it.

    Comment


    • #3
      Thanks for your response Andrew. Restricting it to the same sample does not change the inconsistency. Conceptually the covratehat variable should, by construction, be colinear with the statecty_cd_yr fixed effect, for all samples and subsamples, so I am struggling to understand how reghdfe is generating a coefficient when the pweights are added.

      Thanks,
      Claire
      Click image for larger version

Name:	Picture4.jpg
Views:	1
Size:	83.8 KB
ID:	1671594

      Comment


      • #4
        What you observe is not generally reproducible. Consider:

        Code:
        webuse grunfeld, clear
        gen covar= company*0.25 +0.005
        reghdfe invest covar, absorb(company)
        reghdfe invest covar [pw=mvalue], absorb(company)
        Res.:

        Code:
        . reghdfe invest covar, absorb(company)
        note: covar is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
        (MWFE estimator converged in 1 iterations)
        note: covar omitted because of collinearity
        
        HDFE Linear regression                            Number of obs   =        200
        Absorbing 1 HDFE group                            F(   0,    190) =          .
                                                          Prob > F        =          .
                                                          R-squared       =     0.7602
                                                          Adj R-squared   =     0.7489
                                                          Within R-sq.    =     0.0000
                                                          Root MSE        =   108.6848
        
        ------------------------------------------------------------------------------
              invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               covar |          0  (omitted)
               _cons |   145.9583   7.685174    18.99   0.000      130.799    161.1175
        ------------------------------------------------------------------------------
        
        Absorbed degrees of freedom:
        -----------------------------------------------------+
         Absorbed FE | Categories  - Redundant  = Num. Coefs |
        -------------+---------------------------------------|
             company |        10           0          10     |
        -----------------------------------------------------+
        
        .
        . reghdfe invest covar [pw=mvalue], absorb(company)
        note: covar is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
        (MWFE estimator converged in 1 iterations)
        note: covar omitted because of collinearity
        
        HDFE Linear regression                            Number of obs   =        200
        Absorbing 1 HDFE group                            F(   0,    190) =          .
                                                          Prob > F        =          .
                                                          R-squared       =     0.5872
                                                          Adj R-squared   =     0.5677
                                                          Within R-sq.    =     0.0000
                                                          Root MSE        =   222.2123
        
        ------------------------------------------------------------------------------
                     |               Robust
              invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               covar |          0  (omitted)
               _cons |   370.6729   34.08355    10.88   0.000     303.4421    437.9036
        ------------------------------------------------------------------------------
        
        Absorbed degrees of freedom:
        -----------------------------------------------------+
         Absorbed FE | Categories  - Redundant  = Num. Coefs |
        -------------+---------------------------------------|
             company |        10           0          10     |
        -----------------------------------------------------+
        
        .
        Here are some ideas to push this forward:

        1. Update reghdfe so that we are sure that it is not a bug in an older version that was subsequently corrected.

        Code:
        ssc install reghdfe, replace
        2. If you have the latest version, check whether the issue is reproducible in the older version, specifying the -old- option. In this case, you are checking whether the issue was due to the latest upgrade.

        Code:
        reghdfe approve covratehat [pw=weight_cumulative], absorb(`fe4') vce(cluster statecty) old
        3. You can run the same estimation with one of the fixed effects absorbed using the official regress command. Check whether regress replicates the issue.


        Code:
        regress approve covratehat [pw=weight_cumulative], absorb(statecty) cluster(statecty)
        For an illustration of the above:

        Code:
        webuse grunfeld, clear
        gen covar= company*0.25 +0.005
        regress invest covar [pw=mvalue], absorb(company)
        Res.:

        Code:
        regress invest covar [pw=mvalue], absorb(company)
        (sum of wgt is 216,336.22038269)
        note: covar omitted because of collinearity
        
        Linear regression, absorbing indicators         Number of obs     =        200
                                                        F(0, 190)         =       0.00
                                                        Prob > F          =          .
                                                        R-squared         =     0.5872
                                                        Adj R-squared     =     0.5677
                                                        Root MSE          =     222.21
        
        ------------------------------------------------------------------------------
                     |               Robust
              invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               covar |          0  (omitted)
               _cons |   370.6729   34.08355    10.88   0.000     303.4421    437.9036
        ------------------------------------------------------------------------------
        
        .
        4. If you make no progress with 1-3 and are able to share your dataset, you can email it to me and I will investigate further.
        Last edited by Andrew Musau; 30 Jun 2022, 12:02.

        Comment

        Working...
        X