Announcement

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

  • #31
    Sorry. I should have said to run -by prepost, sort: tab HID CUTOFF3 if e(sample)-. Your -tab- output is based on your full data set with millions of observations, whereas your estimation sample contains a mere 6,684. It is possible that within the estimation sample, which is restricted both by the -if- condition in your command, and by listwise deletion of any observation containing a missing value for any model variable, there is a 0 cell somewhere in that cross tabulation.

    But if that restricted cross tabulation shows no zero cells, that implies that HID#CUTOFF3 is somehow predictable from some other variable(s) in the model. The names of most of your model variables don't convey any meaning to me, so I'm not able to guess which are the most likely culprits. Try to think about the meanings of all your variables and see if any of them correspond to something that should only happen when HID and CUTOFF3 are both true (or, equally good, should never happen when HID and CUTOFF3 are both true.) If you can't come up with anything, you can always find it by brute force. Create a homebrew interaction variable: -gen ix_probe = HID*CUTOFF3-. Then regress ix_probe against all of the variable in your model other than HID#CUTOFF3. (To exclude HID#CUTOFF3, you will have to abandon the ## operator and replace that three way interaction with HID CUTOFF3 HID#postperiod CUTOFF3#postperiod and HID#CUTOFF3#postperiod.) The regression results will give you an R2 of 1.0 (or very nearly so) and the coefficients will tell you the linear combination that is causing the colinearity. Then you can decide how to remove something so that the model is properly identified when still including the HID#CUTOFF3 term. And, I hasten to add, this regression must also be carried out restricted to the estimation sample of the original analysis.

    Comment


    • #32
      Many thanks. I'll give this a try! I am dealing with a relatively small sample (and the post period for this particular diff in diff is a mere 2 months).

      Comment


      • #33
        [deleted]
        Last edited by Claire McKenna; 02 Dec 2022, 14:50.

        Comment


        • #34
          And this is what results if I regress ix_probe on all other variables (I think this is probably what you were suggesting originally):

          HTML Code:
          . gen ix_probe=hid*cutoff3
          (574,427 missing values generated)
          
          . logit ix_probe hid cutoff3 i.hid#i.postperiod i.cutoff3#i.postperiod i.hid#i.cutoff3#i.postperiod b3.age_group b1.race_wbho b4.edu4 i.woman##i.marstdum1##i.ownkidd_18 b1.ind_nilf b1.u
          > h_occmaj_b2 sampjl b1.durg ur_sa ur2_sa ur3_sa iur iur2 iur3 initrate initrate2 initrate3 empgrowth emp2 emp3 l_incrate_jhu stringd if sampall==1 & age>=18 & age<65
          
          note: hid != 1 predicts failure perfectly;
                hid omitted and 4558 obs not used.
          
          outcome = cutoff3 > 0 predicts data perfectly
          r(2000);

          Comment


          • #35
            Well, it isn't exactly what I meant: I intended for you to use -regress-, not -logit- on ix_probe.

            Added: Also, don't use -if sampall==1 & age>=18 & age<65- in the -regress ixprobe ...- analysis. Use -if e(sample)-. The difference arises because in your -logit- command you also have reference to a pweight variable. If that variable is missing or 0, the corresponding observation is not part of the estimation sample, but -if sampall==1 & age>=18 & age<65- will not exclude it.
            Last edited by Clyde Schechter; 02 Dec 2022, 14:50.

            Comment


            • #36
              [deleted]
              Last edited by Claire McKenna; 02 Dec 2022, 15:16.

              Comment


              • #37
                Is this right?

                HTML Code:
                . regress ix_probe i.hid i.cutoff3 i.hid#i.postperiod i.cutoff3#i.postperiod i.hid#i.cutoff3#i.postperiod b3.age_group b1.race_wbho b4.edu4 i.woman##i.marstdum1##i.ownkidd_18 b1.ind_nil
                > f b1.uh_occmaj_b2 sampjl b1.durg ur_sa ur2_sa ur3_sa iur iur2 iur3 initrate initrate2 initrate3 empgrowth emp2 emp3 l_incrate_jhu stringd if e(sample) [pw=wtfinl], vce(cluster statefi
                > p)
                (sum of wgt is 22,687,710.2323)
                note: 1.cutoff3#1.postperiod omitted because of collinearity.
                note: 11.uh_occmaj_b2 omitted because of collinearity.
                
                Linear regression                               Number of obs     =      6,684
                                                                F(3, 43)          =          .
                                                                Prob > F          =          .
                                                                R-squared         =     1.0000
                                                                Root MSE          =          0
                
                                                                                    (Std. err. adjusted for 44 clusters in statefip)
                --------------------------------------------------------------------------------------------------------------------
                                                                   |               Robust
                                                          ix_probe | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
                ---------------------------------------------------+----------------------------------------------------------------
                                                             1.hid |  -2.80e-14   1.28e-14    -2.18   0.035    -5.39e-14   -2.12e-15
                                                         1.cutoff3 |   6.83e-15   1.05e-14     0.65   0.518    -1.43e-14    2.80e-14
                                                                   |
                                                    hid#postperiod |
                                                              0 1  |  -1.25e-14   1.82e-14    -0.69   0.496    -4.92e-14    2.42e-14
                                                              1 1  |  -9.99e-17   2.52e-14    -0.00   0.997    -5.09e-14    5.07e-14
                                                                   |
                                                cutoff3#postperiod |
                                                              0 1  |   1.78e-14   1.81e-14     0.99   0.329    -1.86e-14    5.43e-14
                                                              1 1  |          0  (omitted)
                                                                   |
                                            hid#cutoff3#postperiod |
                                                            1 1 0  |          1   1.92e-14  5.2e+13   0.000            1           1
                                                            1 1 1  |          1   2.46e-14  4.1e+13   0.000            1           1
                                                                   |
                                                         age_group |
                                                            18-24  |  -5.25e-16   1.17e-15    -0.45   0.655    -2.88e-15    1.83e-15
                                                            25-34  |  -8.97e-16   1.30e-15    -0.69   0.494    -3.52e-15    1.73e-15
                                                            45-54  |  -1.22e-16   7.68e-16    -0.16   0.874    -1.67e-15    1.43e-15
                                                            55-64  |  -4.89e-16   1.25e-15    -0.39   0.696    -3.00e-15    2.02e-15
                                                                   |
                                                         race_wbho |
                                                       2 black nh  |  -2.08e-15   1.83e-15    -1.13   0.263    -5.77e-15    1.62e-15
                                                3 hispanic/latino  |   7.67e-15   2.85e-15     2.69   0.010     1.91e-15    1.34e-14
                                                         other nh  |   3.59e-15   1.76e-15     2.04   0.048     3.51e-17    7.15e-15
                                                                   |
                                                              edu4 |
                                                   1 Less than HS  |  -2.64e-15   1.67e-15    -1.58   0.122    -6.01e-15    7.33e-16
                                                      2 HS or GED  |   6.16e-17   1.53e-15     0.04   0.968    -3.03e-15    3.15e-15
                                   3 Some college or Associate's'  |  -1.34e-15   1.34e-15    -1.00   0.322    -4.03e-15    1.36e-15
                                                                   |
                                                           1.woman |  -1.77e-15   1.35e-15    -1.31   0.196    -4.50e-15    9.52e-16
                                                       1.marstdum1 |  -2.63e-15   1.52e-15    -1.73   0.091    -5.70e-15    4.41e-16
                                                                   |
                                                   woman#marstdum1 |
                                                              1 1  |   1.93e-15   2.00e-15     0.97   0.338    -2.09e-15    5.96e-15
                                                                   |
                                                        ownkidd_18 |
                                      1: Own children, <18, in HH  |   2.23e-15   2.15e-15     1.04   0.305    -2.10e-15    6.56e-15
                                                                   |
                                                  woman#ownkidd_18 |
                                    1#1: Own children, <18, in HH  |   1.05e-15   3.05e-15     0.34   0.732    -5.11e-15    7.21e-15
                                                                   |
                                              marstdum1#ownkidd_18 |
                                    1#1: Own children, <18, in HH  |  -5.47e-16   2.11e-15    -0.26   0.796    -4.79e-15    3.70e-15
                                                                   |
                                        woman#marstdum1#ownkidd_18 |
                                  1#1#1: Own children, <18, in HH  |   3.94e-16   3.15e-15     0.13   0.901    -5.96e-15    6.74e-15
                                                                   |
                                                          ind_nilf |
                                                                2  |   4.23e-15   8.05e-15     0.53   0.602    -1.20e-14    2.05e-14
                                                                3  |  -7.01e-16   4.89e-15    -0.14   0.887    -1.06e-14    9.16e-15
                                                                4  |   1.83e-15   5.25e-15     0.35   0.729    -8.77e-15    1.24e-14
                                                                5  |   2.14e-15   5.58e-15     0.38   0.703    -9.12e-15    1.34e-14
                                                                6  |   1.03e-15   5.75e-15     0.18   0.859    -1.06e-14    1.26e-14
                                                                7  |   8.36e-15   6.42e-15     1.30   0.200    -4.59e-15    2.13e-14
                                                                8  |   4.27e-15   5.94e-15     0.72   0.476    -7.70e-15    1.62e-14
                                                                9  |   4.71e-15   6.54e-15     0.72   0.476    -8.48e-15    1.79e-14
                                                               10  |   5.85e-15   6.09e-15     0.96   0.342    -6.44e-15    1.81e-14
                                                               11  |   4.35e-15   6.40e-15     0.68   0.500    -8.55e-15    1.73e-14
                                                               12  |   5.93e-15   6.10e-15     0.97   0.337    -6.37e-15    1.82e-14
                                                               13  |   1.70e-15   5.12e-15     0.33   0.742    -8.62e-15    1.20e-14
                                                               14  |   1.16e-14   9.74e-15     1.19   0.240    -8.03e-15    3.13e-14
                                                                   |
                                                      uh_occmaj_b2 |
                             professional and related occupations  |  -2.09e-15   1.97e-15    -1.06   0.293    -6.06e-15    1.87e-15
                                              service occupations  |  -2.96e-15   1.68e-15    -1.77   0.085    -6.35e-15    4.22e-16
                                    sales and related occupations  |   5.51e-16   2.12e-15     0.26   0.797    -3.73e-15    4.83e-15
                    office and administrative support occupations  |   5.08e-17   1.50e-15     0.03   0.973    -2.98e-15    3.08e-15
                       farming, fishing, and forestry occupations  |  -1.22e-16   5.58e-15    -0.02   0.983    -1.14e-14    1.11e-14
                          construction and extraction occupations  |   4.81e-15   2.40e-15     2.00   0.052    -3.53e-17    9.66e-15
                installation, maintenance, and repair occupations  |  -6.70e-16   2.73e-15    -0.25   0.807    -6.18e-15    4.83e-15
                                           production occupations  |  -1.10e-16   2.40e-15    -0.05   0.964    -4.95e-15    4.73e-15
                   transportation and material moving occupations  |  -2.30e-15   2.24e-15    -1.03   0.310    -6.82e-15    2.22e-15
                                                     armed forces  |          0  (omitted)
                                                                   |
                                                            sampjl |   6.61e-16   7.83e-16     0.84   0.403    -9.18e-16    2.24e-15
                                                                   |
                                                              durg |
                                                        5-8 weeks  |   1.77e-16   1.42e-15     0.12   0.902    -2.70e-15    3.05e-15
                                                       9-12 weeks  |  -8.36e-16   1.30e-15    -0.64   0.525    -3.46e-15    1.79e-15
                                                      13-16 weeks  |  -2.92e-15   2.05e-15    -1.42   0.161    -7.06e-15    1.21e-15
                                                      17-20 weeks  |   2.03e-15   1.74e-15     1.16   0.251    -1.49e-15    5.54e-15
                                                      21-26 weeks  |   1.94e-15   1.13e-15     1.71   0.094    -3.45e-16    4.23e-15
                                                      27-32 weeks  |   3.27e-15   1.72e-15     1.90   0.064    -1.93e-16    6.73e-15
                                                      33-38 weeks  |   1.24e-15   2.40e-15     0.52   0.609    -3.61e-15    6.09e-15
                                                      39-44 weeks  |  -3.43e-15   2.04e-15    -1.68   0.099    -7.53e-15    6.76e-16
                                                      45-50 weeks  |  -2.85e-15   2.54e-15    -1.13   0.267    -7.97e-15    2.26e-15
                                                      51-52 weeks  |   3.87e-15   1.81e-15     2.14   0.038     2.26e-16    7.51e-15
                                                        >52 weeks  |   4.40e-16   1.53e-15     0.29   0.775    -2.65e-15    3.53e-15
                                                                   |
                                                             ur_sa |   8.13e-11   2.45e-11     3.32   0.002     3.19e-11    1.31e-10
                                                            ur2_sa |  -1.33e-09   4.08e-10    -3.27   0.002    -2.16e-09   -5.11e-10
                                                            ur3_sa |   6.88e-09   2.18e-09     3.16   0.003     2.49e-09    1.13e-08
                                                               iur |  -1.84e-11   5.85e-12    -3.14   0.003    -3.02e-11   -6.55e-12
                                                              iur2 |   6.23e-10   1.97e-10     3.16   0.003     2.26e-10    1.02e-09
                                                              iur3 |  -5.81e-09   1.96e-09    -2.96   0.005    -9.77e-09   -1.85e-09
                                                          initrate |   5.08e-12   6.39e-12     0.79   0.432    -7.82e-12    1.80e-11
                                                         initrate2 |  -1.09e-09   6.85e-10    -1.59   0.120    -2.47e-09    2.94e-10
                                                         initrate3 |   2.87e-08   1.60e-08     1.80   0.080    -3.55e-09    6.10e-08
                                                         empgrowth |  -4.43e-15   1.20e-14    -0.37   0.714    -2.86e-14    1.98e-14
                                                              emp2 |  -6.82e-15   2.02e-14    -0.34   0.738    -4.76e-14    3.40e-14
                                                              emp3 |   2.60e-15   8.83e-15     0.29   0.770    -1.52e-14    2.04e-14
                                                     l_incrate_jhu |  -8.54e-15   3.53e-15    -2.42   0.020    -1.57e-14   -1.43e-15
                                                           stringd |   4.10e-16   4.11e-16     1.00   0.324    -4.19e-16    1.24e-15
                                                             _cons |  -1.37e-12   4.41e-13    -3.11   0.003    -2.26e-12   -4.84e-13
                --------------------------------------------------------------------------------------------------------------------
                
                . 
                . 
                . 

                Comment


                • #38
                  Sorry, I did that wrong, and the results are uninformative. Let's backtrack. Did you do -by prepost, sort: tab HID CUTOFF3 if e(sample)-? #30 does not capture your sample restrictions, because, excluding the prepost = . table, you have a total of 7,000 observations in the -tab- output, but your -logit- sample size is smaller than that. You need to run it with -if e(sample)- after the original -logit-. It's more likely that the colinearity is coming from failure of the HID##CUTOFF3##prepost expansion to actually be fully instantiated than that it's coming from something else.

                  If that doesn't show a zero cell anywhere, here's a trick that usually works. Move the i.HID##i.CUTOFF3##i.prepost term to the end of the logistic regression's varlist. Stata usually removes colinearities from left to right. If the colinearity is not arising from among HID, CUTOFF3, and prepost themselves, then it will remove something that precedes that and preserve the full three-way interaction. Then by looking at the notes that are the very first part of the output of logistic regression, and comparing them to the notes in the original logistic regression, you will be able to see which variable(s) caused the problem, because it (they) will be removed instead of the HID#CUTOFF 1 1 term.

                  Once you've identified the offending variable(s) you need to think about why this happened. It may, when you see them, be retrospectively obvious that this would happen. In that case, removing that (those) variable(s) from the model is an ideal solution, sacrificing nothing. On the other hand, if there is no reason why HID#CUTOFF should be determined in that way, then you have a data problem. Either something is miscoded in the data creating a spurious colinearity, or, perhaps it just happens that you got a unlucky sample that contains this linear relationship that should not really exist.

                  Comment


                  • #39
                    Okay, thank you for bearing with me here, and no problem. I'm pasting below the output from your suggestions. It seems like my other variables are fine; something is off with HID, CUTOFF3, POSTPERIOD. I'm not sure if it has something to do with the fact that the post-period is just 2 months (postperiod==1 == July/August 2021; postperiod==0 == January to June 2021). Perhaps this isn't the best strategy to get at my question of interest. I'll check the original variables again; I'm not sure what else there is I can do (I don't think I miscoded anything...)

                    HTML Code:
                    . // Clyde's suggested diagnostics
                    . // original 
                    . logit reemp3 i.hid##i.cutoff3##i.postperiod b3.age_group b1.race_wbho b4.edu4 i.woman##i.marstd
                    > um1##i.ownkidd_18 b1.ind_nilf b1.uh_occmaj_b2 sampjl b1.durg ur_sa ur2_sa ur3_sa iur iur2 iur3 
                    > initrate initrate2 initrate3 empgrowth emp2 emp3 l_incrate_jhu stringd i.year_month i.statefip 
                    > if sampall==1 & age>=18 & age<65 [pw=wtfinl], vce(cluster statefip) or
                    
                    note: 1.hid#1.cutoff3 omitted because of collinearity.
                    note: 11.uh_occmaj_b2 omitted because of collinearity.
                    note: 739.year_month omitted because of collinearity.
                    note: 55.statefip omitted because of collinearity.
                    note: 56.statefip omitted because of collinearity.
                    Iteration 0:   log pseudolikelihood =  -12250760  
                    Iteration 1:   log pseudolikelihood =  -11236533  
                    Iteration 2:   log pseudolikelihood =  -11186703  
                    Iteration 3:   log pseudolikelihood =  -11186469  
                    Iteration 4:   log pseudolikelihood =  -11186469  
                    
                    Logistic regression                                     Number of obs =  6,684
                                                                            Wald chi2(42) =      .
                                                                            Prob > chi2   =      .
                    Log pseudolikelihood = -11186469                        Pseudo R2     = 0.0869
                    
                                                                                        (Std. err. adjusted for 44 clusters in statefip)
                    --------------------------------------------------------------------------------------------------------------------
                                                                       |               Robust
                                                                reemp3 | Odds ratio   std. err.      z    P>|z|     [95% conf. interval]
                    ---------------------------------------------------+----------------------------------------------------------------
                                                                 1.hid |   .8448048   .4121336    -0.35   0.730     .3247148    2.197913
                                                             1.cutoff3 |   .7265061    .211079    -1.10   0.271     .4110847    1.283947
                                                                       |
                                                           hid#cutoff3 |
                                                                  1 1  |          1  (omitted)
                                                                       |
                                                          1.postperiod |   1.511941   .6340878     0.99   0.324     .6645881    3.439675
                                                                       |
                                                        hid#postperiod |
                                                                  1 1  |   1.319888   .2351078     1.56   0.119      .930926    1.871368
                                                                       |
                                                    cutoff3#postperiod |
                                                                  1 1  |   1.173244   .2602989     0.72   0.471     .7595192    1.812334
                                                                       |
                                                hid#cutoff3#postperiod |
                                                                1 1 1  |   1.677616   .5304469     1.64   0.102     .9027147    3.117703
                                                                       |
                                                             age_group |
                                                                18-24  |   1.067585   .1879843     0.37   0.710     .7559964    1.507597
                                                                25-34  |   .9448556    .142216    -0.38   0.706     .7034705    1.269068
                                                                45-54  |   .9373763   .0932369    -0.65   0.516     .7713447    1.139146
                                                                55-64  |    .806711    .087214    -1.99   0.047     .6526707    .9971072
                                                                       |
                                                             race_wbho |
                                                           2 black nh  |    .590971   .0838122    -3.71   0.000     .4475563    .7803413
                                                    3 hispanic/latino  |   .9595384   .0805638    -0.49   0.623     .8139441    1.131176
                                                             other nh  |   .8154017   .1073911    -1.55   0.121     .6298912    1.055547
                                                                       |
                                                                  edu4 |
                                                       1 Less than HS  |   .9334952    .188299    -0.34   0.733     .6286557    1.386153
                                                          2 HS or GED  |   .7978529   .0906706    -1.99   0.047     .6385422    .9969104
                                       3 Some college or Associate's'  |   .8422417   .0899708    -1.61   0.108     .6831386      1.0384
                                                                       |
                                                               1.woman |   .9602018   .0952203    -0.41   0.682     .7905902    1.166202
                                                           1.marstdum1 |   1.080298   .1285047     0.65   0.516      .855639    1.363944
                                                                       |
                                                       woman#marstdum1 |
                                                                  1 1  |    .808204   .1726155    -1.00   0.319     .5317679    1.228344
                                                                       |
                                                            ownkidd_18 |
                                          1: Own children, <18, in HH  |    .874251   .1896057    -0.62   0.535     .5715173    1.337343
                                                                       |
                                                      woman#ownkidd_18 |
                                        1#1: Own children, <18, in HH  |   1.048349   .2681951     0.18   0.854     .6349603    1.730874
                                                                       |
                                                  marstdum1#ownkidd_18 |
                                        1#1: Own children, <18, in HH  |   1.397039   .2992478     1.56   0.119     .9180782    2.125872
                                                                       |
                                            woman#marstdum1#ownkidd_18 |
                                      1#1#1: Own children, <18, in HH  |   .8722012   .3426738    -0.35   0.728      .403825    1.883823
                                                                       |
                                                              ind_nilf |
                                                                    2  |   1.895673   .7905257     1.53   0.125     .8371418    4.292675
                                                                    3  |   1.046396   .4457803     0.11   0.915     .4540166    2.411685
                                                                    4  |   1.190101   .4815363     0.43   0.667     .5384837     2.63024
                                                                    5  |   1.160612   .4403797     0.39   0.695     .5517083    2.441546
                                                                    6  |   1.010318    .372636     0.03   0.978      .490353    2.081647
                                                                    7  |   1.007307   .3724497     0.02   0.984     .4880139    2.079179
                                                                    8  |   1.737972   .6228211     1.54   0.123     .8610048    3.508166
                                                                    9  |   1.380655   .5524645     0.81   0.420     .6302023    3.024758
                                                                   10  |    1.63282   .6146132     1.30   0.193     .7807924    3.414608
                                                                   11  |   1.296402    .486074     0.69   0.489      .621712    2.703273
                                                                   12  |   1.569633   .7231219     0.98   0.328     .6362886    3.872062
                                                                   13  |   1.091652   .5453244     0.18   0.861     .4100854    2.905988
                                                                   14  |   1.730688   1.136671     0.84   0.404      .477718    6.269975
                                                                       |
                                                          uh_occmaj_b2 |
                                 professional and related occupations  |   1.211429   .1589085     1.46   0.144     .9367891    1.566584
                                                  service occupations  |   1.099327   .1602891     0.65   0.516     .8260685    1.462977
                                        sales and related occupations  |   1.312746    .222853     1.60   0.109     .9411959    1.830971
                        office and administrative support occupations  |    1.04943   .1559791     0.32   0.745     .7842194    1.404331
                           farming, fishing, and forestry occupations  |    .953463   .5997131    -0.08   0.940     .2779148    3.271117
                              construction and extraction occupations  |   1.693002   .2782661     3.20   0.001     1.226738    2.336485
                    installation, maintenance, and repair occupations  |   1.411013   .2927323     1.66   0.097     .9395905    2.118963
                                               production occupations  |   1.213486   .1552048     1.51   0.130     .9444219    1.559206
                       transportation and material moving occupations  |   1.195174   .1798934     1.18   0.236      .889839    1.605281
                                                         armed forces  |          1  (omitted)
                                                                       |
                                                                sampjl |   1.392052   .0905271     5.09   0.000     1.225464    1.581286
                                                                       |
                                                                  durg |
                                                            5-8 weeks  |   .6541102   .0665139    -4.17   0.000     .5359146    .7983739
                                                           9-12 weeks  |   .5754466   .0534491    -5.95   0.000     .4796706    .6903463
                                                          13-16 weeks  |   .3707656   .0485167    -7.58   0.000     .2868898    .4791635
                                                          17-20 weeks  |   .4360954   .0899508    -4.02   0.000     .2910779    .6533617
                                                          21-26 weeks  |   .4251378   .0552676    -6.58   0.000     .3295143    .5485109
                                                          27-32 weeks  |    .241331   .0542037    -6.33   0.000     .1553926    .3747967
                                                          33-38 weeks  |   .3811776   .0873856    -4.21   0.000     .2432137     .597402
                                                          39-44 weeks  |   .3070426   .0470368    -7.71   0.000     .2274053    .4145689
                                                          45-50 weeks  |   .1823773   .0407861    -7.61   0.000     .1176553    .2827028
                                                          51-52 weeks  |   .3386499   .0439951    -8.33   0.000     .2625238    .4368509
                                                            >52 weeks  |   .1587225   .0295763    -9.88   0.000     .1101605     .228692
                                                                       |
                                                                 ur_sa |   1.9e+165   2.8e+167     2.65   0.008     1.15e+43    3.2e+287
                                                                ur2_sa |          0          0    -2.57   0.010            0           0
                                                                ur3_sa |          .          .     2.44   0.015            .           .
                                                                   iur |   9.44e+18   4.74e+20     0.87   0.384     1.71e-24    5.20e+61
                                                                  iur2 |   4.5e-276   6.5e-273    -0.44   0.659            0           .
                                                                  iur3 |          .          .     0.29   0.772            0           .
                                                              initrate |   2.68e-22   3.26e-20    -0.41   0.683     1.0e-125    6.95e+81
                                                             initrate2 |   3.8e+281   4.2e+285     0.06   0.953            0           .
                                                             initrate3 |          0          0    -0.05   0.957            0           .
                                                             empgrowth |   1.303027   .2702055     1.28   0.202      .867844    1.956433
                                                                  emp2 |   .9611669   .3232344    -0.12   0.906      .497216    1.858029
                                                                  emp3 |   1.012619   .1594366     0.08   0.937     .7437456    1.378693
                                                         l_incrate_jhu |   1.340004   .1092554     3.59   0.000     1.142101      1.5722
                                                               stringd |   .9964543   .0074464    -0.48   0.635      .981966    1.011156
                                                                       |
                                                            year_month |
                                                                  733  |   1.321321   .2976673     1.24   0.216     .8496688    2.054788
                                                                  734  |   1.900181   .5187354     2.35   0.019     1.112816    3.244642
                                                                  735  |   1.609576   .4028189     1.90   0.057     .9855675    2.628673
                                                                  736  |   1.976637   .5544794     2.43   0.015     1.140645    3.425335
                                                                  737  |   2.387076    1.06694     1.95   0.052     .9940514    5.732232
                                                                  738  |   1.110973   .1614723     0.72   0.469      .835578    1.477133
                                                                  739  |          1  (omitted)
                                                                       |
                                                              statefip |
                                                             arkansas  |   .4891734    .222422    -1.57   0.116      .200646    1.192601
                                                           california  |   .5537214   .7141911    -0.46   0.647     .0441987     6.93702
                                                             colorado  |   .3490437   .3480586    -1.06   0.291     .0494402    2.464218
                                                          connecticut  |   .2703205   .3059339    -1.16   0.248     .0294128    2.484404
                                                             delaware  |   .6256973   .5103097    -0.57   0.565     .1265134    3.094511
                                                 district of columbia  |   .3567543   .4012229    -0.92   0.359     .0393611    3.233487
                                                              georgia  |    1.01599   .4386541     0.04   0.971     .4358961    2.368078
                                                               hawaii  |   .6497519   .3648265    -0.77   0.443     .2161772    1.952923
                                                                idaho  |   .6562326   .2036771    -1.36   0.175     .3571639    1.205724
                                                             illinois  |   .3976497   .4241809    -0.86   0.387     .0491481    3.217321
                                                                 iowa  |   .6669601   .2764237    -0.98   0.328      .296017    1.502737
                                                               kansas  |   1.312426   .3608184     0.99   0.323     .7656994    2.249527
                                                             kentucky  |   .5488892   .3637707    -0.91   0.365     .1497475    2.011916
                                                                maine  |   .5152634   .3451628    -0.99   0.322     .1386211    1.915266
                                                             maryland  |   .8237219    .740503    -0.22   0.829     .1414406    4.797192
                                                             michigan  |   .5287848   .2950051    -1.14   0.253      .177174    1.578185
                                                            minnesota  |   .4547937   .2129583    -1.68   0.092     .1816507    1.138654
                                                          mississippi  |   .5688462   .1795424    -1.79   0.074     .3064319     1.05598
                                                             missouri  |   .7666102    .118664    -1.72   0.086     .5660003    1.038323
                                                              montana  |   1.846095   .5898796     1.92   0.055     .9868951    3.453322
                                                             nebraska  |   2.996182   2.303692     1.43   0.154     .6638956    13.52186
                                                               nevada  |   .4294347   .5259476    -0.69   0.490     .0389398    4.735884
                                                        new hampshire  |   .5354148    .171342    -1.95   0.051     .2859506    1.002512
                                                           new jersey  |   .3215604   .3689603    -0.99   0.323     .0339304    3.047447
                                                           new mexico  |   .3537273   .2569232    -1.43   0.152      .085195    1.468665
                                                             new york  |   .4069928   .5157846    -0.71   0.478     .0339511    4.878876
                                                       north carolina  |   .4573715   .1901148    -1.88   0.060     .2025124    1.032967
                                                         north dakota  |   1.361402   .2952237     1.42   0.155     .8900222    2.082436
                                                             oklahoma  |   .7737274   .1862468    -1.07   0.287     .4827165    1.240178
                                                               oregon  |   .4425235   .3946628    -0.91   0.361     .0770541    2.541423
                                                         pennsylvania  |   .4519955   .4818388    -0.74   0.456     .0559412    3.652051
                                                         rhode island  |   .5596404   .5997285    -0.54   0.588     .0685069    4.571764
                                                       south carolina  |   .6372154   .1363411    -2.11   0.035     .4189477    .9691983
                                                         south dakota  |   3.508452   .8599246     5.12   0.000     2.170128    5.672125
                                                            tennessee  |    .870771   .0831107    -1.45   0.147      .722206    1.049897
                                                                texas  |     .62395   .4895824    -0.60   0.548     .1340462    2.904324
                                                                 utah  |   1.492642   .9082895     0.66   0.510     .4528871    4.919505
                                                              vermont  |   .8013101   .4048566    -0.44   0.661     .2976711    2.157071
                                                             virginia  |    .737892    .369215    -0.61   0.544     .2767462    1.967451
                                                           washington  |   .3689785    .184406    -1.99   0.046     .1385455    .9826747
                                                        west virginia  |   .5477684   .3421977    -0.96   0.335     .1610055    1.863602
                                                            wisconsin  |          1  (omitted)
                                                              wyoming  |          1  (omitted)
                                                                       |
                                                                 _cons |    .000032   .0000916    -3.62   0.000     1.17e-07    .0087452
                    --------------------------------------------------------------------------------------------------------------------
                    Note: _cons estimates baseline odds.
                    
                    . by postperiod, sort: tab hid cutoff3 if e(sample) // no 0's
                    
                    ---------------------------------------------------------------------------------------------------------------------------
                    -> postperiod = 0
                    
                       High NS |
                       denials |
                    states, as |
                     of 1/2020 |
                     (1==high; |
                     0==low or |        cutoff3
                       medium) |         0          1 |     Total
                    -----------+----------------------+----------
                             0 |     2,683        888 |     3,571 
                             1 |       760        901 |     1,661 
                    -----------+----------------------+----------
                         Total |     3,443      1,789 |     5,232 
                    
                    ---------------------------------------------------------------------------------------------------------------------------
                    -> postperiod = 1
                    
                       High NS |
                       denials |
                    states, as |
                     of 1/2020 |
                     (1==high; |
                     0==low or |        cutoff3
                       medium) |         0          1 |     Total
                    -----------+----------------------+----------
                             0 |       764        223 |       987 
                             1 |       249        216 |       465 
                    -----------+----------------------+----------
                         Total |     1,013        439 |     1,452 
                    
                    ---------------------------------------------------------------------------------------------------------------------------
                    -> postperiod = .
                    no observations

                    Comment


                    • #40
                      Here's the regression w/ the three-way interaction moved to the end...

                      HTML Code:
                      . // w/ variable moved to end
                      . logit reemp3 b3.age_group b1.race_wbho b4.edu4 i.woman##i.marstdum1##i.ownkidd_18 b1.ind_nilf b1.uh_occmaj_b2 sampjl b1.d
                      > urg ur_sa ur2_sa ur3_sa iur iur2 iur3 initrate initrate2 initrate3 empgrowth emp2 emp3 l_incrate_jhu stringd i.year_month
                      >  i.statefip i.hid##i.cutoff3##i.postperiod if sampall==1 & age>=18 & age<65 [pw=wtfinl], vce(cluster statefip) or
                      
                      note: 11.uh_occmaj_b2 omitted because of collinearity.
                      note: 1.hid omitted because of collinearity.
                      note: 1.cutoff3 omitted because of collinearity.
                      note: 1.hid#1.cutoff3 omitted because of collinearity.
                      note: 1.postperiod omitted because of collinearity.
                      Iteration 0:   log pseudolikelihood =  -12250760  
                      Iteration 1:   log pseudolikelihood =  -11236533  
                      Iteration 2:   log pseudolikelihood =  -11186703  
                      Iteration 3:   log pseudolikelihood =  -11186469  
                      Iteration 4:   log pseudolikelihood =  -11186469  
                      
                      Logistic regression                                     Number of obs =  6,684
                                                                              Wald chi2(42) =      .
                                                                              Prob > chi2   =      .
                      Log pseudolikelihood = -11186469                        Pseudo R2     = 0.0869
                      
                                                                                          (Std. err. adjusted for 44 clusters in statefip)
                      --------------------------------------------------------------------------------------------------------------------
                                                                         |               Robust
                                                                  reemp3 | Odds ratio   std. err.      z    P>|z|     [95% conf. interval]
                      ---------------------------------------------------+----------------------------------------------------------------
                                                               age_group |
                                                                  18-24  |   1.067585   .1879843     0.37   0.710     .7559964    1.507597
                                                                  25-34  |   .9448556    .142216    -0.38   0.706     .7034705    1.269068
                                                                  45-54  |   .9373763   .0932369    -0.65   0.516     .7713447    1.139146
                                                                  55-64  |    .806711    .087214    -1.99   0.047     .6526707    .9971072
                                                                         |
                                                               race_wbho |
                                                             2 black nh  |    .590971   .0838122    -3.71   0.000     .4475563    .7803413
                                                      3 hispanic/latino  |   .9595384   .0805638    -0.49   0.623     .8139441    1.131176
                                                               other nh  |   .8154017   .1073911    -1.55   0.121     .6298912    1.055547
                                                                         |
                                                                    edu4 |
                                                         1 Less than HS  |   .9334952    .188299    -0.34   0.733     .6286557    1.386153
                                                            2 HS or GED  |   .7978529   .0906706    -1.99   0.047     .6385422    .9969104
                                         3 Some college or Associate's'  |   .8422417   .0899708    -1.61   0.108     .6831386      1.0384
                                                                         |
                                                                 1.woman |   .9602018   .0952203    -0.41   0.682     .7905902    1.166202
                                                             1.marstdum1 |   1.080298   .1285047     0.65   0.516      .855639    1.363944
                                                                         |
                                                         woman#marstdum1 |
                                                                    1 1  |    .808204   .1726155    -1.00   0.319     .5317679    1.228344
                                                                         |
                                                              ownkidd_18 |
                                            1: Own children, <18, in HH  |    .874251   .1896057    -0.62   0.535     .5715173    1.337343
                                                                         |
                                                        woman#ownkidd_18 |
                                          1#1: Own children, <18, in HH  |   1.048349   .2681951     0.18   0.854     .6349603    1.730874
                                                                         |
                                                    marstdum1#ownkidd_18 |
                                          1#1: Own children, <18, in HH  |   1.397039   .2992478     1.56   0.119     .9180782    2.125872
                                                                         |
                                              woman#marstdum1#ownkidd_18 |
                                        1#1#1: Own children, <18, in HH  |   .8722012   .3426738    -0.35   0.728      .403825    1.883823
                                                                         |
                                                                ind_nilf |
                                                                      2  |   1.895673   .7905257     1.53   0.125     .8371418    4.292675
                                                                      3  |   1.046396   .4457803     0.11   0.915     .4540166    2.411685
                                                                      4  |   1.190101   .4815363     0.43   0.667     .5384837     2.63024
                                                                      5  |   1.160612   .4403797     0.39   0.695     .5517083    2.441546
                                                                      6  |   1.010318    .372636     0.03   0.978      .490353    2.081647
                                                                      7  |   1.007307   .3724497     0.02   0.984     .4880139    2.079179
                                                                      8  |   1.737972   .6228211     1.54   0.123     .8610048    3.508166
                                                                      9  |   1.380655   .5524645     0.81   0.420     .6302023    3.024758
                                                                     10  |    1.63282   .6146132     1.30   0.193     .7807924    3.414608
                                                                     11  |   1.296402    .486074     0.69   0.489      .621712    2.703273
                                                                     12  |   1.569633   .7231219     0.98   0.328     .6362886    3.872062
                                                                     13  |   1.091652   .5453244     0.18   0.861     .4100854    2.905988
                                                                     14  |   1.730688   1.136671     0.84   0.404      .477718    6.269975
                                                                         |
                                                            uh_occmaj_b2 |
                                   professional and related occupations  |   1.211429   .1589085     1.46   0.144     .9367891    1.566584
                                                    service occupations  |   1.099327   .1602891     0.65   0.516     .8260685    1.462977
                                          sales and related occupations  |   1.312746    .222853     1.60   0.109     .9411959    1.830971
                          office and administrative support occupations  |    1.04943   .1559791     0.32   0.745     .7842194    1.404331
                             farming, fishing, and forestry occupations  |    .953463   .5997131    -0.08   0.940     .2779148    3.271117
                                construction and extraction occupations  |   1.693002   .2782661     3.20   0.001     1.226738    2.336485
                      installation, maintenance, and repair occupations  |   1.411013   .2927323     1.66   0.097     .9395905    2.118963
                                                 production occupations  |   1.213486   .1552048     1.51   0.130     .9444219    1.559206
                         transportation and material moving occupations  |   1.195174   .1798934     1.18   0.236      .889839    1.605281
                                                           armed forces  |          1  (omitted)
                                                                         |
                                                                  sampjl |   1.392052   .0905271     5.09   0.000     1.225464    1.581286
                                                                         |
                                                                    durg |
                                                              5-8 weeks  |   .6541102   .0665139    -4.17   0.000     .5359146    .7983739
                                                             9-12 weeks  |   .5754466   .0534491    -5.95   0.000     .4796706    .6903463
                                                            13-16 weeks  |   .3707656   .0485167    -7.58   0.000     .2868898    .4791635
                                                            17-20 weeks  |   .4360954   .0899508    -4.02   0.000     .2910779    .6533617
                                                            21-26 weeks  |   .4251378   .0552676    -6.58   0.000     .3295143    .5485109
                                                            27-32 weeks  |    .241331   .0542037    -6.33   0.000     .1553926    .3747967
                                                            33-38 weeks  |   .3811776   .0873856    -4.21   0.000     .2432137     .597402
                                                            39-44 weeks  |   .3070426   .0470368    -7.71   0.000     .2274053    .4145689
                                                            45-50 weeks  |   .1823773   .0407861    -7.61   0.000     .1176553    .2827028
                                                            51-52 weeks  |   .3386499   .0439951    -8.33   0.000     .2625238    .4368509
                                                              >52 weeks  |   .1587225   .0295763    -9.88   0.000     .1101605     .228692
                                                                         |
                                                                   ur_sa |   1.9e+165   2.8e+167     2.65   0.008     1.15e+43    3.2e+287
                                                                  ur2_sa |          0          0    -2.57   0.010            0           0
                                                                  ur3_sa |          .          .     2.44   0.015            .           .
                                                                     iur |   9.44e+18   4.74e+20     0.87   0.384     1.71e-24    5.20e+61
                                                                    iur2 |   4.5e-276   6.5e-273    -0.44   0.659            0           .
                                                                    iur3 |          .          .     0.29   0.772            0           .
                                                                initrate |   2.68e-22   3.26e-20    -0.41   0.683     1.0e-125    6.95e+81
                                                               initrate2 |   3.8e+281   4.2e+285     0.06   0.953            0           .
                                                               initrate3 |          0          0    -0.05   0.957            0           .
                                                               empgrowth |   1.303027   .2702055     1.28   0.202      .867844    1.956433
                                                                    emp2 |   .9611669   .3232344    -0.12   0.906      .497216    1.858029
                                                                    emp3 |   1.012619   .1594366     0.08   0.937     .7437456    1.378693
                                                           l_incrate_jhu |   1.340004   .1092554     3.59   0.000     1.142101      1.5722
                                                                 stringd |   .9964543   .0074464    -0.48   0.635      .981966    1.011156
                                                                         |
                                                              year_month |
                                                                    733  |   1.321321   .2976673     1.24   0.216     .8496688    2.054788
                                                                    734  |   1.900181   .5187354     2.35   0.019     1.112816    3.244642
                                                                    735  |   1.609576   .4028189     1.90   0.057     .9855675    2.628673
                                                                    736  |   1.976637   .5544794     2.43   0.015     1.140645    3.425335
                                                                    737  |   2.387076    1.06694     1.95   0.052     .9940514    5.732232
                                                                    738  |   1.679725   .8129847     1.07   0.284     .6505159    4.337292
                                                                    739  |   1.511941   .6340878     0.99   0.324     .6645881    3.439675
                                                                         |
                                                                statefip |
                                                               arkansas  |   .4891734    .222422    -1.57   0.116      .200646    1.192601
                                                             california  |   .7621703   .8659812    -0.24   0.811     .0822078    7.066281
                                                               colorado  |   .4804415   .3932977    -0.90   0.371     .0965678     2.39028
                                                            connecticut  |   .3720829    .366479    -1.00   0.315     .0539831     2.56461
                                                               delaware  |   .8612415   .5681397    -0.23   0.821     .2363788    3.137917
                                                   district of columbia  |   .4910547   .4809581    -0.73   0.468     .0720162    3.348342
                                                                georgia  |    1.01599   .4386541     0.04   0.971     .4358961    2.368078
                                                                 hawaii  |   .7555525   .6428892    -0.33   0.742     .1425571    4.004427
                                                                  idaho  |   .5543884   .1205487    -2.71   0.007     .3620137    .8489914
                                                               illinois  |   .5473453   .5025068    -0.66   0.512     .0905295    3.309272
                                                                   iowa  |   .6669601   .2764237    -0.98   0.328      .296017    1.502737
                                                                 kansas  |   1.526131   .4044642     1.60   0.111     .9078234     2.56556
                                                               kentucky  |    .755519   .3678406    -0.58   0.565     .2909509    1.961874
                                                                  maine  |   .7092347   .3892095    -0.63   0.531     .2419205    2.079252
                                                               maryland  |   1.133813   .8407109     0.17   0.866     .2650842    4.849521
                                                               michigan  |    .614888   .5143529    -0.58   0.561     .1193348     3.16829
                                                              minnesota  |   .6260011   .2944331    -1.00   0.319     .2490126    1.573725
                                                            mississippi  |    .480564   .3608104    -0.98   0.329     .1103224    2.093334
                                                               missouri  |    .647636   .3071114    -0.92   0.360     .2556748    1.640491
                                                                montana  |   1.846095   .5898796     1.92   0.055     .9868951    3.453322
                                                               nebraska  |   2.531189    1.01507     2.32   0.021     1.153377     5.55492
                                                                 nevada  |   .5910958   .6291519    -0.49   0.621     .0733929      4.7606
                                                          new hampshire  |   .4523209   .2028129    -1.77   0.077     .1878376    1.089208
                                                             new jersey  |   .4426121   .4378488    -0.82   0.410     .0636769    3.076554
                                                             new mexico  |   .4113255   .4017473    -0.91   0.363     .0606464    2.789755
                                                               new york  |   .5602056   .6238209    -0.52   0.603     .0631664    4.968313
                                                         north carolina  |   .5318464   .3480479    -0.96   0.335     .1474849    1.917895
                                                           north dakota  |   1.150119   .4356442     0.37   0.712     .5474227    2.416364
                                                               oklahoma  |   .6536486   .2793248    -0.99   0.320     .2828779    1.510392
                                                                 oregon  |   .6091119   .4613195    -0.65   0.513     .1380472    2.687612
                                                           pennsylvania  |   .6221496   .5610686    -0.53   0.599     .1062336    3.643575
                                                           rhode island  |   .7703176   .7300239    -0.28   0.783     .1202245    4.935677
                                                         south carolina  |   .5383226   .2625618    -1.27   0.204     .2069555    1.400259
                                                           south dakota  |   3.508452   .8599246     5.12   0.000     2.170128    5.672125
                                                              tennessee  |   .7356315   .3503512    -0.64   0.519     .2892463     1.87091
                                                                  texas  |     .62395   .4895824    -0.60   0.548     .1340462    2.904324
                                                                   utah  |   1.260991   .3226491     0.91   0.365     .7636873    2.082133
                                                                vermont  |   1.102964   .5722081     0.19   0.850      .398993    3.048999
                                                               virginia  |   1.015672    .354463     0.04   0.964      .512495    2.012878
                                                             washington  |   .4290601   .3534632    -1.03   0.304     .0853673    2.156477
                                                          west virginia  |   .5477684   .3421977    -0.96   0.335     .1610055    1.863602
                                                              wisconsin  |   1.162832   .5102618     0.34   0.731     .4920416    2.748099
                                                                wyoming  |   .8448048   .4121336    -0.35   0.730     .3247148    2.197913
                                                                         |
                                                                   1.hid |          1  (omitted)
                                                               1.cutoff3 |          1  (omitted)
                                                                         |
                                                             hid#cutoff3 |
                                                                    1 1  |          1  (omitted)
                                                                         |
                                                            1.postperiod |          1  (omitted)
                                                                         |
                                                          hid#postperiod |
                                                                    1 1  |   1.319888   .2351078     1.56   0.119      .930926    1.871368
                                                                         |
                                                      cutoff3#postperiod |
                                                                    1 1  |   1.173244   .2602989     0.72   0.471     .7595192    1.812334
                                                                         |
                                                  hid#cutoff3#postperiod |
                                                                  1 1 1  |   1.677616   .5304469     1.64   0.102     .9027147    3.117703
                                                                         |
                                                                   _cons |   .0000232   .0000675    -3.67   0.000     7.79e-08    .0069297
                      --------------------------------------------------------------------------------------------------------------------
                      Note: _cons estimates baseline odds.
                      
                      . 
                      end of do-file
                      
                      . 

                      Comment


                      • #41
                        Yes, it does seem that there is something wrong with the HID, CUTOFF3 and postperiod variables. The best way to prove that that is, indeed, the source of the problem is to run the logistic regression using only those predictors:
                        Code:
                        logit reemp3 i.hid##i.cutoff3##i.postperiod if sampall==1 & age>=18 & age<65 
                        and see if you again get something omitted. If you do, then you know the problem lies in those three variables and you can focus on that. If, however, this regression goes through with no unexpected omissions, then you can start adding back other parts of the model. I'd start with the pweight, and then I'd add the -vce(cluster statefip)-. After that, I'd start adding in some of the other variables until you finally find out where it breaks.

                        Comment


                        • #42
                          Wait, I think I see it. If HID and CUTOFF3 represent policies implemented at the state level, then the colinearity is arising from the inclusion of statefip as a covariate in the model. You can see that once you specify the state, then HID and CUTOFF3 (and, hence, their interactions) will be constants in all observations for that state. If this is what's going on, you must remove the state variable from your model, otherwise you cannot interpret the effects of HID and CUTOFF3. (You can still use -vce(cluster statefip)-, however.) I should add that if any of your other covariates are also constant within state, they must be removed from the model as well.

                          Comment


                          • #43
                            Clyde, thanks so much. So the model runs, no dropping, with just those variables (below). You're probably right that it's the statefip variable. But I'd like to control for month and state fixed effects. Is there no way to do that then, given the dropping issue that arises? Sorry if this is a dumb question, but could I insert dummies for states (and year_months)? Isn't it still reasonable to control for fixed characteristics of states, even if I'm looking at a subgroup of states?

                            Also, I have variables representing state-level labor market slack and state COVID-related measures (ur ... l_incrate_jhu), which vary over time. I assume they're okay. Thanks again for all your help...

                            HTML Code:
                            . logit reemp3 i.hid##i.cutoff3##i.postperiod if sampall==1 & age>=18 & age<65 [pw=wtfinl], vce(
                            > cluster statefip) or
                            
                            Iteration 0:   log pseudolikelihood =  -12808450  
                            Iteration 1:   log pseudolikelihood =  -12732009  
                            Iteration 2:   log pseudolikelihood =  -12730156  
                            Iteration 3:   log pseudolikelihood =  -12730156  
                            
                            Logistic regression                                     Number of obs =  7,000
                                                                                    Wald chi2(7)  =  77.23
                                                                                    Prob > chi2   = 0.0000
                            Log pseudolikelihood = -12730156                        Pseudo R2     = 0.0061
                            
                                                                    (Std. err. adjusted for 44 clusters in statefip)
                            ----------------------------------------------------------------------------------------
                                                   |               Robust
                                            reemp3 | Odds ratio   std. err.      z    P>|z|     [95% conf. interval]
                            -----------------------+----------------------------------------------------------------
                                             1.hid |   1.244449   .2221431     1.23   0.221     .8770644    1.765723
                                         1.cutoff3 |   1.344424   .1584871     2.51   0.012      1.06707     1.69387
                                                   |
                                       hid#cutoff3 |
                                              1 1  |   .7361788   .1609152    -1.40   0.161     .4796519    1.129901
                                                   |
                                      1.postperiod |   1.175087   .1560824     1.21   0.224     .9057492    1.524516
                                                   |
                                    hid#postperiod |
                                              1 1  |   .9088583   .1811961    -0.48   0.632     .6148864    1.343376
                                                   |
                                cutoff3#postperiod |
                                              1 1  |   1.098169   .1775781     0.58   0.563     .7998833    1.507689
                                                   |
                            hid#cutoff3#postperiod |
                                            1 1 1  |   1.883996   .5000109     2.39   0.017      1.11988    3.169481
                                                   |
                                             _cons |   .2529017   .0174382   -19.94   0.000     .2209324    .2894971
                            ----------------------------------------------------------------------------------------
                            Note: _cons estimates baseline odds.
                            Last edited by Claire McKenna; 03 Dec 2022, 08:32.

                            Comment


                            • #44
                              The ones that vary over time within state are OK. But state itself is not, at least not in this model.

                              If you feel that including state effects is important, then you have to use a different model: generalized DID. For this, you would eliminate the HID and CUTOFF3 variables and their interaction and retain only their interactions with postperiod. postperiod by itself also has to go. In this model, inclusion of both the state and time effects are now mandatory. So the model becomes:

                              Code:
                              logit reemp3 (i.hid i.cutoff3)#i.postperiod i.hid#i.cutoff3#i.postperiod i.statefips i.year_month /// etc.  ADD OTHER VARIABLES AS APPROPRIATE
                              Note the use of #, not ##, here.

                              None of the terms I have listed should end up being omitted due to colinearity. If they do, you have still included some other variables that are either state-invariant within year_month or time-invariant within state. Such variables must be excluded.

                              I expect you will get 3 rows of output for the three-way interaction term i.hid#i.cutoff3#i.postperiod, corresponding to postperiod = 1 with (hid, cutoff3) = (1, 0), (0, 1), and (1, 1). These will be the generalized DID estimates of the treatment effect of hid =1 cutoff3 = 0; hid = 0 cutoff3 = 1; and hid = 1 cutoff3 = 1, respectively, relative to hid = 0 cutoff3 = 0.

                              Comment


                              • #45
                                Okay, for some reason when I try this, it still drops variables. The first of the output below includes FE.

                                HTML Code:
                                . logit reemp3 (i.hid i.cutoff3)#i.postperiod i.hid#i.cutoff3#i.postperiod i.statefip i.year_month 
                                > if sampall==1 & age>=18 & age<65 [pw=wtfinl], vce(cluster statefip) or
                                
                                note: 1.hid#0.postperiod omitted because of collinearity.
                                note: 1.hid#1.postperiod omitted because of collinearity.
                                note: 1.cutoff3#0.postperiod omitted because of collinearity.
                                note: 1.cutoff3#1.postperiod omitted because of collinearity.
                                note: 1.hid#1.cutoff3#1.postperiod omitted because of collinearity.
                                Iteration 0:   log pseudolikelihood =  -12808450  
                                Iteration 1:   log pseudolikelihood =  -12615663  
                                Iteration 2:   log pseudolikelihood =  -12610780  
                                Iteration 3:   log pseudolikelihood =  -12610780  
                                
                                Logistic regression                                     Number of obs =  7,000
                                                                                        Wald chi2(10) =      .
                                                                                        Prob > chi2   =      .
                                Log pseudolikelihood = -12610780                        Pseudo R2     = 0.0154
                                
                                                                        (Std. err. adjusted for 44 clusters in statefip)
                                ----------------------------------------------------------------------------------------
                                                       |               Robust
                                                reemp3 | Odds ratio   std. err.      z    P>|z|     [95% conf. interval]
                                -----------------------+----------------------------------------------------------------
                                        hid#postperiod |
                                                  0 1  |   1.077406   .2195308     0.37   0.714     .7226694    1.606272
                                                  1 0  |          1  (omitted)
                                                  1 1  |          1  (omitted)
                                                       |
                                    cutoff3#postperiod |
                                                  0 1  |   .8946137   .1537298    -0.65   0.517      .638801    1.252868
                                                  1 0  |          1  (omitted)
                                                  1 1  |          1  (omitted)
                                                       |
                                hid#cutoff3#postperiod |
                                                1 1 0  |   .5372988   .1466274    -2.28   0.023     .3147207    .9172895
                                                1 1 1  |          1  (omitted)
                                                       |
                                              statefip |
                                             arkansas  |    .897042   .0170986    -5.70   0.000     .8641476    .9311885
                                           california  |   .9067118   .0385777    -2.30   0.021     .8341678    .9855647
                                             colorado  |   .9989491   .0515752    -0.02   0.984     .9028099    1.105326
                                          connecticut  |   .6735278   .0247792   -10.74   0.000      .626671     .723888
                                             delaware  |   1.138951   .0553549     2.68   0.007     1.035465     1.25278
                                 district of columbia  |   .5803443    .028981   -10.90   0.000     .5262339    .6400187
                                              georgia  |   1.759142   .0287673    34.54   0.000     1.703653    1.816438
                                               hawaii  |   .9208464   .0378687    -2.01   0.045     .8495375     .998141
                                                idaho  |   1.642899   .4057225     2.01   0.044     1.012516    2.665751
                                             illinois  |   .8022965   .0359398    -4.92   0.000     .7348595    .8759221
                                                 iowa  |   1.352285   .0169352    24.10   0.000     1.319497    1.385888
                                               kansas  |   1.436538   .0751374     6.93   0.000     1.296569    1.591618
                                             kentucky  |    1.28663    .063871     5.08   0.000     1.167342    1.418107
                                                maine  |      1.277   .0636633     4.90   0.000     1.158125    1.408077
                                             maryland  |   1.288955   .0537023     6.09   0.000     1.187884    1.398627
                                             michigan  |   1.181688   .0531026     3.72   0.000     1.082061    1.290489
                                            minnesota  |   1.142366   .0464107     3.28   0.001      1.05493    1.237049
                                          mississippi  |   1.696758   .4204956     2.13   0.033     1.043933    2.757828
                                             missouri  |   2.088194   .5271655     2.92   0.004     1.273165    3.424973
                                              montana  |   3.088685   .0716173    48.64   0.000     2.951459     3.23229
                                             nebraska  |   2.409374   .5923625     3.58   0.000     1.488093    3.901023
                                               nevada  |   .9111464   .0392013    -2.16   0.031     .8374637     .991312
                                        new hampshire  |     1.6939   .4166473     2.14   0.032     1.045968    2.743198
                                           new jersey  |   .7421504   .0333845    -6.63   0.000     .6795195    .8105539
                                           new mexico  |   .6808933   .0389006    -6.73   0.000     .6087633    .7615696
                                             new york  |   .6984691   .0316178    -7.93   0.000     .6391689    .7632709
                                       north carolina  |   .8750799   .0514524    -2.27   0.023     .7798288    .9819653
                                         north dakota  |   3.846507   1.003201     5.17   0.000     2.307098    6.413085
                                             oklahoma  |    2.05175   .4975149     2.96   0.003     1.275623    3.300096
                                               oregon  |   1.071745   .0395717     1.88   0.061      .996926    1.152179
                                         pennsylvania  |   .9801415   .0545483    -0.36   0.719     .8788534    1.093103
                                         rhode island  |   1.348261   .0562105     7.17   0.000     1.242471    1.463058
                                       south carolina  |   1.771705   .4343903     2.33   0.020     1.095701    2.864777
                                         south dakota  |   3.257725   .1041766    36.93   0.000      3.05981    3.468442
                                            tennessee  |   2.569322   .6398172     3.79   0.000      1.57707    4.185876
                                                texas  |   1.090535    .016872     5.60   0.000     1.057963     1.12411
                                                 utah  |   1.819852   .4290132     2.54   0.011     1.146498    2.888677
                                              vermont  |   1.629344   .0469154    16.95   0.000     1.539939    1.723941
                                             virginia  |   1.203149   .0582894     3.82   0.000      1.09416    1.322994
                                           washington  |   .9361789   .0423765    -1.46   0.145     .8567002    1.023031
                                        west virginia  |   1.080596   .0134888     6.21   0.000     1.054479     1.10736
                                            wisconsin  |   2.026446    .101592    14.09   0.000     1.836799    2.235674
                                              wyoming  |   3.363907   .8287523     4.92   0.000     2.075567     5.45194
                                                       |
                                            year_month |
                                                  733  |   .9127366   .2842912    -0.29   0.769     .4957021    1.680623
                                                  734  |   1.112773   .2918952     0.41   0.684     .6654649    1.860751
                                                  735  |   .8753334   .1627849    -0.72   0.474     .6079619     1.26029
                                                  736  |   .9866407   .2150502    -0.06   0.951     .6436198    1.512477
                                                  737  |   1.071133   .3277649     0.22   0.822     .5879998    1.951235
                                                  738  |   1.108692   .4308007     0.27   0.791     .5176811     2.37443
                                                  739  |   1.314933    .401818     0.90   0.370     .7224249    2.393394
                                                       |
                                                 _cons |   .2814168   .0549395    -6.49   0.000     .1919439    .4125966
                                ----------------------------------------------------------------------------------------
                                Note: _cons estimates baseline odds.
                                
                                . logit reemp3 (i.hid i.cutoff3)#i.postperiod i.hid#i.cutoff3#i.postperiod if sampall==1 & age>=18 
                                > & age<65 [pw=wtfinl], vce(cluster statefip) or
                                
                                note: 1.cutoff3#1.postperiod omitted because of collinearity.
                                Iteration 0:   log pseudolikelihood =  -12808450  
                                Iteration 1:   log pseudolikelihood =  -12732009  
                                Iteration 2:   log pseudolikelihood =  -12730156  
                                Iteration 3:   log pseudolikelihood =  -12730156  
                                
                                Logistic regression                                     Number of obs =  7,000
                                                                                        Wald chi2(7)  =  77.23
                                                                                        Prob > chi2   = 0.0000
                                Log pseudolikelihood = -12730156                        Pseudo R2     = 0.0061
                                
                                                                        (Std. err. adjusted for 44 clusters in statefip)
                                ----------------------------------------------------------------------------------------
                                                       |               Robust
                                                reemp3 | Odds ratio   std. err.      z    P>|z|     [95% conf. interval]
                                -----------------------+----------------------------------------------------------------
                                        hid#postperiod |
                                                  0 1  |   1.734904   .2493588     3.83   0.000     1.308976    2.299425
                                                  1 0  |   1.244449   .2221431     1.23   0.221     .8770644    1.765723
                                                  1 1  |   1.962225   .3193424     4.14   0.000     1.426329    2.699464
                                                       |
                                    cutoff3#postperiod |
                                                  0 1  |   .6773208   .1055163    -2.50   0.012      .499103    .9191761
                                                  1 0  |   1.344424   .1584871     2.51   0.012      1.06707     1.69387
                                                  1 1  |          1  (omitted)
                                                       |
                                hid#cutoff3#postperiod |
                                                1 1 0  |   .7361788   .1609152    -1.40   0.161     .4796519    1.129901
                                                1 1 1  |   1.386958   .2702841     1.68   0.093     .9466399    2.032083
                                                       |
                                                 _cons |   .2529017   .0174382   -19.94   0.000     .2209324    .2894971
                                ----------------------------------------------------------------------------------------
                                Note: _cons estimates baseline odds.
                                Maybe it's worth just confirming that I coded everything correctly: POSTPERIOD!=. refers to an 8-month period, January to August 2021; POSTPERIOD==0 refers to January to June; POSTPERIOD==1 refers to July and August 2021 (the "treatment" period). CUTOFF3 refers to the sample group of states -- those that cut off a series of federal policies starting July (19 states) coded CUTOFF3==1; those that didn't cut them off (25 states) coded CUTOFF3==0. HID refers to states with a particular state-level policy in place. There are 11 states with HID==1 & CUTOFF3==1 (8 with HID==0); there are 7 states with HID==1 & CUTOFF==0 (18 states with HID==0). I may just have to give up on this strategy; I just don't know...

                                Comment

                                Working...
                                X