Announcement

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

  • adding the country -specific time trends as control

    hello and good day to all,
    I am using the local projection method for my thesis, (panel data ) , I do not know how can I add the country-specific time trends as control, in terms of the robustness check of my estimation. my adviser told me to do some robustness check like this . I hope I receive your advice,

    my baseline estimation is as follow:

    Code:
    local hmax = 5
    forv h = 0/`hmax' {
    
    asdoc reghdfe lnfertility`h' l(0/2)dummy_hini l(1/2)lnfertility , absorb( i.ifscode i.year) vce(cluster ifscode)
    many thanks for your valuable time and advice.

    best regards ,

  • #2
    At

    https://www.stata.com/features/overview/factor-variables/

    there is statement

    If you want to interact a continuous variable with a factor variable, just prefix the continuous variable with c..
    but if that doesn't work with -reghdfe- , why not simply create a dummy for each country and multiply by the trend? Then add all the interactions as independent variables. Stata is quite fast and -reghdfe- is necessary only for humongous projects. Stata -reg- won't mind having 200 independent variables, and the additional computation time is unlikely to be significant. 1,000 variables would slow thing down but not so much as to be impractical. 10,000 is pushing the limits..

    Comment


    • #3
      @[email protected] thank you so much for your reply. I apologize if I ask again, maybe because I am a bit beginner. in my estimation " dummy_hini" is a dummy variable for years of HINI, and fertility is a continuous variable. now by adding the "country-specific time trends as control" it means I do some robustness check?
      it is panel data.
      -- does it make sense "country-specific time trends as control" work as a robustness check?

      --- if yes I become confused about to code that I have to write.

      many thanks in advance for your valuable time and advice.

      best regards,

      Comment


      • #4
        Khati:
        usually time trends imply to consider -timevar- (-year-, in your case) as a continuous variable rather than a categorical one.
        It is also advisable to explore whether turning points are detectable (that is, whether a non-linear relationship exists between -year- and the regressand).
        That said, I share Daniel's recommendation about creating an interaction, something like:
        Code:
        i.country##c.year##c.year
        Two further asides:
        - it would be wise to consider centering -year- before creatring the interaction (ie, subtracting its panel-specific mean);
        - you might have to reconsider your model as some perfect correlation with the fixed effects betwen brackets are expected.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Carlo Lazzaro thank you so much for your reply.

          If it is possiable I am so thankful to receive further advice about the way I want to do.

          in my model I am interesting to use the Placebo test , to see the evaluation of the fertility before the pandemic( in my case is named "dummy_hini")
          I read about it , as my estimation is fixed effect and the regression is what I mentioned . I don't know how do I do it and what should I do . I underestood theoretically but unfortunately when I want to run I become confused.

          I am so thankful to receive your advice .

          Many thanks for your valuable time and advice.

          Best regards,

          Comment


          • #6
            Khati:
            I would imagine something along the following lines:
            Code:
            reghdfe lnfertility`h' l(0/2)dummy_hini l(1/2)lnfertility i.country##c.year##c.year, absorb( i.ifscode) vce(cluster ifscode)
            The two previous asides still apply:
            - it would be wise to consider centering -year- before creatring the interaction (ie, subtracting its panel-specific mean);
            - you might have to reconsider your model as some perfect correlation with the fixed effects betwen brackets are expected.

            Basically, I think you've to challenge yourself with the abovementioned code and see whether there's something else to change in your original code to accomodate the interaction.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Carlo Lazzaro many thanks for your reply.

              But in terms of the Placebo testing , that I mean in terms of the evaluating the fertility before pandemic, in the fixed effect I have problem .
              I am chalenging to do 2 or even more robustness check, one by previous valuable advice and using the interaction, and now I try to see what's happen .
              but in another test Placebo test I don't know how can I do! I understand it ,I hope . But I don't know why when I want to run I cannot.
              I am so thankful to receive your advice.
              However I check in terms of the spesification of my model and it was correct and now I am dealing with these to check.

              many thanks for valuable time and advice.

              Comment


              • #8
                Khati:
                what if in another -reghdfe- model you replace in the interaction -i.country- with -1(0/2) dummy_hini-?
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  @Carlo Lazzaro thank you so much for your reply. these are my results:
                  Code:
                  reghdfe f(0).lnfertility l(0/2)dum_recession l(1/2)lnfertility , absorb( i.ifscode i.year) vce(cluster ifscode)

                  Code:
                  HDFE Linear regression                            Number of obs   =      3,116
                  Absorbing 2 HDFE groups                           F(   5,    141) =    6592.37
                  Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                                    R-squared       =     0.9998
                                                                    Adj R-squared   =     0.9998
                                                                    Within R-sq.    =     0.9493
                  Number of clusters (ifscode) =        142         Root MSE        =     0.0190
                  
                                                 (Std. Err. adjusted for 142 clusters in ifscode)
                  -------------------------------------------------------------------------------
                                |               Robust
                    lnfertility |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  --------------+----------------------------------------------------------------
                  dum_recession |
                            --. |  -.0013254   .0015998    -0.83   0.409    -.0044881    .0018372
                            L1. |  -.0015468   .0011184    -1.38   0.169    -.0037579    .0006642
                            L2. |    .000273   .0010136     0.27   0.788    -.0017309    .0022769
                                |
                    lnfertility |
                            L1. |   1.316072   .0545001    24.15   0.000     1.208329    1.423815
                            L2. |    -.36521   .0512967    -7.12   0.000    -.4666201      -.2638
                                |
                          _cons |   .8267416   .1036365     7.98   0.000     .6218594    1.031624
                  -------------------------------------------------------------------------------
                  
                  Absorbed degrees of freedom:
                  -----------------------------------------------------+
                   Absorbed FE | Categories  - Redundant  = Num. Coefs |
                  -------------+---------------------------------------|
                       ifscode |       142         142           0    *|
                          year |        22           0          22     |
                  -----------------------------------------------------+
                  * = FE nested within cluster; treated as redundant for DoF computation
                  the second "i delete some part here to reduce the space "
                  Code:
                  reghdfe f(0).lnfertility l(0/2)dum_recession l(1/2)lnfertility i.ifscode##c.year##c.year, absorb( i.ifscode ) vce(cluster ifscode)
                  Code:
                  HDFE Linear regression                            Number of obs   =      3,116
                  Absorbing 1 HDFE group                            F( 289,    141) =          .
                  Statistics robust to heteroskedasticity           Prob > F        =          .
                                                                    R-squared       =     0.9999
                                                                    Adj R-squared   =     0.9999
                                                                    Within R-sq.    =     0.9730
                  Number of clusters (ifscode) =        142         Root MSE        =     0.0170
                  
                                                         (Std. Err. adjusted for 142 clusters in ifscode)
                  ---------------------------------------------------------------------------------------
                                        |               Robust
                            lnfertility |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  ----------------------+----------------------------------------------------------------
                          dum_recession |
                                    --. |  -.0011683   .0012788    -0.91   0.362    -.0036963    .0013598
                                    L1. |  -.0017493   .0009837    -1.78   0.078     -.003694    .0001954
                                    L2. |  -.0014392   .0009009    -1.60   0.112    -.0032202    .0003417
                                        |
                            lnfertility |
                                    L1. |   .9268426   .0606532    15.28   0.000     .8069354     1.04675
                                    L2. |  -.1757083   .0581169    -3.02   0.003    -.2906014   -.0608152
                                        |
                                ifscode |
                                   112  |          0  (omitted)
                                   122  |          0  (omitted)
                                   124  |          0  (omitted)
                                   128  |          0  (omitted)
                                   132  |          0  (omitted)
                                   134  |          0  (omitted)
                                   136  |          0  (omitted)
                                   138  |          0  (omitted)
                                   142  |          0  (omitted)
                                   144  |          0  (omitted)
                                   146  |          0  (omitted)
                                   156  |          0  (omitted)
                                   158  |          0  (omitted)
                                   172  |          0  (omitted)
                                     |
                                   year |   .7701481   .1158359     6.65   0.000     .5411485    .9991477
                                        |
                         ifscode#c.year |
                                   112  |   1.202214   .0983473    12.22   0.000     1.007789     1.39664
                                   122  |  -.4316194   .1567109    -2.75   0.007     -.741426   -.1218127
                                   124  |   .9874051   .0513702    19.22   0.000     .8858498     1.08896
                                   128  |  -.1841739    .064904    -2.84   0.005    -.3124847   -.0558632
                                   132  |   .3507392   .0238882    14.68   0.000     .3035138    .3979645
                                   134  |   -1.29308   .1940718    -6.66   0.000    -1.676747   -.9094134
                  Code:
                                     |
                          c.year#c.year |   -.000192   .0000288    -6.66   0.000     -.000249    -.000135
                                        |
                  ifscode#c.year#c.year |
                                   112  |  -.0002986   .0000245   -12.19   0.000     -.000347   -.0002502
                                   122  |   .0001083    .000039     2.77   0.006     .0000311    .0001855
                                   124  |  -.0002454   .0000128   -19.20   0.000    -.0002707   -.0002202
                                   128  |   .0000462   .0000162     2.86   0.005     .0000143    .0000782
                                   132  |  -.0000868   5.96e-06   -14.58   0.000    -.0000986    -.000075
                                   134  |   .0003227   .0000483     6.68   0.000     .0002271    .0004183
                                   136  |  -.0003202   .0000148   -21.67   0.000    -.0003494    -.000291

                  and thee last :
                  Code:
                  reghdfe f(0).lnfertility i.ifscode## l(0/2)dum_recession l(1/2)lnfertility , absorb( i.ifscode i.year) vce(cluster ifscode)

                  Code:
                  HDFE Linear regression                            Number of obs   =      3,116
                  Absorbing 2 HDFE groups                           F( 418,    141) =          .
                  Statistics robust to heteroskedasticity           Prob > F        =          .
                                                                    R-squared       =     0.9999
                                                                    Adj R-squared   =     0.9998
                                                                    Within R-sq.    =     0.9592
                  Number of clusters (ifscode) =        142         Root MSE        =     0.0183
                  
                                                            (Std. Err. adjusted for 142 clusters in ifscode)
                  ------------------------------------------------------------------------------------------
                                           |               Robust
                               lnfertility |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  -------------------------+----------------------------------------------------------------
                                   ifscode |
                                      112  |          0  (omitted)
                                      122  |          0  (omitted)
                                      124  |          0  (omitted)
                                      128  |          0  (omitted)
                                      132  |          0  (omitted)
                                      134  |          0  (omitted)
                       1.dum_recession |  -.0094881   .0014007    -6.77   0.000    -.0122572   -.0067191
                                           |
                           L.dum_recession |
                                        1  |  -.0184645   .0011252   -16.41   0.000    -.0206889   -.0162401
                                           |
                          L2.dum_recession |
                                        1  |  -.0092814   .0017303    -5.36   0.000    -.0127021   -.0058608
                                           |
                     ifscode#dum_recession |
                                    112 1  |   .0219358   .0005806    37.78   0.000     .0207881    .0230835
                                    122 1  |  -.0070678   .0013495    -5.24   0.000    -.0097356      -.0044
                                    124 1  |   .0066007   .0025396     2.60   0.010     .0015802    .0116213
                                    128 1  |  -.0051546   .0020429    -2.52   0.013    -.0091933   -.0011159
                                    132 1  |   .0094328   .0009712     9.71   0.000     .0075128    .0113528
                  
                                        1  |  -.0092814   .0017303    -5.36   0.000    -.0127021   -.0058608
                                           |
                     ifscode#dum_recession |
                                    112 1  |   .0219358   .0005806    37.78   0.000     .0207881    .0230835
                                    122 1  |  -.0070678   .0013495    -5.24   0.000    -.0097356      -.0044
                                    124 1  |   .0066007   .0025396     2.60   0.010     .0015802    .0116213
                                    128 1  |  -.0051546   .0020429    -2.52   0.013    -.0091933   -.0011159
                                    132 1  |   .0094328   .0009712     9.71   0.000     .0075128    .0113528
                                    134 1  |   .0027178   .0010994     2.47   0.015     .0005443    .0048912
                                    136 1  |   .0077008   .0010595     7.27   0.000     .0056062    .0097955
                                    138 1  |  -.0055421   .0013525    -4.10   0.000    -.0082158   -.0028684
                                    142 1  |   .0216603   .0036928     5.87   0.000       .01436    .0289607
                                    144 1  |   .0175783   .0011186    15.71   0.000     .0153669    .0197897
                                    146 1  |   .0248947    .001485    16.76   0.000     .0219589    .0278305
                                    156 1  |   .0104841   .0011642     9.01   0.000     .0081826    .0127856
                                    158 1  |   .0077476   .0022326     3.47   0.001     .0033338    .0121614
                                    172 1  |   .0089601   .0011608     7.72   0.000     .0066653    .0112549
                                    174 1  |   .0220988   .0013673    16.16   0.000     .0193958    .0248018
                                    178 1  |   .0093952   .0037131     2.53   0.012     .0020548    .0167357
                                    182 1  |  -.0402799   .0022054   -18.26   0.000    -.0446399     -.03592
                                    184 1  |  -.0038044   .0012204    -3.12   0.002    -.0062172   -.0013917
                                    186 1  |   .0122282   .0016754     7.30   0.000      .008916    .0155403
                                    193 1  |   .0058021   .0020443     2.84   0.005     .0017607    .0098436
                                    196 1  |   .0017512   .0025138     0.70   0.487    -.0032184    .0067207
                                    199 1  |   .0139528   .0016655     8.38   0.000     .0106603    .0172452
                                    213 1  |   .0109575   .0014223     7.70   0.000     .0081457    .0137693
                                    218 1  |   .0062407   .0012205     5.11   0.000      .003828    .0086535
                                    223 1  |   .0124039   .0014561     8.52   0.000     .0095252    .0152826
                                    228 1  |   .0108287   .0014679     7.38   0.000     .0079268    .0137306
                                    233 1  |   .0151788   .0016093     9.43   0.000     .0119973    .0183603
                                    238 1  |   .0134144   .0015196     8.83   0.000     .0104103    .0164184
                                    243 1  |   .0097257   .0012233     7.95   0.000     .0073073     .012144
                                    248 1  |   .0138735   .0016452     8.43   0.000     .0106211    .0171258
                                    253 1  |   .0096791   .0015856     6.10   0.000     .0065445    .0128136
                                    258 1  |   .0051429   .0012489     4.12   0.000     .0026738    .0076119
                                    263 1  |   .0099982   .0015511     6.45   0.000     .0069317    .0130647
                                    268 1  |   .0144905    .001699     8.53   0.000     .0111316    .0178493
                                    273 1  |   .0161362   .0020973     7.69   0.000     .0119901    .0202823
                                    278 1  |   .0117638   .0015481     7.60   0.000     .0087034    .0148242
                                    283 1  |   .0119612    .001348     8.87   0.000     .0092964    .0146261
                                    288 1  |   .0120495   .0016052     7.51   0.000     .0088763    .0152228
                                    293 1  |   .0100959    .001623     6.22   0.000     .0068872    .0133045
                                    298 1  |   .0144597   .0018065     8.00   0.000     .0108883     .018031
                                    299 1  |    .010999    .001429     7.70   0.000     .0081739    .0138241
                                    343 1  |   .0034659   .0007296     4.75   0.000     .0020235    .0049083
                                    429 1  |     .02881   .0031954     9.02   0.000     .0224928    .0351272
                                    433 1  |   .0113177   .0016326     6.93   0.000     .0080902    .0145452
                                    436 1  |   .0089193   .0022051     4.04   0.000     .0045599    .0132787
                                    439 1  |   .0247828   .0022934    10.81   0.000     .0202489    .0293167
                                    443 1  |   .0112768   .0018196     6.20   0.000     .0076796    .0148741
                                    446 1  |   .0192683    .001646    11.71   0.000     .0160143    .0225223
                                    449 1  |   .0091778   .0010537     8.71   0.000     .0070946    .0112609
                                    453 1  |   .0354367   .0032464    10.92   0.000     .0290188    .0418545
                                    456 1  |   .0145474   .0018392     7.91   0.000     .0109115    .0181833
                                    466 1  |   .0259293   .0031786     8.16   0.000     .0196455    .0322131
                                    469 1  |   .0306169    .002438    12.56   0.000     .0257971    .0354366
                                    474 1  |   .0064403   .0008458     7.61   0.000     .0047681    .0081124
                                    512 1  |   .0064266   .0019538     3.29   0.001     .0025641    .0102891
                                    513 1  |   .0067945   .0018315     3.71   0.000     .0031736    .0104153
                                    518 1  |   .0027406   .0019232     1.43   0.156    -.0010614    .0065427
                                    522 1  |   .0081886   .0018254     4.49   0.000     .0045799    .0117974
                                    524 1  |   .0174479   .0022089     7.90   0.000      .013081    .0218147
                                    532 1  |  -.0209738   .0015706   -13.35   0.000    -.0240788   -.0178689
                                    534 1  |   .0092797   .0015957     5.82   0.000      .006125    .0124343
                                    536 1  |   .0131025   .0018854     6.95   0.000     .0093753    .0168297
                                    542 1  |   .0530192   .0012898    41.11   0.000     .0504694    .0555689
                                    544 1  |   .0094016   .0018453     5.09   0.000     .0057536    .0130496
                                    548 1  |   .0090883   .0015141     6.00   0.000      .006095    .0120816
                                    558 1  |   .0067583   .0018253     3.70   0.000     .0031498    .0103669
                                    564 1  |    .009951   .0018232     5.46   0.000     .0063467    .0135553
                                    566 1  |   .0171517     .00195     8.80   0.000     .0132966    .0210068
                                    576 1  |  -.0799986   .0032928   -24.30   0.000    -.0865082    -.073489
                                    578 1  |   .0100481   .0013808     7.28   0.000     .0073184    .0127778
                                    582 1  |    .011339   .0016031     7.07   0.000     .0081698    .0145081
                                    612 1  |   .0263761   .0027201     9.70   0.000     .0209987    .0317535
                                    614 1  |   .0152669   .0017777     8.59   0.000     .0117525    .0187812
                                    616 1  |   .0153784   .0016022     9.60   0.000     .0122109    .0185459
                                    618 1  |   .0082761   .0014743     5.61   0.000     .0053615    .0111907
                                    622 1  |   .0133503   .0019245     6.94   0.000     .0095456    .0171549
                                    626 1  |   .0144331   .0024354     5.93   0.000     .0096184    .0192477
                                    628 1  |   .0130822   .0017484     7.48   0.000     .0096258    .0165386
                                    634 1  |   .0108157   .0016408     6.59   0.000      .007572    .0140594
                                    636 1  |   .0102415   .0017616     5.81   0.000     .0067589    .0137241
                                    638 1  |          0  (empty)
                                    643 1  |    .012889   .0018799     6.86   0.000     .0091725    .0166054
                                    644 1  |   .0153372   .0021126     7.26   0.000     .0111607    .0195136
                                    646 1  |  -.0009445    .001316    -0.72   0.474    -.0035461     .001657
                                    648 1  |   .0055059   .0013415     4.10   0.000     .0028537     .008158
                                    652 1  |    .015359   .0019189     8.00   0.000     .0115655    .0191526
                                    654 1  |   .0073588   .0017985     4.09   0.000     .0038033    .0109142
                                    656 1  |   .0049106   .0009563     5.14   0.000     .0030201    .0068011
                                    662 1  |   .0080125   .0014245     5.62   0.000     .0051963    .0108287
                                    664 1  |   .0107652   .0019301     5.58   0.000     .0069496    .0145808
                                    666 1  |   .0133842   .0020495     6.53   0.000     .0093325    .0174359
                                    668 1  |   .0002118    .000935     0.23   0.821    -.0016367    .0020603
                                    672 1  |   .0110766   .0016899     6.55   0.000     .0077358    .0144174
                                    674 1  |   .0086334   .0015043     5.74   0.000     .0056595    .0116074
                                    676 1  |   .0191826   .0024923     7.70   0.000     .0142554    .0241097
                                    678 1  |   .0057264    .000825     6.94   0.000     .0040955    .0073573
                                    682 1  |   .0042501   .0018309     2.32   0.022     .0006305    .0078697
                                    686 1  |   .0214315     .00209    10.25   0.000     .0172997    .0255634
                                    688 1  |   .0108245   .0018795     5.76   0.000     .0071088    .0145402
                                    692 1  |  -.0016925   .0031572    -0.54   0.593     -.007934    .0045489
                                    694 1  |   .0085333   .0008934     9.55   0.000     .0067672    .0102994
                                    698 1  |   .0060564   .0015836     3.82   0.000     .0029258    .0091871
                                    714 1  |   .0018898   .0019635     0.96   0.337    -.0019919    .0057715
                                    722 1  |    .004867    .001433     3.40   0.001     .0020341    .0076999
                                    724 1  |   .0080212   .0013293     6.03   0.000     .0053933    .0106491
                                    728 1  |   .0182595   .0020919     8.73   0.000      .014124    .0223949
                                    732 1  |   .0126681   .0015243     8.31   0.000     .0096548    .0156815
                                    738 1  |   .0111565   .0019134     5.83   0.000     .0073739     .014939
                                    742 1  |    .009815   .0018893     5.20   0.000       .00608    .0135501
                                    744 1  |   .0207907    .001981    10.50   0.000     .0168744     .024707
                                    746 1  |   .0125311    .001941     6.46   0.000     .0086938    .0163683
                                    748 1  |          0  (empty)
                                    754 1  |   .0139835   .0020707     6.75   0.000     .0098899    .0180772
                                    853 1  |   .0112024   .0018227     6.15   0.000     .0075991    .0148057
                                    911 1  |   .0111548   .0019024     5.86   0.000      .007394    .0149157
                                    912 1  |  -.0010319   .0017195    -0.60   0.549    -.0044313    .0023676
                                    913 1  |   .0220925   .0020727    10.66   0.000     .0179949    .0261901
                                    914 1  |   .0219062   .0019185    11.42   0.000     .0181134    .0256989
                                    915 1  |    .020563   .0027954     7.36   0.000     .0150367    .0260893
                                    916 1  |  -.0983044   .0018389   -53.46   0.000    -.1019399    -.094669
                                    917 1  |    .004686    .001872     2.50   0.013     .0009853    .0083868
                                    918 1  |   .0862602   .0029589    29.15   0.000     .0804107    .0921097
                                    921 1  |   .0066885    .001819     3.68   0.000     .0030924    .0102846
                                    922 1  |   .0116018   .0024709     4.70   0.000      .006717    .0164865
                                    923 1  |    .016432   .0019715     8.33   0.000     .0125345    .0203295
                                    924 1  |   .0070047    .001006     6.96   0.000     .0050159    .0089936
                                    925 1  |          0  (empty)
                                    926 1  |  -.0058966   .0033402    -1.77   0.080    -.0124999    .0007067
                                    927 1  |          0  (empty)
                                    935 1  |  -.0014177   .0012926    -1.10   0.275     -.003973    .0011377
                                    936 1  |   .0266758   .0021015    12.69   0.000     .0225212    .0308304
                                    941 1  |  -.0162989   .0022486    -7.25   0.000    -.0207443   -.0118536
                                    944 1  |   .0314296   .0011475    27.39   0.000     .0291609    .0336982
                                    946 1  |    .017938   .0033484     5.36   0.000     .0113185    .0245575
                                    948 1  |   .0177718   .0019178     9.27   0.000     .0139804    .0215632
                                    960 1  |   .0238572   .0015067    15.83   0.000     .0208786    .0268358
                                    961 1  |   -.013943   .0035327    -3.95   0.000    -.0209269    -.006959
                                    962 1  |   .0169512   .0017464     9.71   0.000     .0134985    .0204038
                                    963 1  |   .0109994    .001588     6.93   0.000       .00786    .0141389
                                    964 1  |  -.0004089     .00467    -0.09   0.930    -.0096413    .0088234
                                    968 1  |    .006755   .0026267     2.57   0.011     .0015621    .0119479
                                           |
                   ifscode#L.dum_recession |
                                    112 1  |   .0144857   .0016985     8.53   0.000     .0111279    .0178434
                                    122 1  |   .0357219   .0011919    29.97   0.000     .0333656    .0380781
                                    124 1  |   .0339151   .0021178    16.01   0.000     .0297284    .0381019
                                    128 1  |   .0373216    .001534    24.33   0.000      .034289    .0403541
                                    132 1  |   .0258757   .0010285    25.16   0.000     .0238423    .0279091
                                    134 1  |   .0282798   .0010517    26.89   0.000     .0262007     .030359
                                    136 1  |   .0226647    .000966    23.46   0.000     .0207549    .0245744
                                    138 1  |   .0258774   .0010961    23.61   0.000     .0237106    .0280443
                                          |
                  ifscode#L2.dum_recession |
                                    112 1  |   .0134589   .0013683     9.84   0.000     .0107538     .016164
                                    122 1  |   .0013534   .0024328     0.56   0.579     -.003456    .0061628
                                    124 1  |  -.0095588   .0033774    -2.83   0.005    -.0162357   -.0028819
                                    128 1  |  -.0250644   .0019972   -12.55   0.000    -.0290128   -.0211161
                                  |
                               lnfertility |
                                       L1. |   1.287877   .0605922    21.25   0.000     1.168091    1.407664
                                       L2. |  -.3357204   .0573512    -5.85   0.000    -.4490998    -.222341
                                           |
                                     _cons |   .8049052   .1109069     7.26   0.000     .5856498     1.02416
                  ------------------------------------------------------------------------------------------
                  I am so thankful to recieve the interpreter . i think the first estimation is more robust)
                  moreover you mention to this point that "
                  - it would be wise to consider centering -year- before creatring the interaction (ie, subtracting its panel-specific mean)" , unfortunately I do not know how should I do it in Stata.

                  many thanks for your valuable time and advice .

                  best regards ,
                  Last edited by Khati Zolfaghari; 09 Aug 2021, 15:37.

                  Comment


                  • #10
                    Khati:
                    the main issue here, shared by all the models, is that you probably have some quasi-extreme multicollinearity issues.
                    I suspect it from the sky-rocketing R_sq within coupled with a half of coefficients that do not reach statistical significance (1st model).
                    The issuse is the same with the two last models, that, in addition, include too many parameters (and this makes your model really difficult to explain to your audience).
                    Hence, I would go for a more parsimonious model in testing for robustness:
                    Code:
                    reghdfe f(0).lnfertility l(0/2)dum_recession l(1/2)lnfertility  c.year##c.year, absorb( i.ifscode ) vce(cluster ifscode)
                    as -i.ifscode- when included in the interaction is actually omitted,

                    And you can replicate the same approach for the Placebo Group.
                    As an aside, I do not think there's need for centering -year- before interaction.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      @Carlo Lazzaro thank you so much for your reply. based on your valuable advice , I did as follow:
                      Code:
                      reghdfe f(0).lnfertility l(0/2)dum_recession l(1/2)lnfertility c.year##c.year, absorb( i.ifscode ) vce(cluster ifscode)
                      and this is my result:
                      Code:
                      HDFE Linear regression                            Number of obs   =      3,116
                      Absorbing 1 HDFE group                            F(   7,    141) =    6362.70
                      Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                                        R-squared       =     0.9998
                                                                        Adj R-squared   =     0.9998
                                                                        Within R-sq.    =     0.9613
                      Number of clusters (ifscode) =        142         Root MSE        =     0.0194
                      
                                                     (Std. Err. adjusted for 142 clusters in ifscode)
                      -------------------------------------------------------------------------------
                                    |               Robust
                        lnfertility |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                      --------------+----------------------------------------------------------------
                      dum_recession |
                                --. |   -.002172   .0014253    -1.52   0.130    -.0049898    .0006458
                                L1. |   -.002055   .0010383    -1.98   0.050    -.0041076   -2.33e-06
                                L2. |  -.0015105   .0009418    -1.60   0.111    -.0033723    .0003514
                                    |
                        lnfertility |
                                L1. |   1.299065   .0564496    23.01   0.000     1.187468    1.410662
                                L2. |  -.3490047   .0530449    -6.58   0.000    -.4538709   -.2441386
                                    |
                               year |     .34806   .0599631     5.80   0.000     .2295171    .4666029
                                    |
                      c.year#c.year |  -.0000865   .0000149    -5.80   0.000     -.000116    -.000057
                                    |
                              _cons |  -349.1136   60.21582    -5.80   0.000    -468.1561    -230.071
                      -------------------------------------------------------------------------------
                      
                      Absorbed degrees of freedom:
                      -----------------------------------------------------+
                       Absorbed FE | Categories  - Redundant  = Num. Coefs |
                      -------------+---------------------------------------|
                           ifscode |       142         142           0    *|
                      -----------------------------------------------------+
                      * = FE nested within cluster; treated as redundant for DoF computation


                      --- some point:
                      here it is based on the adding the time as control? (I am so thankful to recieve your advice if I am wrong)

                      -- for Placebo, unfortunately again I do not know what should I do in STATA , or maybe now I become a bit confused between Placebo and adding the year as an interaction term and interpretation. because in previous by adding the time interaction it means I add the time as control? now , for Placebo I do not know how to do ! and the exact differences. I apologize a lot.




                      ---you mention to this point that " there's need for centering -year- before interaction." , I apologize for this question. during which condition I have to do? and what is the best way to do ?

                      many thanks for your valuable time and advice,

                      best regards,

                      Comment


                      • #12
                        Khati:
                        1)
                        Code:
                        c.year##c.year
                        support your search from turning points concerning the relationship between -time- as a continuous variable (ie, -c.year-) and your regressand (and yes, you can considere it as a control).
                        gives back both coefficients (I mean the linear and the squared one) reaching statistical significant. Hence, your model has a turning point (a maximum) that you can identify by studying the first derivative:
                        Code:
                        di -( .34806/(2*-.0000865))
                        2011.9075
                        What above means that the non-linear (ie, squared) relationship between -time- and the regressand reaches a maximum in 2012 and then declines from 2012 on.
                        I think that this is a good point to comment on in your research report.
                        Again, forget my previous advice about centering and keep things as they are.
                        As far as what you call Placebo is concerned, you may want to try:
                        Code:
                        reghdfe lnfertility`h' l(0/2)dummy_hini##c.year l(1/2)lnfertility , absorb( i.ifscode) vce(cluster ifscode)
                        and see what Stata gives you back.
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment


                        • #13
                          @Carlo Lazzaro I am really thankful to receive your valuable advice and guidance to understand how can I mention to the point in my research. i did also the Placebo based on your valuable advice ,

                          Code:
                          reghdfe f(0).lnfertility l(0/2)dum_recession##c.year l(1/2)lnfertility , absorb( i.ifscode ) vce(cluster ifscode)
                          and this is my result:
                          Code:
                          HDFE Linear regression                            Number of obs   =      3,116
                          Absorbing 1 HDFE group                            F(   9,    141) =    5544.34
                          Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                                            R-squared       =     0.9998
                                                                            Adj R-squared   =     0.9998
                                                                            Within R-sq.    =     0.9604
                          Number of clusters (ifscode) =        142         Root MSE        =     0.0196
                          
                                                                   (Std. Err. adjusted for 142 clusters in ifscode)
                          -----------------------------------------------------------------------------------------
                                                  |               Robust
                                      lnfertility |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                          ------------------------+----------------------------------------------------------------
                                  1.dum_recession |  -.7334894   .4514924    -1.62   0.106    -1.626059    .1590802
                                                  |
                                  L.dum_recession |
                                               1  |   .4409399   .3392378     1.30   0.196      -.22971     1.11159
                                                  |
                                 L2.dum_recession |
                                               1  |   .0126148   .3334525     0.04   0.970     -.646598    .6718277
                                                  |
                                             year |   .0004041   .0001013     3.99   0.000     .0002039    .0006044
                                                  |
                             dum_recession#c.year |
                                               1  |   .0003644   .0002244     1.62   0.107    -.0000792     .000808
                                                  |
                           L.dum_recession#c.year |
                                               1  |  -.0002202   .0001689    -1.30   0.194    -.0005541    .0001136
                                                  |
                          L2.dum_recession#c.year |
                                               1  |  -6.74e-06   .0001659    -0.04   0.968    -.0003348    .0003213
                                                  |
                                      lnfertility |
                                              L1. |   1.329687   .0547504    24.29   0.000     1.221449    1.437924
                                              L2. |  -.3820503   .0511628    -7.47   0.000    -.4831956    -.280905
                                                  |
                                            _cons |   .0691466   .1713065     0.40   0.687    -.2695146    .4078079
                          -----------------------------------------------------------------------------------------
                          
                          Absorbed degrees of freedom:
                          -----------------------------------------------------+
                           Absorbed FE | Categories  - Redundant  = Num. Coefs |
                          -------------+---------------------------------------|
                               ifscode |       142         142           0    *|
                          -----------------------------------------------------+
                          * = FE nested within cluster; treated as redundant for DoF computation
                          - I do it for 5-time horizons to get the impulse response function. before using the Placebo the coefficient that was interesting to the IRF was the " dum_recession", but now when I consider here the result is inverse, I mean my graph before was decreasing but now it is increasing. ( again here for IRF I consider the coefficient of "dum_recession" h=0= -.7334894 and so on till h=5) . I apologize for asking, here because it considers randomly the result it would be inverse?


                          Code:
                          cap drop b u d Years Zero
                          gen Years =_n-1 if _n<=`hmax'
                          gen Zero = 0   if _n <=`hmax'
                          gen b=0
                          gen u=0
                          gen d=0
                          local hmax = 5
                          
                          forv h = 0/`hmax' {
                          
                          asdoc reghdfe lnfertility`h' l(0/2)dum_recession##c.year l(1/2)lnfertility , absorb( i.ifscode ) vce(cluster ifscode) nest reset dec(4)
                          replace b = _b[dum_recession]                    if _n == `h'+1
                          replace u = _b[dum_recession] + 1.645* _se[dum_recession]  if _n == `h'+1
                          replace d = _b[dum_recession] - 1.645* _se[dum_recession]  if _n == `h'+1
                          }
                          many thanks for your valuable time and advice.

                          Best regards,

                          Comment


                          • #14
                            Khati:
                            the results of -dum_recession_ changed due to the interaction.
                            It would seem that -year- reaches statistical significance when -1.dum_recession-.
                            Again, what hits reader's eyes is that the -dum_recession- predictor does not seem to have any role in explaining the variation of the regressand.
                            Kind regards,
                            Carlo
                            (Stata 19.0)

                            Comment


                            • #15
                              @Carlo Lazzaro many thanks for your valuable time and advice.

                              best regards.

                              Comment

                              Working...
                              X