Announcement

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

  • Significant variable in panel regression but not in regression year by year

    Dear Stata users,
    I need your point of view about this subject. I run a xtlogit regression with the following code
    Code:
      xtlogit a001 l2.a016 l2.a017 l2.a020_new l2.i.Cooperation_i l2.i.Patents l2.i.Formal_protection l2.i.Uncertainty_1 l2.i.Lack_of_demand_1 l2.i.a023 l2.i.a019 l2.i.a018 l2.a041_l2_imput i.anyo if KIBS==1, nolog i(ident)
    And the output is:
    Code:
     Random-effects logistic regression              Number of obs     =      5,291
    Group variable: ident                           Number of groups  =      1,132
    
    Random effects u_i ~ Gaussian                   Obs per group:
                                                                  min =          1
                                                                  avg =        4.7
                                                                  max =          7
    
    Integration method: mvaghermite                 Integration pts.  =         12
    
                                                    Wald chi2(18)     =     253.45
    Log likelihood  = -1973.5183                    Prob > chi2       =     0.0000
    
    --------------------------------------------------------------------------------------
                    a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ---------------------+----------------------------------------------------------------
                    a016 |
                     L2. |   1.259905   .5905704     2.13   0.033     .1024086    2.417402
                         |
                    a017 |
                     L2. |  -.6262536   .1702988    -3.68   0.000    -.9600332    -.292474
                         |
                a020_new |
                     L2. |    .568769   .0815715     6.97   0.000     .4088919    .7286461
                         |
        L2.Cooperation_i |
                      1  |   1.113954   .1598741     6.97   0.000     .8006067    1.427302
                         |
              L2.Patents |
                      1  |   .7914137     .24456     3.24   0.001     .3120848    1.270743
                         |
    L2.Formal_protection |
                      1  |   .3822348   .1641714     2.33   0.020     .0604647    .7040048
                         |
        L2.Uncertainty_1 |
                      1  |  -.0765705   .1571487    -0.49   0.626    -.3845763    .2314353
                         |
     L2.Lack_of_demand_1 |
                      1  |  -.8825044   .3400314    -2.60   0.009    -1.548954    -.216055
                         |
                 L2.a023 |
                      1  |   .0715742   .1784459     0.40   0.688    -.2781734    .4213218
                         |
                 L2.a019 |
                      1  |   .7478324    .154126     4.85   0.000     .4457509    1.049914
                         |
                 L2.a018 |
                      1  |  -.4510715   .2307392    -1.95   0.051     -.903312     .001169
                         |
           a041_l2_imput |
                     L2. |     .05995   .0655042     0.92   0.360    -.0684358    .1883358
                         |
                    anyo |
                   2007  |  -.1587466    .300931    -0.53   0.598    -.7485606    .4310674
                   2008  |  -.5519556    .326635    -1.69   0.091    -1.192148    .0882373
                   2009  |  -.8064692   .3364888    -2.40   0.017    -1.465975   -.1469632
                   2010  |  -.8347762   .3226738    -2.59   0.010    -1.467205   -.2023471
                   2011  |  -.9288709   .3251345    -2.86   0.004    -1.566123   -.2916189
                   2012  |   -.894516    .326696    -2.74   0.006    -1.534828   -.2542036
                         |
                   _cons |   3.227972   .7576384     4.26   0.000     1.743028    4.712916
    ---------------------+----------------------------------------------------------------
                /lnsig2u |   2.549213   .1175276                      2.318863    2.779563
    ---------------------+----------------------------------------------------------------
                 sigma_u |   3.577293   .2102154                       3.18812    4.013972
                     rho |   .7954939   .0191198                      .7554724    .8304352
    --------------------------------------------------------------------------------------
    LR test of rho=0: chibar2(01) = 1270.48                Prob >= chibar2 = 0.000
    We can see how the variables a016 (with 2 lags) is significant (p=0.06). However, when I run the regression year by year instead of the panel, this variable is not significant in any year, why? At least in a year it should be significant, shouldn't it?
    Code:
    . . logit a001 l2.a016 l2.a017 l2.a020_new l2.Cooperation_i l2.Patents l2.Formal_protection l2.Uncertainty_1  l2.Lack_of_demand_1 l2.a023 l2.a019 l2.a018 l2.a041_l2_imput if KIBS==1 & anyo==2006 , nolog vce(robust)
    note: L2.a041_l2_imput omitted because of collinearity
    
    Logistic regression                             Number of obs     =        622
                                                    Wald chi2(11)     =      98.63
                                                    Prob > chi2       =     0.0000
    Log pseudolikelihood = -299.34763               Pseudo R2         =     0.1961
    
    -----------------------------------------------------------------------------------
                      |               Robust
                 a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
                 a016 |
                  L2. |  -.1112366   .7128861    -0.16   0.876    -1.508468    1.285995
                      |
                 a017 |
                  L2. |  -.1826609   .1747374    -1.05   0.296    -.5251399    .1598181
                      |
             a020_new |
                  L2. |   .3366679    .111882     3.01   0.003     .1173832    .5559526
                      |
        Cooperation_i |
                  L2. |   .9712777   .2326144     4.18   0.000     .5153618    1.427194
                      |
              Patents |
                  L2. |   .7099016   .3366658     2.11   0.035     .0500488    1.369754
                      |
    Formal_protection |
                  L2. |   .5488279   .2504874     2.19   0.028     .0578816    1.039774
                      |
        Uncertainty_1 |
                  L2. |  -.6255862    .253396    -2.47   0.014    -1.122233   -.1289391
                      |
     Lack_of_demand_1 |
                  L2. |  -.5590903   .3561561    -1.57   0.116    -1.257143    .1389628
                      |
                 a023 |
                  L2. |   .3175696   .2277358     1.39   0.163    -.1287843    .7639235
                      |
                 a019 |
                  L2. |   1.099278   .2124885     5.17   0.000     .6828082    1.515748
                      |
                 a018 |
                  L2. |  -.3316308   .2496165    -1.33   0.184    -.8208702    .1576086
                      |
        a041_l2_imput |
                  L2. |          0  (omitted)
                      |
                _cons |    1.68028    1.05047     1.60   0.110    -.3786031    3.739163
    -----------------------------------------------------------------------------------
    
    . . outreg2 using EVOLUTION.xls, replace ctitle(Coeff 2006) label long
    EVOLUTION.xls
    dir : seeout
    
    . . logit a001 l2.a016 l2.a017 l2.a020_new l2.Cooperation_i l2.Patents l2.Formal_protection l2.Uncertainty_1  l2.Lack_of_demand_1 l2.a023 l2.a019 l2.a018 l2.a041_l2_imput if KIBS==1 & anyo==2007 , nolog vce(robust)
    
    Logistic regression                             Number of obs     =        849
                                                    Wald chi2(12)     =     153.37
                                                    Prob > chi2       =     0.0000
    Log pseudolikelihood = -415.92454               Pseudo R2         =     0.1889
    
    -----------------------------------------------------------------------------------
                      |               Robust
                 a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
                 a016 |
                  L2. |  -.2131488   .5382453    -0.40   0.692     -1.26809    .8417927
                      |
                 a017 |
                  L2. |  -.1423844   .1533541    -0.93   0.353    -.4429529    .1581841
                      |
             a020_new |
                  L2. |    .271747    .094453     2.88   0.004     .0866226    .4568715
                      |
        Cooperation_i |
                  L2. |   .9360836   .2058198     4.55   0.000     .5326843    1.339483
                      |
              Patents |
                  L2. |   .7979549   .3241309     2.46   0.014       .16267     1.43324
                      |
    Formal_protection |
                  L2. |   .3478325   .2026556     1.72   0.086    -.0493652    .7450301
                      |
        Uncertainty_1 |
                  L2. |  -.1051461   .2141874    -0.49   0.623    -.5249456    .3146534
                      |
     Lack_of_demand_1 |
                  L2. |  -.9149895   .4676112    -1.96   0.050    -1.831491    .0015115
                      |
                 a023 |
                  L2. |   .5581436   .2042502     2.73   0.006     .1578206    .9584665
                      |
                 a019 |
                  L2. |   .6301086   .1901807     3.31   0.001     .2573613    1.002856
                      |
                 a018 |
                  L2. |  -.2777743   .2120486    -1.31   0.190    -.6933819    .1378333
                      |
        a041_l2_imput |
                  L2. |   .6324045   .1150863     5.50   0.000     .4068396    .8579695
                      |
                _cons |  -.4679732    .911222    -0.51   0.608    -2.253936    1.317989
    -----------------------------------------------------------------------------------
    
    . . outreg2 using EVOLUTION.xls, append ctitle(Coeff 2007) label long
    EVOLUTION.xls
    dir : seeout
    
    . . logit a001 l2.a016 l2.a017 l2.a020_new l2.Cooperation_i l2.Patents l2.Formal_protection l2.Uncertainty_1  l2.Lack_of_demand_1 l2.a023 l2.a019 l2.a018 l2.a041_l2_imput if KIBS==1 & anyo==2008 , nolog vce(robust)
    note: L2.a023 omitted because of collinearity
    
    Logistic regression                             Number of obs     =        858
                                                    Wald chi2(11)     =     169.36
                                                    Prob > chi2       =     0.0000
    Log pseudolikelihood = -421.62556               Pseudo R2         =     0.2198
    
    -----------------------------------------------------------------------------------
                      |               Robust
                 a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
                 a016 |
                  L2. |   .2012109   .5021558     0.40   0.689    -.7829963    1.185418
                      |
                 a017 |
                  L2. |  -.2305827   .1392882    -1.66   0.098    -.5035826    .0424172
                      |
             a020_new |
                  L2. |   .3378666    .080816     4.18   0.000       .17947    .4962631
                      |
        Cooperation_i |
                  L2. |   1.076619   .2080259     5.18   0.000     .6688957    1.484342
                      |
              Patents |
                  L2. |   .3903703   .3263694     1.20   0.232    -.2493019    1.030042
                      |
    Formal_protection |
                  L2. |    .771911   .2159984     3.57   0.000     .3485619     1.19526
                      |
        Uncertainty_1 |
                  L2. |   -.310516   .1982328    -1.57   0.117    -.6990452    .0780132
                      |
     Lack_of_demand_1 |
                  L2. |  -.3306299   .4372156    -0.76   0.450    -1.187557    .5262969
                      |
                 a023 |
                  L2. |          0  (omitted)
                      |
                 a019 |
                  L2. |   .8938054   .1816854     4.92   0.000     .5377086    1.249902
                      |
                 a018 |
                  L2. |  -.2981233   .2014168    -1.48   0.139    -.6928931    .0966464
                      |
        a041_l2_imput |
                  L2. |   .4350123   .0974972     4.46   0.000     .2439212    .6261033
                      |
                _cons |   -.359421   .7880703    -0.46   0.648     -1.90401    1.185168
    -----------------------------------------------------------------------------------
    
    . . outreg2 using EVOLUTION.xls, append ctitle(Coeff 2008) label long
    EVOLUTION.xls
    dir : seeout
    
    . . logit a001 l2.a016 l2.a017 l2.a020_new l2.Cooperation_i l2.Patents l2.Formal_protection l2.Uncertainty_1  l2.Lack_of_demand_1 l2.a023 l2.a019 l2.a018 l2.a041_l2_imput if KIBS==1 & anyo==2009 , nolog vce(robust)
    note: L2.a023 omitted because of collinearity
    
    Logistic regression                             Number of obs     =        756
                                                    Wald chi2(11)     =     166.93
                                                    Prob > chi2       =     0.0000
    Log pseudolikelihood = -368.57698               Pseudo R2         =     0.2362
    
    -----------------------------------------------------------------------------------
                      |               Robust
                 a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
                 a016 |
                  L2. |  -.9807419   .5967298    -1.64   0.100    -2.150311     .188827
                      |
                 a017 |
                  L2. |   -.044206   .1611352    -0.27   0.784    -.3600251    .2716131
                      |
             a020_new |
                  L2. |   .5807934   .1077796     5.39   0.000     .3695493    .7920376
                      |
        Cooperation_i |
                  L2. |   1.043581   .2214448     4.71   0.000     .6095571    1.477605
                      |
              Patents |
                  L2. |   .2375545   .3195208     0.74   0.457    -.3886947    .8638038
                      |
    Formal_protection |
                  L2. |   .4818765   .2320089     2.08   0.038     .0271475    .9366055
                      |
        Uncertainty_1 |
                  L2. |  -.1946339   .2192723    -0.89   0.375    -.6243997    .2351319
                      |
     Lack_of_demand_1 |
                  L2. |  -.4896681   .5697698    -0.86   0.390    -1.606396    .6270602
                      |
                 a023 |
                  L2. |          0  (omitted)
                      |
                 a019 |
                  L2. |   1.022031   .2042504     5.00   0.000     .6217072    1.422354
                      |
                 a018 |
                  L2. |  -.0132281    .222954    -0.06   0.953    -.4502098    .4237537
                      |
        a041_l2_imput |
                  L2. |   .3620461   .1014231     3.57   0.000     .1632604    .5608318
                      |
                _cons |   1.992083   .9781928     2.04   0.042     .0748608    3.909306
    -----------------------------------------------------------------------------------
    
    . . outreg2 using EVOLUTION.xls, append ctitle(Coeff 2009) label long
    EVOLUTION.xls
    dir : seeout
    
    . . logit a001 l2.a016 l2.a017 l2.a020_new l2.Cooperation_i l2.Patents l2.Formal_protection l2.Uncertainty_1  l2.Lack_of_demand_1 l2.a023 l2.a019 l2.a018 l2.a041_l2_imput if KIBS==1 & anyo==2010 , nolog vce(robust)
    
    Logistic regression                             Number of obs     =        737
                                                    Wald chi2(12)     =     196.00
                                                    Prob > chi2       =     0.0000
    Log pseudolikelihood = -344.01382               Pseudo R2         =     0.2670
    
    -----------------------------------------------------------------------------------
                      |               Robust
                 a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
                 a016 |
                  L2. |  -.1034403    .561866    -0.18   0.854    -1.204677    .9977969
                      |
                 a017 |
                  L2. |  -.2056485   .1362254    -1.51   0.131    -.4726454    .0613484
                      |
             a020_new |
                  L2. |   .4356376   .1085408     4.01   0.000     .2229015    .6483737
                      |
        Cooperation_i |
                  L2. |   1.204631   .2278846     5.29   0.000     .7579853    1.651277
                      |
              Patents |
                  L2. |   1.136678   .3898595     2.92   0.004     .3725671    1.900788
                      |
    Formal_protection |
                  L2. |   .3959672   .2525748     1.57   0.117    -.0990703    .8910047
                      |
        Uncertainty_1 |
                  L2. |  -.3183775   .2300575    -1.38   0.166    -.7692819    .1325269
                      |
     Lack_of_demand_1 |
                  L2. |  -.6298557    .432337    -1.46   0.145    -1.477221    .2175093
                      |
                 a023 |
                  L2. |   .2793232   .2246197     1.24   0.214    -.1609232    .7195696
                      |
                 a019 |
                  L2. |   1.258281   .2069898     6.08   0.000      .852588    1.663973
                      |
                 a018 |
                  L2. |  -.2595075   .2348023    -1.11   0.269    -.7197114    .2006965
                      |
        a041_l2_imput |
                  L2. |   .0141612   .0654346     0.22   0.829    -.1140883    .1424107
                      |
                _cons |   1.809871   .9399449     1.93   0.054    -.0323868    3.652129
    -----------------------------------------------------------------------------------
    
    . . outreg2 using EVOLUTION.xls, append ctitle(Coeff 2010) label long
    EVOLUTION.xls
    dir : seeout
    
    . . logit a001 l2.a016 l2.a017 l2.a020_new l2.Cooperation_i l2.Patents l2.Formal_protection l2.Uncertainty_1  l2.Lack_of_demand_1 l2.a023 l2.a019 l2.a018 l2.a041_l2_imput if KIBS==1 & anyo==2011 , nolog vce(robust)
    
    Logistic regression                             Number of obs     =        741
                                                    Wald chi2(12)     =     176.74
                                                    Prob > chi2       =     0.0000
    Log pseudolikelihood = -363.59203               Pseudo R2         =     0.2428
    
    -----------------------------------------------------------------------------------
                      |               Robust
                 a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
                 a016 |
                  L2. |  -.0690211   .4919949    -0.14   0.888    -1.033313    .8952711
                      |
                 a017 |
                  L2. |  -.2527411   .1226367    -2.06   0.039    -.4931047   -.0123775
                      |
             a020_new |
                  L2. |   .4470355   .0947164     4.72   0.000     .2613948    .6326762
                      |
        Cooperation_i |
                  L2. |   .5992232   .2212969     2.71   0.007     .1654892    1.032957
                      |
              Patents |
                  L2. |    .822962   .3363063     2.45   0.014     .1638137     1.48211
                      |
    Formal_protection |
                  L2. |   .1968315   .2370152     0.83   0.406    -.2677097    .6613727
                      |
        Uncertainty_1 |
                  L2. |  -.3404033     .20806    -1.64   0.102    -.7481934    .0673869
                      |
     Lack_of_demand_1 |
                  L2. |  -.9143127   .4489594    -2.04   0.042    -1.794257   -.0343686
                      |
                 a023 |
                  L2. |   .3892406   .2134405     1.82   0.068    -.0290952    .8075764
                      |
                 a019 |
                  L2. |   1.421359    .210311     6.76   0.000     1.009157    1.833561
                      |
                 a018 |
                  L2. |   -.179748    .210217    -0.86   0.393    -.5917658    .2322698
                      |
        a041_l2_imput |
                  L2. |   .0699654   .0694212     1.01   0.314    -.0660976    .2060283
                      |
                _cons |   1.827838   .8373989     2.18   0.029     .1865661     3.46911
    -----------------------------------------------------------------------------------
    
    . . outreg2 using EVOLUTION.xls, append ctitle(Coeff 2011) label long
    EVOLUTION.xls
    dir : seeout
    
    . . logit a001 l2.a016 l2.a017 l2.a020_new l2.Cooperation_i l2.Patents l2.Formal_protection l2.Uncertainty_1  l2.Lack_of_demand_1 l2.a023 l2.a019 l2.a018 l2.a041_l2_imput if KIBS==1 & anyo==2012 , nolog vce(robust)
    
    Logistic regression                             Number of obs     =        728
                                                    Wald chi2(12)     =     167.01
                                                    Prob > chi2       =     0.0000
    Log pseudolikelihood = -354.92664               Pseudo R2         =     0.2431
    
    -----------------------------------------------------------------------------------
                      |               Robust
                 a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
                 a016 |
                  L2. |   .0494455   .5085783     0.10   0.923    -.9473496    1.046241
                      |
                 a017 |
                  L2. |  -.2832533   .1255205    -2.26   0.024     -.529269   -.0372376
                      |
             a020_new |
                  L2. |   .3940466   .1038325     3.80   0.000     .1905387    .5975545
                      |
        Cooperation_i |
                  L2. |    1.05619   .2170891     4.87   0.000     .6307034    1.481677
                      |
              Patents |
                  L2. |    1.16947   .4051364     2.89   0.004     .3754171    1.963523
                      |
    Formal_protection |
                  L2. |    .400208   .2541834     1.57   0.115    -.0979824    .8983983
                      |
        Uncertainty_1 |
                  L2. |  -.1346875   .2083407    -0.65   0.518    -.5430279    .2736528
                      |
     Lack_of_demand_1 |
                  L2. |   .1489476   .5305875     0.28   0.779    -.8909848     1.18888
                      |
                 a023 |
                  L2. |   .2460763   .2080506     1.18   0.237    -.1616953    .6538478
                      |
                 a019 |
                  L2. |   1.082133   .2151312     5.03   0.000     .6604835    1.503782
                      |
                 a018 |
                  L2. |  -.1220714   .2173202    -0.56   0.574    -.5480111    .3038684
                      |
        a041_l2_imput |
                  L2. |   .1477079    .068884     2.14   0.032     .0126977    .2827181
                      |
                _cons |    1.16257   .8887304     1.31   0.191      -.57931    2.904449
    -----------------------------------------------------------------------------------
    
    . . outreg2 using EVOLUTION.xls, append ctitle(Coeff 2012) label long
    EVOLUTION.xls
    dir : seeout
    
    .
    end of do-file
    
    . do "C:\Users\ragucar\AppData\Local\Temp\STD04000000.tmp"
    
    . . logit a001 l2.a016 l2.a017 l2.a020_new l2.i.Cooperation_i l2.i.Patents l2.i.Formal_protection l2.i.Uncertainty_1 l2.i.Lack_of_demand_1 l2.i.a023 l2.i.a019 l2.i.a018 l2.a041_l2_imput if KIBS==1 & anyo==2006 , nolog vce(robust)
    note: L2.a041_l2_imput omitted because of collinearity
    
    Logistic regression                             Number of obs     =        622
                                                    Wald chi2(11)     =      98.63
                                                    Prob > chi2       =     0.0000
    Log pseudolikelihood = -299.34763               Pseudo R2         =     0.1961
    
    --------------------------------------------------------------------------------------
                         |               Robust
                    a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ---------------------+----------------------------------------------------------------
                    a016 |
                     L2. |  -.1112366   .7128861    -0.16   0.876    -1.508468    1.285995
                         |
                    a017 |
                     L2. |  -.1826609   .1747374    -1.05   0.296    -.5251399    .1598181
                         |
                a020_new |
                     L2. |   .3366679    .111882     3.01   0.003     .1173832    .5559526
                         |
        L2.Cooperation_i |
                      1  |   .9712777   .2326144     4.18   0.000     .5153618    1.427194
                         |
              L2.Patents |
                      1  |   .7099016   .3366658     2.11   0.035     .0500488    1.369754
                         |
    L2.Formal_protection |
                      1  |   .5488279   .2504874     2.19   0.028     .0578816    1.039774
                         |
        L2.Uncertainty_1 |
                      1  |  -.6255862    .253396    -2.47   0.014    -1.122233   -.1289391
                         |
     L2.Lack_of_demand_1 |
                      1  |  -.5590903   .3561561    -1.57   0.116    -1.257143    .1389628
                         |
                 L2.a023 |
                      1  |   .3175696   .2277358     1.39   0.163    -.1287843    .7639235
                         |
                 L2.a019 |
                      1  |   1.099278   .2124885     5.17   0.000     .6828082    1.515748
                         |
                 L2.a018 |
                      1  |  -.3316308   .2496165    -1.33   0.184    -.8208702    .1576086
                         |
           a041_l2_imput |
                     L2. |          0  (omitted)
                         |
                   _cons |    1.68028    1.05047     1.60   0.110    -.3786031    3.739163
    --------------------------------------------------------------------------------------
    Thanks for your help!
    Rocio

  • #2
    Rocio:
    sample size change across your regression models; hence: no surprise at all.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thanks Carlo! But, Why? It's for logit models?

      Comment


      • #4
        Rocio:
        no, I don't think that what you reported is related to logit (or any other regression) model.
        If I'm not mistaken, -a017L2- shows th same beahviour.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Yes, is true! Some variables are significant in the panel but not in regressions year by year. I would like, after to run the panel model and check the significant variables, testing the evolution of the influence of these variables year by year (from 2007 to 2012). But this is difficult if the most of independent variables are significant in the panel but not in year-regression. Could you help me with some idea? Thanks in advance!

          Comment


          • #6
            Rocio:
            the usual approach is to plug in -i.year- as a predictor in the righ-hand side of your regression equation.
            However, you should check whether this idea can live together with so many lagged variables.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Thanks a lor Carlo! I'll keep thinking about it.
              Best,
              Rocio

              Comment


              • #8
                I keep thinking about a xtlogit model interacting all independent variables with time variable. The code is the following:

                Code:
                 . xtlogit a001 c.(l2.a016 l2.a017 l2.a020_new l2.Cooperation_i l2.Patents l2.Formal_protection l2.Uncertainty_1 l2.Lack_of_demand_1 l2.a023 l2.a019 l2.a018 l2.a041_l2_imput i.anyo)##i.KIBS, nolog i(ident)
                Results:

                Code:
                . . xtlogit a001 c.(l2.a016 l2.a017 l2.a020_new l2.Cooperation_i l2.Patents l2.Formal_protection l2.Uncertainty_1
                > l2.Lack_of_demand_1 l2.a023 l2.a019 l2.a018 l2.a041_l2_imput)##i.anyo if KIBS==1, nolog i(ident)
                note: 2008.anyo#cL2.a023 omitted because of collinearity
                note: 2009.anyo#cL2.a023 omitted because of collinearity
                note: 2012.anyo#cL2.a041_l2_imput omitted because of collinearity
                
                Random-effects logistic regression              Number of obs     =      5,291
                Group variable: ident                           Number of groups  =      1,132
                
                Random effects u_i ~ Gaussian                   Obs per group:
                                                                              min =          1
                                                                              avg =        4.7
                                                                              max =          7
                
                Integration method: mvaghermite                 Integration pts.  =         12
                
                                                                Wald chi2(87)     =     306.49
                Log likelihood  = -1929.2846                    Prob > chi2       =     0.0000
                
                --------------------------------------------------------------------------------------------
                                      a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                ---------------------------+----------------------------------------------------------------
                                      a016 |
                                       L2. |   2.658856   1.249028     2.13   0.033     .2108058    5.106907
                                           |
                                      a017 |
                                       L2. |  -1.032697   .3264207    -3.16   0.002     -1.67247   -.3929247
                                           |
                                  a020_new |
                                       L2. |   .4885206   .1818153     2.69   0.007     .1321691     .844872
                                           |
                             Cooperation_i |
                                       L2. |   1.120105    .399984     2.80   0.005     .3361511     1.90406
                                           |
                                   Patents |
                                       L2. |   .8293377   .5861171     1.41   0.157    -.3194307    1.978106
                                           |
                         Formal_protection |
                                       L2. |   .8527988   .4353115     1.96   0.050    -.0003961    1.705994
                                           |
                             Uncertainty_1 |
                                       L2. |  -.5061968   .4514171    -1.12   0.262    -1.390958    .3785644
                                           |
                          Lack_of_demand_1 |
                                       L2. |   -.994947   .8324729    -1.20   0.232    -2.626564    .6366699
                                           |
                                      a023 |
                                       L2. |  -.0345567   .4337139    -0.08   0.936    -.8846204     .815507
                                           |
                                      a019 |
                                       L2. |   1.560052   .3927132     3.97   0.000     .7903484    2.329756
                                           |
                                      a018 |
                                       L2. |  -.3530931   .5192074    -0.68   0.496    -1.370721    .6645346
                                           |
                             a041_l2_imput |
                                       L2. |   .0762128   .1238046     0.62   0.538    -.1664397    .3188653
                                           |
                                      anyo |
                                     2007  |  -1.746172   2.123598    -0.82   0.411    -5.908347    2.416004
                                     2008  |  -.2119911   2.114849    -0.10   0.920    -4.357019    3.933037
                                     2009  |   2.779318   2.250312     1.24   0.217    -1.631213    7.189848
                                     2010  |   3.143866   2.313289     1.36   0.174    -1.390097    7.677828
                                     2011  |    2.13192   2.169928     0.98   0.326     -2.12106      6.3849
                                     2012  |   .9353917   2.221013     0.42   0.674    -3.417714    5.288497
                                           |
                             anyo#cL2.a016 |
                                     2007  |  -.6424222   1.353005    -0.47   0.635    -3.294264     2.00942
                                     2008  |  -1.074519   1.363505    -0.79   0.431     -3.74694    1.597903
                                     2009  |  -2.562387   1.417345    -1.81   0.071    -5.340331    .2155577
                                     2010  |  -1.675546    1.45202    -1.15   0.249    -4.521453     1.17036
                                     2011  |  -1.348659   1.408338    -0.96   0.338     -4.10895    1.411631
                                     2012  |  -.6179236    1.41095    -0.44   0.661    -3.383335    2.147487
                                           |
                             anyo#cL2.a017 |
                                     2007  |   .1866052   .3543789     0.53   0.598    -.5079648    .8811751
                                     2008  |   .3905797   .3572705     1.09   0.274    -.3096577    1.090817
                                     2009  |   .5489549   .3712783     1.48   0.139    -.1787371    1.276647
                                     2010  |   .4586579   .3789941     1.21   0.226    -.2841569    1.201473
                                     2011  |   .3741937   .3654486     1.02   0.306    -.3420723     1.09046
                                     2012  |   .1644436   .3557039     0.46   0.644    -.5327233    .8616105
                                           |
                         anyo#cL2.a020_new |
                                     2007  |  -.0709999   .2145559    -0.33   0.741    -.4915217    .3495219
                                     2008  |    .025068   .2250345     0.11   0.911    -.4159916    .4661275
                                     2009  |   .4712865   .2432223     1.94   0.053    -.0054205    .9479935
                                     2010  |   .2896092   .2623152     1.10   0.270    -.2245191    .8037375
                                     2011  |   .2002886   .2387935     0.84   0.402     -.267738    .6683153
                                     2012  |   .1914906    .247183     0.77   0.439    -.2929793    .6759604
                                           |
                    anyo#cL2.Cooperation_i |
                                     2007  |  -.0173058   .5103005    -0.03   0.973    -1.017476    .9828648
                                     2008  |   .3693282   .5114661     0.72   0.470    -.6331269    1.371783
                                     2009  |   .0349067   .5288617     0.07   0.947    -1.001643    1.071457
                                     2010  |   .1450299    .530071     0.27   0.784    -.8938902     1.18395
                                     2011  |  -.4362232   .5326103    -0.82   0.413     -1.48012    .6076738
                                     2012  |  -.0643929   .5285497    -0.12   0.903    -1.100331    .9715455
                                           |
                          anyo#cL2.Patents |
                                     2007  |  -.0298014   .7713797    -0.04   0.969    -1.541678    1.482075
                                     2008  |  -.6847529   .7574888    -0.90   0.366    -2.169404    .7998979
                                     2009  |  -.6827664   .7852644    -0.87   0.385    -2.221856    .8563235
                                     2010  |   .8502869   .8762588     0.97   0.332    -.8671489    2.567723
                                     2011  |   .1128328    .805151     0.14   0.889    -1.465234      1.6909
                                     2012  |   .8375115   .8756398     0.96   0.339     -.878711    2.553734
                                           |
                anyo#cL2.Formal_protection |
                                     2007  |  -.1435862   .5357955    -0.27   0.789    -1.193726    .9065537
                                     2008  |   .1568661     .53757     0.29   0.770    -.8967517    1.210484
                                     2009  |  -.5939829   .5724153    -1.04   0.299    -1.715896    .5279305
                                     2010  |  -.9021727   .5777483    -1.56   0.118    -2.034539    .2301932
                                     2011  |  -1.166521    .571041    -2.04   0.041    -2.285741   -.0473015
                                     2012  |  -.6939983   .5811623    -1.19   0.232    -1.833055    .4450588
                                           |
                    anyo#cL2.Uncertainty_1 |
                                     2007  |   .3933662   .5714025     0.69   0.491    -.7265622    1.513295
                                     2008  |   .6106629   .5568599     1.10   0.273    -.4807624    1.702088
                                     2009  |    .852706   .5767745     1.48   0.139    -.2777513    1.983163
                                     2010  |   .0874097   .5701206     0.15   0.878    -1.030006    1.204826
                                     2011  |   .1009196   .5618487     0.18   0.857    -1.000284    1.202123
                                     2012  |   .7756697   .5681513     1.37   0.172    -.3378865    1.889226
                                           |
                 anyo#cL2.Lack_of_demand_1 |
                                     2007  |  -1.150089   1.121128    -1.03   0.305    -3.347459    1.047281
                                     2008  |   .2475429    1.10893     0.22   0.823     -1.92592    2.421006
                                     2009  |   .3918625   1.458908     0.27   0.788    -2.467546    3.251271
                                     2010  |   .7331968   1.170685     0.63   0.531    -1.561304    3.027697
                                     2011  |   .2197027   1.226763     0.18   0.858    -2.184708    2.624113
                                     2012  |   1.146003   1.326068     0.86   0.387    -1.453042    3.745049
                                           |
                             anyo#cL2.a023 |
                                     2007  |   .6627011   .5432388     1.22   0.222    -.4020275     1.72743
                                     2008  |          0  (omitted)
                                     2009  |          0  (omitted)
                                     2010  |   .0591255   .5597358     0.11   0.916    -1.037936    1.156187
                                     2011  |   .1338251   .5498265     0.24   0.808    -.9438151    1.211465
                                     2012  |  -.2335918   .5480098    -0.43   0.670    -1.307671    .8404876
                                           |
                             anyo#cL2.a019 |
                                     2007  |    -1.0429    .484658    -2.15   0.031    -1.992812   -.0929875
                                     2008  |  -.8551748   .4813531    -1.78   0.076    -1.798609    .0882599
                                     2009  |  -.8181537   .5088371    -1.61   0.108    -1.815456    .1791486
                                     2010  |  -.5602019    .515162    -1.09   0.277    -1.569901    .4494971
                                     2011  |  -.8367788   .5185649    -1.61   0.107    -1.853147    .1795898
                                     2012  |  -1.122134   .5184241    -2.16   0.030    -2.138227    -.106042
                                           |
                             anyo#cL2.a018 |
                                     2007  |  -.3013328    .606608    -0.50   0.619    -1.490263    .8875971
                                     2008  |  -.2465066   .6066708    -0.41   0.685    -1.435559    .9425462
                                     2009  |   .2712193   .6267717     0.43   0.665    -.9572307    1.499669
                                     2010  |   -.199743   .6402989    -0.31   0.755    -1.454706     1.05522
                                     2011  |   -.323815   .6327624    -0.51   0.609    -1.564007    .9163766
                                     2012  |  -.2155477   .6322794    -0.34   0.733    -1.454793    1.023697
                                           |
                    anyo#cL2.a041_l2_imput |
                                     2007  |   .6452842    .232455     2.78   0.006     .1896808    1.100888
                                     2008  |   .1486362   .1968614     0.76   0.450    -.2372051    .5344774
                                     2009  |    .227698    .232922     0.98   0.328    -.2288207    .6842168
                                     2010  |  -.3131517   .1722478    -1.82   0.069    -.6507512    .0244479
                                     2011  |  -.0993166   .1610415    -0.62   0.537    -.4149522     .216319
                                     2012  |          0  (omitted)
                                           |
                                     _cons |   1.456028   1.720846     0.85   0.397    -1.916767    4.828823
                ---------------------------+----------------------------------------------------------------
                                  /lnsig2u |   2.623952   .1186916                      2.391321    2.856583
                ---------------------------+----------------------------------------------------------------
                                   sigma_u |   3.713505    .220381                       3.30574    4.171567
                                       rho |   .8073846   .0184583                       .768609    .8410065
                --------------------------------------------------------------------------------------------
                LR test of rho=0: chibar2(01) = 1277.45                Prob >= chibar2 = 0.000
                And using lincom test after the estimation. Would the coefficient be correctly estimated?
                For instance, a016 for 2006

                Code:
                 . . lincom l2.a016
                
                 ( 1)  [a001]L2.a016 = 0
                
                ------------------------------------------------------------------------------
                        a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                         (1) |   2.658856   1.249028     2.13   0.033     .2108058    5.106907
                ------------------------------------------------------------------------------
                For 2007
                Code:
                 . . lincom l2.a016 + 2007.anyo#l2.a016
                
                 ( 1)  [a001]L2.a016 + [a001]2007.anyo#cL2.a016 = 0
                
                ------------------------------------------------------------------------------
                        a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                         (1) |   2.016434   .9713885     2.08   0.038     .1125478    3.920321
                ------------------------------------------------------------------------------
                For 2008
                Code:
                 . . lincom l2.a016 + 2008.anyo#l2.a016
                
                 ( 1)  [a001]L2.a016 + [a001]2008.anyo#cL2.a016 = 0
                
                ------------------------------------------------------------------------------
                        a001 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                         (1) |   1.584337   .9837735     1.61   0.107    -.3438232    3.512498
                ------------------------------------------------------------------------------
                And so on...
                Do you think that this way is correct?
                Thanks again!
                Rocio

                Comment


                • #9
                  Rocio:
                  from your results, it would seem that interaction does not produce significant results.
                  Is it worthy to embark yourself in such an heavy model?
                  Wouldn't be wiser to switch to a model without -i.year- interaction?
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    Thanks again Carlo, the sense of the interaction is to estimate the variables' coefficients in each year. If the interaction is dismissed, how I could estimate the variables' coefficientes by year?
                    Best,
                    Rocio

                    Comment


                    • #11
                      Rocio:
                      your aim was/is clear but looking at the results it does not seem (to me, at least) Worth embarking in such an heavy model (your take on that can obviously be different).
                      Kind regards,
                      Carlo
                      (Stata 19.0)

                      Comment


                      • #12
                        Thanks Carlo! Really, I'm lost. I would like to get a beta by year in line with the panel's results. If you have any idea, please share it with me!
                        Thanks again!
                        Rocio

                        Comment

                        Working...
                        X