Announcement

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

  • Sebastian Kripfganz
    replied
    Try
    Code:
    test _b[d_L,deputyd:_cons] = _b[o_L,officiald:_cons]

    Leave a comment:


  • Lin Liu
    replied
    what's wrong with this?
    . xtdpdgmm L(0/1).slackz munificence complex dynamics area L(0/1).logasset L(0/1).roa agef edu L(0/1).tenure sex agee L(0/1).deputyd ,
    > model(fod) collapse gmm(slackz, lag(1 3)) gmm(munificence, lag(0 1)) gmm(complex, lag(0 1)) gmm(dynamics, lag(0 1)) gmm(area, lag(0 1) ) gmm
    > (logasset, lag(1 2)) gmm(roa, lag(1 2)) gmm(agef, lag(0 2)) gmm(edu, lag(0 1)) gmm(sex, lag(0 0) ) gmm(tenure, lag(0 3)) gmm(agee, lag(0 0)
    > ) gmm(deputyd, lag(1 2)) gmm(area, lag(0 0) model(md)) gmm( sex, lag(0 0) model(md)) gmm(agee, lag(0 0) model(md)) gmm(slackz, lag (1 1) diff
    > model(level)) gmm(munificence, lag(0 0) diff model(level)) gmm(complex, lag(0 0) diff model(level)) gmm(dynamics, lag(0 0) diff model(level
    > )) gmm(area, lag(0 0) model(level)) gmm( logasset, lag(1 1) diff model(level)) gmm( roa, lag(1 1) diff model(level)) gmm( agef, lag(0 0) diff
    > model(level)) gmm(edu, lag(0 0) diff model(level)) gmm(tenure, lag(0 0) diff model(level)) gmm(sex, lag(0 0) model(level)) gmm(agee, lag(0
    > 0) model(level)) gmm(deputyd, lag(1 1) diff model(level)) teffects two vce(r) overid auxiliary

    Generalized method of moments estimation

    Fitting full model:
    Step 1 f(b) = .21961324
    Step 2 f(b) = .04905417

    Fitting reduced model 1:
    Step 1 f(b) = .04378765

    Fitting reduced model 2:
    Step 1 f(b) = .04737229

    Fitting reduced model 3:
    Step 1 f(b) = .04174331

    Fitting reduced model 4:
    Step 1 f(b) = .04725824

    Fitting reduced model 5:
    Step 1 f(b) = .04894016

    Fitting reduced model 6:
    Step 1 f(b) = .04896063

    Fitting reduced model 7:
    Step 1 f(b) = .04693545

    Fitting reduced model 8:
    Step 1 f(b) = .04642574

    Fitting reduced model 9:
    Step 1 f(b) = .04471508

    Fitting reduced model 10:
    Step 1 f(b) = .04683552

    Fitting reduced model 11:
    Step 1 f(b) = .04554952

    Fitting reduced model 12:
    Step 1 f(b) = .04759769

    Fitting reduced model 13:
    Step 1 f(b) = .04775263

    Fitting reduced model 15:
    Step 1 f(b) = .04901515

    Fitting reduced model 16:
    Step 1 f(b) = .04815328

    Fitting reduced model 17:
    Step 1 f(b) = .04883611

    Fitting reduced model 18:
    Step 1 f(b) = .04345726

    Fitting reduced model 19:
    Step 1 f(b) = .04868351

    Fitting reduced model 20:
    Step 1 f(b) = .04871824

    Fitting reduced model 21:
    Step 1 f(b) = .04833418

    Fitting reduced model 22:
    Step 1 f(b) = .04895118

    Fitting reduced model 23:
    Step 1 f(b) = .0457555

    Fitting reduced model 24:
    Step 1 f(b) = .04576668

    Fitting reduced model 25:
    Step 1 f(b) = .04623669

    Fitting reduced model 26:
    Step 1 f(b) = .04865459

    Fitting reduced model 27:
    Step 1 f(b) = .04898542

    Fitting reduced model 28:
    Step 1 f(b) = .04787909

    Fitting reduced model 29:
    Step 1 f(b) = .04526437

    Fitting reduced model 30:
    Step 1 f(b) = .03214391

    Fitting no-mdev model:
    Step 1 f(b) = .04428694

    Fitting no-level model:
    Step 1 f(b) = .0033406

    Group variable: code Number of obs = 1142
    Time variable: year Number of groups = 257

    Moment conditions: linear = 49 Obs per group: min = 1
    nonlinear = 0 avg = 4.44358
    total = 49 max = 8

    ------------------------------------------------------------------------------
    slackz | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    /L.slackz | .712158 .1045299 6.81 0.000 .5072831 .9170328
    /munificence | -.3096574 .8710623 -0.36 0.722 -2.016908 1.397593
    /complex | .0136566 .0495609 0.28 0.783 -.0834811 .1107942
    /dynamics | -5.158069 54.91996 -0.09 0.925 -112.7992 102.4831
    /area | -.3154719 .1799491 -1.75 0.080 -.6681656 .0372218
    /logasset | 7.155498 2.668933 2.68 0.007 1.924485 12.38651
    /L.logasset | -8.373998 2.782808 -3.01 0.003 -13.8282 -2.919795
    /roa | -16.33088 8.771663 -1.86 0.063 -33.52302 .8612657
    /L.roa | 8.227022 5.280975 1.56 0.119 -2.123498 18.57754
    /agef | .1133634 .0963832 1.18 0.240 -.0755442 .3022709
    /edu | -.501057 .3031709 -1.65 0.098 -1.095261 .0931471
    /tenure | .0153419 .0475422 0.32 0.747 -.077839 .1085228
    /L.tenure | .0190134 .0677046 0.28 0.779 -.1136852 .1517119
    /sex | .7554232 .468428 1.61 0.107 -.1626789 1.673525
    /agee | -.0292742 .0188381 -1.55 0.120 -.0661961 .0076477
    /deputyd | 1.565541 1.06155 1.47 0.140 -.515058 3.646141
    /L.deputyd | -1.890005 1.075679 -1.76 0.079 -3.998297 .2182872
    2005.year | .3553894 .2172804 1.64 0.102 -.0704723 .7812512
    2006.year | .304873 .2516098 1.21 0.226 -.1882731 .7980191
    2007.year | .2514045 .274264 0.92 0.359 -.2861431 .7889521
    2008.year | .6769215 .4010137 1.69 0.091 -.109051 1.462894
    2009.year | .747258 .3946966 1.89 0.058 -.0263332 1.520849
    2010.year | .9056145 .4358076 2.08 0.038 .0514473 1.759782
    2011.year | .7428411 .4927214 1.51 0.132 -.2228752 1.708557
    /_cons | 12.84346 5.229984 2.46 0.014 2.592877 23.09404
    ------------------------------------------------------------------------------
    Instruments corresponding to the linear moment conditions:
    1, model(fodev):
    L1.slackz L2.slackz L3.slackz
    2, model(fodev):
    munificence L1.munificence
    3, model(fodev):
    complex L1.complex
    4, model(fodev):
    dynamics L1.dynamics
    5, model(fodev):
    area
    6, model(fodev):
    L1.logasset L2.logasset
    7, model(fodev):
    L1.roa L2.roa
    8, model(fodev):
    agef L2.agef
    9, model(fodev):
    edu L1.edu
    10, model(fodev):
    sex
    11, model(fodev):
    tenure L1.tenure L2.tenure L3.tenure
    12, model(fodev):
    agee
    13, model(fodev):
    L1.deputyd L2.deputyd
    15, model(mdev):
    sex
    16, model(mdev):
    agee
    17, model(level):
    L1.D.slackz
    18, model(level):
    D.munificence
    19, model(level):
    D.complex
    20, model(level):
    D.dynamics
    21, model(level):
    area
    22, model(level):
    L1.D.logasset
    23, model(level):
    L1.D.roa
    24, model(level):
    D.agef
    25, model(level):
    D.edu
    26, model(level):
    D.tenure
    27, model(level):
    sex
    28, model(level):
    agee
    29, model(level):
    L1.D.deputyd
    30, model(level):
    2005bn.year 2006.year 2007.year 2008.year 2009.year 2010.year 2011.year
    31, model(level):
    _cons

    . est store d

    . xtdpdgmm L(0/1).slackz munificence complex dynamics area L(0/1).logasset L(0/1).roa agef edu tenure sex agee L(0/1).officiald , model
    > (fod) collapse gmm(slackz, lag(1 3)) gmm(munificence, lag(0 2)) gmm(complex, lag(0 2)) gmm(dynamics, lag(0 2)) gmm(area, lag(0 2)) gmm(logas
    > set, lag(1 3)) gmm(roa, lag(1 3)) gmm(agef, lag(0 2)) gmm(edu, lag(0 1)) gmm( sex, lag(0 2) ) gmm(tenure, lag(0 2)) gmm(agee, lag(0 2)) gmm
    > (officiald, lag(1 3)) gmm(area, lag(0 0) model(md)) gmm( sex, lag(0 0) model(md)) gmm(agee, lag(0 0) model(md)) gmm(slackz, lag(1 1) diff mo
    > del(level)) gmm(munificence, lag(0 0) diff model(level)) gmm(complex, lag(0 0) diff model(level)) gmm(dynamics, lag(0 0) diff model(level))
    > gmm(area, lag(0 0) model(level)) gmm( logasset, lag(1 1) diff model(level)) gmm( roa, lag(1 1) diff model(level)) gmm( agef, lag(0 0) diff mo
    > del(level)) gmm(edu, lag(0 0) diff model(level)) gmm(tenure, lag(0 0) diff model(level)) gmm(sex, lag(0 0) model(level)) gmm(agee, lag(0 0)
    > model(level)) gmm(officiald, lag(1 1) diff model(level)) teffects two vce(r) overid auxiliary

    Generalized method of moments estimation

    Fitting full model:
    Step 1 f(b) = .21879516
    Step 2 f(b) = .0895368

    Fitting reduced model 1:
    Step 1 f(b) = .07797342

    Fitting reduced model 2:
    Step 1 f(b) = .07882463

    Fitting reduced model 3:
    Step 1 f(b) = .07606501

    Fitting reduced model 4:
    Step 1 f(b) = .07926185

    Fitting reduced model 5:
    Step 1 f(b) = .08893557

    Fitting reduced model 6:
    Step 1 f(b) = .08534523

    Fitting reduced model 7:
    Step 1 f(b) = .08495086

    Fitting reduced model 8:
    Step 1 f(b) = .08775046

    Fitting reduced model 9:
    Step 1 f(b) = .07315281

    Fitting reduced model 10:
    Step 1 f(b) = .07129769

    Fitting reduced model 11:
    Step 1 f(b) = .08573825

    Fitting reduced model 12:
    Step 1 f(b) = .07303121

    Fitting reduced model 13:
    Step 1 f(b) = .08466086

    Fitting reduced model 15:
    Step 1 f(b) = .08889474

    Fitting reduced model 16:
    Step 1 f(b) = .08735535

    Fitting reduced model 17:
    Step 1 f(b) = .08696995

    Fitting reduced model 18:
    Step 1 f(b) = .08947708

    Fitting reduced model 19:
    Step 1 f(b) = .08952212

    Fitting reduced model 20:
    Step 1 f(b) = .08911202

    Fitting reduced model 21:
    Step 1 f(b) = .08279975

    Fitting reduced model 22:
    Step 1 f(b) = .08536359

    Fitting reduced model 23:
    Step 1 f(b) = .08768312

    Fitting reduced model 24:
    Step 1 f(b) = .08707116

    Fitting reduced model 25:
    Step 1 f(b) = .08927467

    Fitting reduced model 26:
    Step 1 f(b) = .08936924

    Fitting reduced model 27:
    Step 1 f(b) = .08820959

    Fitting reduced model 28:
    Step 1 f(b) = .08916825

    Fitting reduced model 29:
    Step 1 f(b) = .08449728

    Fitting reduced model 30:
    Step 1 f(b) = .06366293

    Fitting no-mdev model:
    Step 1 f(b) = .08117433

    Fitting no-level model:
    Step 1 f(b) = .04141188

    Group variable: code Number of obs = 1142
    Time variable: year Number of groups = 257

    Moment conditions: linear = 59 Obs per group: min = 1
    nonlinear = 0 avg = 4.44358
    total = 59 max = 8

    ------------------------------------------------------------------------------
    slackz | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    /L.slackz | .705772 .1192805 5.92 0.000 .4719866 .9395575
    /munificence | -.4403346 .8550542 -0.51 0.607 -2.11621 1.235541
    /complex | -.0347037 .0459247 -0.76 0.450 -.1247144 .055307
    /dynamics | 59.96618 56.23615 1.07 0.286 -50.25464 170.187
    /area | .0132941 .1548448 0.09 0.932 -.2901961 .3167843
    /logasset | 4.962371 2.576222 1.93 0.054 -.086932 10.01167
    /L.logasset | -5.606148 2.867325 -1.96 0.051 -11.226 .0137069
    /roa | -17.11063 5.502293 -3.11 0.002 -27.89493 -6.326336
    /L.roa | 10.60277 3.994177 2.65 0.008 2.774331 18.43122
    /agef | .0437009 .1054893 0.41 0.679 -.1630544 .2504561
    /edu | .0413938 .2862075 0.14 0.885 -.5195625 .6023501
    /tenure | .0048285 .0490966 0.10 0.922 -.0913991 .101056
    /sex | .3432621 .6145907 0.56 0.576 -.8613135 1.547838
    /agee | .0068542 .0191801 0.36 0.721 -.0307382 .0444465
    /officiald | 1.023247 .5825883 1.76 0.079 -.1186047 2.165099
    /L.officiald | -1.720383 .6982176 -2.46 0.014 -3.088865 -.351902
    2005.year | .4571604 .2177951 2.10 0.036 .0302897 .884031
    2006.year | .3961391 .2675335 1.48 0.139 -.128217 .9204952
    2007.year | .5708944 .254941 2.24 0.025 .0712192 1.07057
    2008.year | .7871243 .4278661 1.84 0.066 -.0514777 1.625726
    2009.year | .8271088 .4124585 2.01 0.045 .018705 1.635513
    2010.year | 1.027484 .4636634 2.22 0.027 .1187209 1.936248
    2011.year | .7870365 .5163632 1.52 0.127 -.2250167 1.79909
    /_cons | 2.834887 5.29475 0.54 0.592 -7.542632 13.21241
    ------------------------------------------------------------------------------
    Instruments corresponding to the linear moment conditions:
    1, model(fodev):
    L1.slackz L2.slackz L3.slackz
    2, model(fodev):
    munificence L1.munificence L2.munificence
    3, model(fodev):
    complex L1.complex L2.complex
    4, model(fodev):
    dynamics L1.dynamics L2.dynamics
    5, model(fodev):
    area L2.area
    6, model(fodev):
    L1.logasset L2.logasset L3.logasset
    7, model(fodev):
    L1.roa L2.roa L3.roa
    8, model(fodev):
    agef L2.agef
    9, model(fodev):
    edu L1.edu
    10, model(fodev):
    sex L1.sex L2.sex
    11, model(fodev):
    tenure L1.tenure L2.tenure
    12, model(fodev):
    agee L1.agee L2.agee
    13, model(fodev):
    L1.officiald L2.officiald L3.officiald
    15, model(mdev):
    sex
    16, model(mdev):
    agee
    17, model(level):
    L1.D.slackz
    18, model(level):
    D.munificence
    19, model(level):
    D.complex
    20, model(level):
    D.dynamics
    21, model(level):
    area
    22, model(level):
    L1.D.logasset
    23, model(level):
    L1.D.roa
    24, model(level):
    D.agef
    25, model(level):
    D.edu
    26, model(level):
    D.tenure
    27, model(level):
    sex
    28, model(level):
    agee
    29, model(level):
    L1.D.officiald
    30, model(level):
    2005bn.year 2006.year 2007.year 2008.year 2009.year 2010.year 2011.year
    31, model(level):
    _cons

    . est store o

    . suest d o

    Simultaneous results for d, o

    Number of obs = 1,142

    -------------------------------------------------------------------------------
    | Robust
    | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    --------------+----------------------------------------------------------------
    d_L,slackz |
    _cons | .712158 .1241785 5.73 0.000 .4687726 .9555434
    --------------+----------------------------------------------------------------
    d_munificence |
    _cons | -.3096574 1.348379 -0.23 0.818 -2.952431 2.333116
    --------------+----------------------------------------------------------------
    d_complex |
    _cons | .0136566 .0717027 0.19 0.849 -.1268782 .1541913
    --------------+----------------------------------------------------------------
    d_dynamics |
    _cons | -5.158069 74.80452 -0.07 0.945 -151.7722 141.4561
    --------------+----------------------------------------------------------------
    d_area |
    _cons | -.3154719 .2452943 -1.29 0.198 -.7962398 .165296
    --------------+----------------------------------------------------------------
    d_logasset |
    _cons | 7.155498 3.376785 2.12 0.034 .5371209 13.77387
    --------------+----------------------------------------------------------------
    d_L,logasset |
    _cons | -8.373998 3.463342 -2.42 0.016 -15.16202 -1.585972
    --------------+----------------------------------------------------------------
    d_roa |
    _cons | -16.33088 9.433864 -1.73 0.083 -34.82091 2.159156
    --------------+----------------------------------------------------------------
    d_L,roa |
    _cons | 8.227022 5.302617 1.55 0.121 -2.165917 18.61996
    --------------+----------------------------------------------------------------
    d_agef |
    _cons | .1133634 .1095392 1.03 0.301 -.1013295 .3280562
    --------------+----------------------------------------------------------------
    d_edu |
    _cons | -.501057 .3479369 -1.44 0.150 -1.183001 .1808867
    --------------+----------------------------------------------------------------
    d_tenure |
    _cons | .0153419 .0756236 0.20 0.839 -.1328777 .1635615
    --------------+----------------------------------------------------------------
    d_L,tenure |
    _cons | .0190134 .0887909 0.21 0.830 -.1550136 .1930403
    --------------+----------------------------------------------------------------
    d_sex |
    _cons | .7554232 .561197 1.35 0.178 -.3445028 1.855349
    --------------+----------------------------------------------------------------
    d_agee |
    _cons | -.0292742 .0263493 -1.11 0.267 -.0809178 .0223694
    --------------+----------------------------------------------------------------
    d_deputyd |
    _cons | 1.565541 2.45065 0.64 0.523 -3.237644 6.368727
    --------------+----------------------------------------------------------------
    d_L,deputyd |
    _cons | -1.890005 2.42004 -0.78 0.435 -6.633196 2.853186
    --------------+----------------------------------------------------------------
    d_2005,year |
    _cons | .3553894 .35439 1.00 0.316 -.3392022 1.049981
    --------------+----------------------------------------------------------------
    d_2006,year |
    _cons | .304873 .3598552 0.85 0.397 -.4004301 1.010176
    --------------+----------------------------------------------------------------
    d_2007,year |
    _cons | .2514045 .4118691 0.61 0.542 -.555844 1.058653
    --------------+----------------------------------------------------------------
    d_2008,year |
    _cons | .6769215 .4867027 1.39 0.164 -.2769983 1.630841
    --------------+----------------------------------------------------------------
    d_2009,year |
    _cons | .747258 .4898263 1.53 0.127 -.212784 1.7073
    --------------+----------------------------------------------------------------
    d_2010,year |
    _cons | .9056145 .5814301 1.56 0.119 -.2339677 2.045197
    --------------+----------------------------------------------------------------
    d_2011,year |
    _cons | .7428411 .5726409 1.30 0.195 -.3795145 1.865197
    --------------+----------------------------------------------------------------
    d__cons |
    _cons | 12.84346 7.006265 1.83 0.067 -.8885694 26.57548
    --------------+----------------------------------------------------------------
    o_L,slackz |
    _cons | .705772 .1116469 6.32 0.000 .4869481 .9245959
    --------------+----------------------------------------------------------------
    o_munificence |
    _cons | -.4403346 1.11817 -0.39 0.694 -2.631908 1.751239
    --------------+----------------------------------------------------------------
    o_complex |
    _cons | -.0347037 .058277 -0.60 0.552 -.1489245 .0795171
    --------------+----------------------------------------------------------------
    o_dynamics |
    _cons | 59.96618 57.7011 1.04 0.299 -53.1259 173.0583
    --------------+----------------------------------------------------------------
    o_area |
    _cons | .0132941 .1780203 0.07 0.940 -.3356192 .3622074
    --------------+----------------------------------------------------------------
    o_logasset |
    _cons | 4.962371 3.533726 1.40 0.160 -1.963606 11.88835
    --------------+----------------------------------------------------------------
    o_L,logasset |
    _cons | -5.606148 3.543803 -1.58 0.114 -12.55187 1.339579
    --------------+----------------------------------------------------------------
    o_roa |
    _cons | -17.11063 6.531034 -2.62 0.009 -29.91122 -4.31004
    --------------+----------------------------------------------------------------
    o_L,roa |
    _cons | 10.60277 4.084201 2.60 0.009 2.597888 18.60766
    --------------+----------------------------------------------------------------
    o_agef |
    _cons | .0437009 .1018201 0.43 0.668 -.1558629 .2432646
    --------------+----------------------------------------------------------------
    o_edu |
    _cons | .0413938 .3063771 0.14 0.893 -.5590943 .6418819
    --------------+----------------------------------------------------------------
    o_tenure |
    _cons | .0048285 .0539864 0.09 0.929 -.100983 .1106399
    --------------+----------------------------------------------------------------
    o_sex |
    _cons | .3432621 .8802884 0.39 0.697 -1.382072 2.068596
    --------------+----------------------------------------------------------------
    o_agee |
    _cons | .0068542 .0200002 0.34 0.732 -.0323456 .0460539
    --------------+----------------------------------------------------------------
    o_officiald |
    _cons | 1.023247 1.430928 0.72 0.475 -1.78132 3.827815
    --------------+----------------------------------------------------------------
    o_L,officiald |
    _cons | -1.720383 1.335567 -1.29 0.198 -4.338046 .8972792
    --------------+----------------------------------------------------------------
    o_2005,year |
    _cons | .4571604 .33954 1.35 0.178 -.2083257 1.122646
    --------------+----------------------------------------------------------------
    o_2006,year |
    _cons | .3961391 .3428259 1.16 0.248 -.2757874 1.068066
    --------------+----------------------------------------------------------------
    o_2007,year |
    _cons | .5708944 .3403995 1.68 0.094 -.0962763 1.238065
    --------------+----------------------------------------------------------------
    o_2008,year |
    _cons | .7871243 .4595304 1.71 0.087 -.1135387 1.687787
    --------------+----------------------------------------------------------------
    o_2009,year |
    _cons | .8271088 .476522 1.74 0.083 -.1068572 1.761075
    --------------+----------------------------------------------------------------
    o_2010,year |
    _cons | 1.027484 .5088123 2.02 0.043 .0302307 2.024738
    --------------+----------------------------------------------------------------
    o_2011,year |
    _cons | .7870365 .5419654 1.45 0.146 -.2751962 1.849269
    --------------+----------------------------------------------------------------
    o__cons |
    _cons | 2.834887 6.433989 0.44 0.659 -9.7755 15.44527
    -------------------------------------------------------------------------------

    . test [d_L,deputyd=o_L,officiald]
    last test not found
    r(302);

    . test d_L,deputyd=o_L,officiald
    invalid 'officiald'
    r(198);

    . test d_L.deputyd=o_L.officiald
    d_L: operator invalid
    r(198);

    . test [d_L.deputyd=o_L.officiald]
    equation d_L not found
    r(303);

    .

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Assuming that the coefficients are at a comparable scale, you could probably use the suest command to combine the two regressions. Then you can test for equality of the coefficients with the test command. For this to work, you need to run the two xtdpdgmm regressions with the auxiliary option, store the results with estimates store, and then call suest with the two stored estimation results.

    Leave a comment:


  • Lin Liu
    replied
    I have two equations of dynamic panel data. One is y=b0+b1x1+b2x2+b3x3, and the other is y=A0+A1x1+A2x4+A3x5. I get the coefficients through the xtdpdgmm. Now, I want to compare b2 and A3 to know which has a larger effect on y. Would you give me some advice?

    Leave a comment:


  • Sebastian Kripfganz
    replied
    xtdpdgmm does not provide standardized regression coefficients. You would need to standardize all of your variables manually before running the regression.

    I can hardly imagine a situation in the context of dynamic panel models where this is meaningful. There is a lot of things that can go wrong and the interpretation of the results becomes anything than straightforward.

    Leave a comment:


  • Lin Liu
    replied
    Hello Dr. Kripfganz, how can i get standard regression coefficents from your xtdpdgmm? As far as I know,your xtdpdgmm presents nonstandard coefficents.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    The GMM estimators implemented in xtdpdgmm (or xtabond2) are intended for setting with large N relative to T. Your data set does not really fit into that category. It neither fits into the large-N, large-T world. With small N, you cannot expect to reliably estimate the optimal weighting matrix. Thus, any two-step GMM estimator (that allows for arbitrary correlation within groups over time) is eliminated from the discussion. Similarly, it is not recommended to compute robust standard errors clustered at the group level. You could still use a conventional IV/2SLS estimator with ivregress or xtivreg.

    Leave a comment:


  • Piero Best
    replied
    Hello Dr. Kripfganz,
    I really appreciate all your work.

    I am currently having trouble with my dynamic model. N = 15. T = 64.
    The empiric evidence in my paper offers a variety of dynamic panels being made and because there is endogeneity I decided to give it a try to your work in order to achieve the best results.

    in xtabond2 I had the best model by making all my variables strictly exogenous and only having the lagged depedent variable in the gmm side. But that is not what I intended.

    For long panels, which dynamic panel model could I use as an alternative? Or should I just stay with a xtreg fe despite endogeneity being present?

    xtabond2 ROA L.ROA creditgrowth Liquidity Provsdefault RatioCapGlobal D.vix Buffer LCR NSFR RR Tier1, gmm(L.ROA. collapse) iv((creditgrowth Liquidity Provsdefault RatioCapGlobal D.vix Buffer LCR NSFR RR Tier1)) robust orthogonal pca

    also how can i run this xtabond2 model in xtdpdgmm.

    Again i really appreciate all your work, thank you in advance.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Maybe the following official video tutorial is of help:
    Profile plots and interaction plots in Stata®: Interactions of two continuous variables

    Leave a comment:


  • Lin Liu
    replied
    I find that your margins and marginsplot can only analyze the interaction of one categorical variable and continuous variable or two categorical variables. But I want to analyze the interaction of two continuous variables, how can I do?
    Last edited by Lin Liu; 23 Oct 2020, 07:25.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    I believe you can use margins and marginsplot for that purpose. I have not used them much myself.

    Leave a comment:


  • Lin Liu
    replied
    Dear,Kripfganz, would you recommend me how to plot the interaction effect of dynamic panel data?

    Leave a comment:


  • Sebastian Kripfganz
    replied
    I am sorry that the bug had significant effects on your results.

    From your results, it seems that there are some issues primarily related to the variables offideputy and offdepdyn. But there is not much more I can say about that. While this is probably not satisfying, sometimes we may just have to live with some imperfection in our models. If you can justify your model specification on theoretical grounds, it might be acceptable to put less emphasis on the specification tests. This also depends on whether the troublesome variables are your main variables of interest or just some control variables. The specification tests then could tell us that we need to be cautious with the interpretation of our results. A perfect model may not exist given the available data.

    Leave a comment:


  • Lin Liu
    replied
    After you fixed the interaction term bug, the code is the same as the above, but the results are very different.

    . xtdpdgmm L(0/1).slackz munificence complex dynamics area L(0/1).logasset L(0/1).roa agef edu tenure sex agee L(0/1).offideputy off
    > ideputy#c.dynamics l.offdepdyn, model(fod) collapse gmm(slackz, lag(1 2)) gmm(munificence, lag(0 1)) gmm(complex, lag(0 1)) gmm(dynamics,
    > lag(0 1)) gmm(area, lag(0 0)) gmm(logasset, lag(1 2)) gmm(roa, lag(1 2)) gmm(agef, lag(0 1)) gmm(edu, lag(0 0)) gmm(sex, lag(0 0) ) gmm
    > (tenure, lag(0 1)) gmm(agee, lag(0 0)) gmm(offideputy, lag(1 2)) gmm(offideputy#c.dynamics, lag(1 2)) gmm(l.offdepdyn, lag(1 2)) gmm(ar
    > ea, lag(0 0) model(md)) gmm(edu, lag(0 0) model(md)) gmm( sex, lag(0 0) model(md)) gmm(agee, lag(0 0) model(md)) gmm(slackz, lag(1 1) di
    > ff model(level)) gmm(munificence, lag(0 0) diff model(level)) gmm(complex, lag(0 0) diff model(level)) gmm(dynamics, lag(0 0) diff model(
    > level)) gmm(area, lag(0 0) model(level)) gmm( logasset, lag(1 1) diff model(level)) gmm( roa, lag(1 1) diff model(level)) gmm( agef, lag(0
    > 0) diff model(level)) gmm(edu, lag(0 0) model(level)) gmm(tenure, lag(0 0) diff model(level)) gmm(sex, lag(0 0) model(level)) gmm(ag
    > ee , lag(0 0) model(level)) gmm(offideputy, lag(1 1) diff model(level)) gmm(offideputy#c.dynamics, lag(1 1) diff model(level)) gmm(l.offde
    > pdyn, lag(1 1) diff model(level)) teffects two vce(r) overid

    Generalized method of moments estimation

    Fitting full model:
    Step 1 f(b) = .1478547
    Step 2 f(b) = .08858372

    Fitting reduced model 1:
    Step 1 f(b) = .07959146

    Fitting reduced model 2:
    Step 1 f(b) = .08288294

    Fitting reduced model 3:
    Step 1 f(b) = .06616146

    Fitting reduced model 4:
    Step 1 f(b) = .07903324

    Fitting reduced model 5:
    Step 1 f(b) = .08290025

    Fitting reduced model 6:
    Step 1 f(b) = .08119472

    Fitting reduced model 7:
    Step 1 f(b) = .08481893

    Fitting reduced model 8:
    Step 1 f(b) = .08344108

    Fitting reduced model 9:
    Step 1 f(b) = .08596838

    Fitting reduced model 10:
    Step 1 f(b) = .08845637

    Fitting reduced model 11:
    Step 1 f(b) = .08755818

    Fitting reduced model 12:
    Step 1 f(b) = .08686272

    Fitting reduced model 13:
    Step 1 f(b) = .0616538

    Fitting reduced model 14:
    Step 1 f(b) = .05377071

    Fitting reduced model 15:
    Step 1 f(b) = .07578047

    Fitting reduced model 17:
    Step 1 f(b) = .08522976

    Fitting reduced model 18:
    Step 1 f(b) = .08837233

    Fitting reduced model 19:
    Step 1 f(b) = .08831736

    Fitting reduced model 20:
    Step 1 f(b) = .08690937

    Fitting reduced model 21:
    Step 1 f(b) = .08840091

    Fitting reduced model 22:
    Step 1 f(b) = .08839514

    Fitting reduced model 23:
    Step 1 f(b) = .08461019

    Fitting reduced model 24:
    Step 1 f(b) = .07909719

    Fitting reduced model 25:
    Step 1 f(b) = .08036437

    Fitting reduced model 26:
    Step 1 f(b) = .08538299

    Fitting reduced model 27:
    Step 1 f(b) = .08597612

    Fitting reduced model 28:
    Step 1 f(b) = .08441558

    Fitting reduced model 29:
    Step 1 f(b) = .08858137

    Fitting reduced model 30:
    Step 1 f(b) = .08845756

    Fitting reduced model 31:
    Step 1 f(b) = .08782259

    Fitting reduced model 32:
    Step 1 f(b) = .08478439

    Fitting reduced model 33:
    Step 1 f(b) = .08518175

    Fitting reduced model 34:
    Step 1 f(b) = .08184376

    Fitting reduced model 35:
    Step 1 f(b) = .03041028

    Fitting no-fodev model:
    Step 1 f(b) = .00205029

    Fitting no-mdev model:
    Step 1 f(b) = .06910487

    Fitting no-level model:
    Step 1 f(b) = .00290704

    Group variable: code Number of obs = 1142
    Time variable: year Number of groups = 257

    Moment conditions: linear = 52 Obs per group: min = 1
    nonlinear = 0 avg = 4.44358
    total = 52 max = 8

    (Std. Err. adjusted for 257 clusters in code)
    ---------------------------------------------------------------------------------------
    | WC-Robust
    slackz | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    ----------------------+----------------------------------------------------------------
    slackz |
    L1. | .6368078 .1193084 5.34 0.000 .4029676 .870648
    |
    munificence | -.662565 .78593 -0.84 0.399 -2.202959 .8778295
    complex | -.0397233 .051535 -0.77 0.441 -.1407301 .0612835
    dynamics | 42.29624 78.94277 0.54 0.592 -112.4287 197.0212
    area | -.0145929 .1966068 -0.07 0.941 -.3999352 .3707494
    |
    logasset |
    --. | 6.389995 3.03789 2.10 0.035 .4358389 12.34415
    L1. | -7.461377 3.150692 -2.37 0.018 -13.63662 -1.286134
    |
    roa |
    --. | -10.47766 5.867424 -1.79 0.074 -21.9776 1.022282
    L1. | 5.698477 3.432466 1.66 0.097 -1.029033 12.42599
    |
    agef | .0420754 .0928689 0.45 0.651 -.1399443 .2240951
    edu | -.0299814 .0794425 -0.38 0.706 -.1856859 .1257231
    tenure | .0034255 .0496194 0.07 0.945 -.0938267 .1006777
    sex | .3800276 .4998849 0.76 0.447 -.5997288 1.359784
    agee | .0020611 .0118086 0.17 0.861 -.0210832 .0252054
    |
    offideputy |
    --. | 1.167884 3.243949 0.36 0.719 -5.190138 7.525906
    L1. | -1.071466 4.479092 -0.24 0.811 -9.850325 7.707393
    |
    offideputy#c.dynamics |
    1 | 15.51207 178.1701 0.09 0.931 -333.6949 364.719
    |
    offdepdyn |
    L1. | -94.22112 231.9872 -0.41 0.685 -548.9076 360.4654
    |
    year |
    2005 | .4139393 .2505291 1.65 0.098 -.0770886 .9049672
    2006 | .4621536 .2813397 1.64 0.100 -.0892621 1.013569
    2007 | .4226051 .3122018 1.35 0.176 -.1892992 1.034509
    2008 | .8698897 .4164206 2.09 0.037 .0537203 1.686059
    2009 | .6991356 .3981517 1.76 0.079 -.0812274 1.479499
    2010 | 1.047527 .4302469 2.43 0.015 .2042586 1.890795
    2011 | .8706683 .4820771 1.81 0.071 -.0741855 1.815522
    |
    _cons | 7.557025 4.05535 1.86 0.062 -.3913147 15.50536
    ---------------------------------------------------------------------------------------
    Instruments corresponding to the linear moment conditions:
    1, model(fodev):
    L1.slackz L2.slackz
    2, model(fodev):
    munificence L1.munificence
    3, model(fodev):
    complex L1.complex
    4, model(fodev):
    dynamics
    5, model(fodev):
    area
    6, model(fodev):
    L1.logasset L2.logasset
    7, model(fodev):
    L1.roa L2.roa
    8, model(fodev):
    agef
    9, model(fodev):
    edu
    10, model(fodev):
    sex
    11, model(fodev):
    tenure L1.tenure
    12, model(fodev):
    agee
    13, model(fodev):
    L1.offideputy L2.offideputy
    14, model(fodev):
    L1.(0b.offideputy#c.dynamics) L2.(0b.offideputy#c.dynamics)
    L1.(1.offideputy#c.dynamics) L2.(1.offideputy#c.dynamics)
    15, model(fodev):
    L2.L.offdepdyn
    17, model(mdev):
    edu
    18, model(mdev):
    sex
    19, model(mdev):
    agee
    20, model(level):
    L1.D.slackz
    21, model(level):
    D.munificence
    22, model(level):
    D.complex
    23, model(level):
    D.dynamics
    24, model(level):
    area
    25, model(level):
    L1.D.logasset
    26, model(level):
    L1.D.roa
    27, model(level):
    D.agef
    28, model(level):
    edu
    29, model(level):
    D.tenure
    30, model(level):
    sex
    31, model(level):
    agee
    32, model(level):
    L1.D.offideputy
    33, model(level):
    L1.D.(0b.offideputy#c.dynamics) L1.D.(1.offideputy#c.dynamics)
    34, model(level):
    L1.D.L.offdepdyn
    35, model(level):
    2005bn.year 2006.year 2007.year 2008.year 2009.year 2010.year 2011.year
    36, model(level):
    _cons

    . estat serial, ar(1/3)

    Arellano-Bond test for autocorrelation of the first-differenced residuals
    H0: no autocorrelation of order 1: z = -2.6878 Prob > |z| = 0.0072
    H0: no autocorrelation of order 2: z = -0.7629 Prob > |z| = 0.4455
    H0: no autocorrelation of order 3: z = 0.7649 Prob > |z| = 0.4444

    .
    . estat overid

    Sargan-Hansen test of the overidentifying restrictions
    H0: overidentifying restrictions are valid

    2-step moment functions, 2-step weighting matrix chi2(26) = 22.7660
    Prob > chi2 = 0.6461

    2-step moment functions, 3-step weighting matrix chi2(26) = 25.7361
    Prob > chi2 = 0.4777

    .
    . estat overid, difference

    Sargan-Hansen (difference) test of the overidentifying restrictions
    H0: (additional) overidentifying restrictions are valid

    2-step weighting matrix from full model

    | Excluding | Difference
    Moment conditions | chi2 df p | chi2 df p
    ------------------+-----------------------------+-----------------------------
    1, model(fodev) | 20.4550 24 0.6706 | 2.3110 2 0.3149
    2, model(fodev) | 21.3009 24 0.6209 | 1.4651 2 0.4807
    3, model(fodev) | 17.0035 24 0.8485 | 5.7625 2 0.0561
    4, model(fodev) | 20.3115 25 0.7303 | 2.4545 1 0.1172
    5, model(fodev) | 21.3054 25 0.6755 | 1.4607 1 0.2268
    6, model(fodev) | 20.8670 24 0.6466 | 1.8990 2 0.3869
    7, model(fodev) | 21.7985 24 0.5913 | 0.9676 2 0.6165
    8, model(fodev) | 21.4444 25 0.6676 | 1.3217 1 0.2503
    9, model(fodev) | 22.0939 25 0.6303 | 0.6721 1 0.4123
    10, model(fodev) | 22.7333 25 0.5931 | 0.0327 1 0.8564
    11, model(fodev) | 22.5025 24 0.5493 | 0.2636 2 0.8765
    12, model(fodev) | 22.3237 25 0.6170 | 0.4423 1 0.5060
    13, model(fodev) | 15.8450 24 0.8936 | 6.9210 2 0.0314
    14, model(fodev) | 13.8191 22 0.9078 | 8.9469 4 0.0624
    15, model(fodev) | 19.4756 25 0.7738 | 3.2904 1 0.0697
    17, model(mdev) | 21.9040 25 0.6413 | 0.8620 1 0.3532
    18, model(mdev) | 22.7117 25 0.5944 | 0.0543 1 0.8157
    19, model(mdev) | 22.6976 25 0.5952 | 0.0685 1 0.7936
    20, model(level) | 22.3357 25 0.6163 | 0.4303 1 0.5118
    21, model(level) | 22.7190 25 0.5940 | 0.0470 1 0.8284
    22, model(level) | 22.7176 25 0.5941 | 0.0485 1 0.8258
    23, model(level) | 21.7448 25 0.6504 | 1.0212 1 0.3122
    24, model(level) | 20.3280 25 0.7294 | 2.4380 1 0.1184
    25, model(level) | 20.6536 25 0.7118 | 2.1124 1 0.1461
    26, model(level) | 21.9434 25 0.6390 | 0.8226 1 0.3644
    27, model(level) | 22.0959 25 0.6302 | 0.6702 1 0.4130
    28, model(level) | 21.6948 25 0.6533 | 1.0712 1 0.3007
    29, model(level) | 22.7654 25 0.5913 | 0.0006 1 0.9804
    30, model(level) | 22.7336 25 0.5931 | 0.0324 1 0.8571
    31, model(level) | 22.5704 25 0.6026 | 0.1956 1 0.6583
    32, model(level) | 21.7896 25 0.6479 | 0.9764 1 0.3231
    33, model(level) | 21.8917 24 0.5857 | 0.8743 2 0.6459
    34, model(level) | 21.0338 25 0.6907 | 1.7322 1 0.1881
    35, model(level) | 7.8154 19 0.9884 | 14.9506 7 0.0366
    model(fodev) | 0.5269 1 0.4679 | 22.2391 25 0.6219
    model(mdev) | 17.7600 23 0.7704 | 5.0061 3 0.1714
    model(level) | 0.7471 3 0.8621 | 22.0189 23 0.5191

    .
    . underid, overid underid kp sw noreport

    collinearity check...
    collinearities detected in [Y X] (right to left): 0o.offideputy#co.dynamics
    collinearities detected in [Y X Z] (right to left): __alliv_51 __alliv_50 __alliv_49 __alliv_48 __alliv_47 __alliv_46 __alliv_45 __alliv_40
    > __alliv_39 __alliv_37 __alliv_33 0o.offideputy#co.dynamics
    collinearities detected in [X Z Y] (right to left): 2011.year 2010.year 2009.year 2008.year 2007.year 2006.year 2005bn.year 0o.offideputy#co
    > .dynamics agee sex edu area
    warning: collinearities detected, reparameterization may be advisable

    Overidentification test: Kleibergen-Paap robust LIML-based (LM version)
    Test statistic robust to heteroskedasticity and clustering on code
    j= 19.93 Chi-sq( 25) p-value=0.7506

    Underidentification test: Kleibergen-Paap robust LIML-based (LM version)
    Test statistic robust to heteroskedasticity and clustering on code
    j= 20.84 Chi-sq( 26) p-value=0.7501

    2-step GMM J underidentification stats by regressor:
    j= 56.19 Chi-sq( 26) p-value=0.0008 L.slackz
    j= 111.04 Chi-sq( 26) p-value=0.0000 munificence
    j= 85.75 Chi-sq( 26) p-value=0.0000 complex
    j= 23.28 Chi-sq( 26) p-value=0.6700 dynamics
    j= 24.35 Chi-sq( 26) p-value=0.6107 area
    j= 28.99 Chi-sq( 26) p-value=0.3614 logasset
    j= 27.10 Chi-sq( 26) p-value=0.4585 L.logasset
    j= 39.83 Chi-sq( 26) p-value=0.0532 roa
    j= 36.92 Chi-sq( 26) p-value=0.0965 L.roa
    j= 44.47 Chi-sq( 26) p-value=0.0185 agef
    j= 41.20 Chi-sq( 26) p-value=0.0394 edu
    j= 36.91 Chi-sq( 26) p-value=0.0967 tenure
    j= 24.53 Chi-sq( 26) p-value=0.6007 sex
    j= 31.68 Chi-sq( 26) p-value=0.2440 agee
    j= 11.02 Chi-sq( 26) p-value=0.9972 offideputy
    j= 19.34 Chi-sq( 26) p-value=0.8574 L.offideputy
    j= 11.02 Chi-sq( 26) p-value=0.9972 0b.offideputy#co.dynamics
    j= 11.02 Chi-sq( 26) p-value=0.9972 1.offideputy#c.dynamics
    j= 17.37 Chi-sq( 26) p-value=0.9217 L.offdepdyn
    j= 74.48 Chi-sq( 26) p-value=0.0000 2005bn.year
    j= 74.48 Chi-sq( 26) p-value=0.0000 2006.year
    j= 74.48 Chi-sq( 26) p-value=0.0000 2007.year
    j= 74.48 Chi-sq( 26) p-value=0.0000 2008.year
    j= 74.48 Chi-sq( 26) p-value=0.0000 2009.year
    j= 74.48 Chi-sq( 26) p-value=0.0000 2010.year
    j= 74.48 Chi-sq( 26) p-value=0.0000 2011.year

    Leave a comment:


  • Sebastian Kripfganz
    replied
    From a programmer's perspective, factor variables and interaction terms are some of the nastiest animals in the Stata universe. They always find a way to escape your carefully designed algorithms. So it happened again with xtdpdgmm. There was unfortunately an annoying bug that could result in incorrect estimates when interaction terms were specified as instruments. I hopefully now managed to tame these animals once and for all with the latest bug fix.

    Version 2.3.1 is now available on my personal website and on SSC (with the usual thanks to Kit Baum).
    Code:
    adoupdate xtdpdgmm, update

    Leave a comment:

Working...
X