Announcement

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

  • #31
    Dear all,

    I would like to ask about the Ramsey Reset and other postestimation to test the appropriation of models in Stata. I carried out Heckman model and PPML model as the results below:

    heckman lntrade lngdpexp lngdpimp lnstariff binary_ntm LPIexp LPIimp DBIexp DBIimp TABexp
    > TABimp,select(lndist lnstariff binary_ntm LPIimp DBIimp TABimp)

    Heckman selection model Number of obs = 572
    (regression model with sample selection) Censored obs = 12
    Uncensored obs = 560

    Wald chi2(10) = 499.22
    Log likelihood = -1044.587 Prob > chi2 = 0.0000

    ------------------------------------------------------------------------------
    lntrade | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    lntrade |
    lngdpexp | .5063633 .080751 6.27 0.000 .3480942 .6646323
    lngdpimp | .7275791 .0682668 10.66 0.000 .5937787 .8613796
    lnstariff | .6063113 2.680599 0.23 0.821 -4.647566 5.860188
    binary_ntm | -.0742413 .1681425 -0.44 0.659 -.4037945 .2553118
    LPIexp | 2.790873 .3975619 7.02 0.000 2.011666 3.57008
    LPIimp | 1.525779 .3875687 3.94 0.000 .7661587 2.2854
    DBIexp | .0444199 .0073635 6.03 0.000 .0299877 .058852
    DBIimp | -.017263 .0087484 -1.97 0.048 -.0344097 -.0001164
    TABexp | -.1215937 .0143852 -8.45 0.000 -.1497883 -.0933992
    TABimp | -.0647002 .0143956 -4.49 0.000 -.0929151 -.0364853
    _cons | -25.61454 4.627234 -5.54 0.000 -34.68375 -16.54533
    -------------+----------------------------------------------------------------
    select |
    lndist | 1.007029 .5527868 1.82 0.068 -.0764133 2.090471
    lnstariff | 1.017142 5.030818 0.20 0.840 -8.843079 10.87736
    binary_ntm | -.074987 .3525874 -0.21 0.832 -.7660456 .6160717
    LPIimp | 2.020955 .7232403 2.79 0.005 .6034304 3.43848
    DBIimp | -.0299147 .0181729 -1.65 0.100 -.0655329 .0057036
    TABimp | .000585 .0310995 0.02 0.985 -.0603688 .0615389
    _cons | -13.32619 9.255747 -1.44 0.150 -31.46712 4.814745
    -------------+----------------------------------------------------------------
    /athrho | .2664853 .2707918 0.98 0.325 -.2642568 .7972274
    /lnsigma | .3678971 .0303897 12.11 0.000 .3083344 .4274599
    -------------+----------------------------------------------------------------
    rho | .2603513 .2524367 -.2582728 .6624839
    sigma | 1.444693 .0439038 1.361156 1.533358
    lambda | .3761279 .3669703 -.3431206 1.095376
    ------------------------------------------------------------------------------
    LR test of indep. eqns. (rho = 0): chi2(1) = 0.78 Prob > chi2 = 0.3762

    .xtpoisson tradevalue lngdpexp lngdpimp lndist lnstariff binary_ntm DBIexp DBIimp LPIexp LP
    > Iimp TABexp TABimp

    Fitting Poisson model:

    Random-effects Poisson regression Number of obs = 572
    Group variable: pair Number of groups = 52

    Random effects u_i ~ Gamma Obs per group:
    min = 11
    avg = 11.0
    max = 11

    Wald chi2(11) = 3.02e+06
    Log likelihood = -1385085.5 Prob > chi2 = 0.0000

    ------------------------------------------------------------------------------
    tradevalue | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    lngdpexp | .9250992 .0009164 1009.55 0.000 .9233032 .9268952
    lngdpimp | .1529191 .0021301 71.79 0.000 .1487442 .1570939
    lndist | 5.105654 1.137417 4.49 0.000 2.876358 7.33495
    lnstariff | -.8488981 .0104352 -81.35 0.000 -.8693508 -.8284454
    binary_ntm | -.1983055 .0004042 -490.56 0.000 -.1990978 -.1975132
    DBIexp | -.0098621 .0000587 -167.95 0.000 -.0099772 -.009747
    DBIimp | -.0040748 .0000569 -71.67 0.000 -.0041862 -.0039633
    LPIexp | .10246 .0013376 76.60 0.000 .0998384 .1050816
    LPIimp | .105585 .0023256 45.40 0.000 .1010269 .1101431
    TABexp | -.0102395 .0000545 -187.91 0.000 -.0103463 -.0101327
    TABimp | -.0052576 .0000682 -77.04 0.000 -.0053914 -.0051239
    _cons | -60.89114 10.26587 -5.93 0.000 -81.01187 -40.7704
    -------------+----------------------------------------------------------------
    /lnalpha | .6251173 .162936 .3057687 .944466
    -------------+----------------------------------------------------------------
    alpha | 1.868465 .3044402 1.357668 2.57144
    ------------------------------------------------------------------------------
    LR test of alpha=0: chibar2(01) = 2.7e+07 Prob >= chibar2 = 0.000


    Looking at the results, I see some problems. First, some factors do not meet the expected sign as literature (such as: distance, or tariff). Secondly, i know that the ppml have too much error robust and the database i used do not have the zero-traded value ( only 12/572 observations). thus, I wonder about which models is more appropriate.

    Some papers mentioned about Ramsey Reset test. Does is use for the case?

    I am a Stata beginner so that i hope to receive all supports.

    Thanks

    Comment


    • #32
      Dear Bich Ngoc Nguyen

      The sample selection estimator is not appropriate in this context. Also, for xtpoisson you need fixed effect; the random effects model is not suitable.

      Best wishes,

      Joao

      Comment


      • #33
        Dear Sir,

        In an earlier you mentioned that RESET test cannot be used to compare between models with different set of regressors.
        I have a similar query.
        While comparing OLS and PPML with the same set of regressors, OLS passes the RESET test but PPMl does not.
        The results using OLS with country specific and time fixed effects are:
        reg ln_trade time_fe* exp_fe* imp_fe* ln_GDP_i ln_GDP_j ln_GDPPC_i ln_GDPPC_j ln_DISTANCE LANG_off comcol BORDER TC_ij TD_iin_jout TD_iout_
        > jin ,cluster(pair_id)
        note: time_fe2 omitted because of collinearity
        note: exp_fe11 omitted because of collinearity
        note: imp_fe11 omitted because of collinearity

        Linear regression Number of obs = 39538
        F(182, 3995) = .
        Prob > F = .
        R-squared = 0.5452
        Root MSE = 2.9177

        (Std. Err. adjusted for 3996 clusters in pair_id)
        ------------------------------------------------------------------------------
        | Robust
        ln_trade | Coef. Std. Err. t P>|t| [95% Conf. Interval]
        -------------+----------------------------------------------------------------
        ln_GDP_i | 1.245375 .2431161 5.12 0.000 .7687323 1.722019
        ln_GDP_j | 1.188227 .259224 4.58 0.000 .6800034 1.696451
        ln_GDPPC_i | -1.165797 .2554174 -4.56 0.000 -1.666557 -.6650363
        ln_GDPPC_j | -.6012588 .2657007 -2.26 0.024 -1.122181 -.0803371
        ln_DISTANCE | -2.575251 .0718338 -35.85 0.000 -2.716086 -2.434417
        LANG_off | .1444777 .1361866 1.06 0.289 -.1225241 .4114795
        comcol | .7577103 .2001424 3.79 0.000 .3653195 1.150101
        BORDER | .4226024 .2374454 1.78 0.075 -.042923 .8881278
        TC_ij | .0651144 .2272669 0.29 0.775 -.3804556 .5106844
        TD_iin_jout | .0152666 .1673667 0.09 0.927 -.3128655 .3433986
        TD_iout_jin | -.0923774 .1227574 -0.75 0.452 -.3330505 .1482957
        _cons | -24.14524 5.945621 -4.06 0.000 -35.80198 -12.48851

        ------------------------------------------------------------------------------

        RESET test result:
        F( 1, 3995) = 0.13
        Prob > F = 0.7189

        Results using PPML:
        ppml trade time_fe* exp_fe* imp_fe* ln_GDP_i ln_GDP_j ln_GDPPC_i ln_GDPPC_j ln_DISTANCE LANG_off comcol BORDER TC_ij TD_iin_jout TD_iout_ji
        > n ,cluster(pair_id)
        Number of parameters: 184
        Number of observations: 67327
        Pseudo log-likelihood: -3.217e+09
        R-squared: .7117156
        Option strict is: off
        (Std. Err. adjusted for 4013 clusters in pair_id)
        ------------------------------------------------------------------------------
        | Robust
        trade | Coef. Std. Err. z P>|z| [95% Conf. Interval]
        -------------+----------------------------------------------------------------
        ln_GDP_i | .7492899 .4156265 1.80 0.071 -.065323 1.563903
        ln_GDP_j | 1.881322 .4708665 4.00 0.000 .9584406 2.804203
        ln_GDPPC_i | -.6207829 .4301451 -1.44 0.149 -1.463852 .2222861
        ln_GDPPC_j | -1.473061 .486012 -3.03 0.002 -2.425627 -.5204947
        ln_DISTANCE | -1.1692 .0574596 -20.35 0.000 -1.281818 -1.056581
        LANG_off | .3033443 .1929194 1.57 0.116 -.0747707 .6814594
        comcol | .1947252 .2565154 0.76 0.448 -.3080358 .6974862
        BORDER | .1244633 .1567582 0.79 0.427 -.1827771 .4317037
        TC_ij | -.1083682 .1010755 -1.07 0.284 -.3064726 .0897361
        TD_iin_jout | -.0093952 .1330421 -0.07 0.944 -.270153 .2513626
        TD_iout_jin | .1840264 .1735568 1.06 0.289 -.1561387 .5241915
        _cons | -24.5791 8.71941 -2.82 0.005 -41.66883 -7.489366

        ------------------------------------------------------------------------------
        RESET test result:
        chi2( 1) = 6.98
        Prob > chi2 = 0.0082

        The sample has a maximum of 77 countries for 17 years. The dependent variable is exports from i to j for a particular commodity at HS 4-digit. and the variables of interest are Trade creation (TC) and Trade Diversion (TD). Also except AIFTA (which I am interested in) I haven't controlled for other FTAs here.
        Would controlling for more FTAs make a difference?

        Sir, please could you suggest if these estimations are correct. If not, where am I going wrong?

        Thank you.

        Best regards
        Richa

        Comment


        • #34
          Dear Richa Khurana,

          We know that OLS is badly biased, so there is not much point in running it; not even as a robustness check. So, the question is how to improve your model.

          I often see gravity models performing poorly when the sample cover only a small number of countries; can you get more data? Also, maybe you can include variables that make sense for the particular product you are considering.

          Best wishes,

          Joao

          Comment


          • #35
            Dear Sir,

            Thank you for your advice. I can try adding a few more countries, but not many as the sample already includes India's major trading partners in this particular commodity (HS code: 2710). Adding more would mostly increase the zeroes.
            I will try and include more variables.
            Sir will controlling for other FTAs (besides other variables) help here?

            Best regards
            Richa

            Comment


            • #36
              Dear Sir,

              Also could it be possible that controlling only for country specific fixed effects in a panel setting causing the bias?

              Best regards
              Richa

              Comment


              • #37
                Including the countries with zero trade would be my first priority; they are not relevant for OLS, but matter for Poisson.

                Best wishes,

                Joao

                Comment


                • #38
                  Sir, 90 percent zeroes in dataset would also make sense?

                  Best regards
                  Richa

                  Comment


                  • #39
                    Yes, that's not a problem :-)

                    Joao

                    Comment


                    • #40
                      Great! Thank you very much for your advice and suggestions Sir!

                      Best regards
                      Richa

                      Comment


                      • #41
                        Dear Sir,

                        Please help me with one more thing.
                        The result given above was for a commodity at HS 4-digit.
                        At 2-digit, out of 32 commodities, the model is correctly specified for in 8 cases, but not for the rest. It is also different at aggregate level.
                        Why should the results vary like this with the same specification everywhere?

                        At aggregate level, also controlling for other FTAs gives the following result for the reset test:

                        ppml trade time_fe* exp_fe* imp_fe* ln_GDP_i ln_GDP_j ln_GDPPC_i ln_GDPPC_j ln_DISTANCE border lang_off comcol tc_ij td_iin_jout td_iout_ji
                        > n usacan eueu euzaf eumar euisr sadcsadc indlka eujor cancri gccgcc cezcez euegy paklka turtun eudza eac saftasafta turmar indbtn egytur ag
                        > adiragadir aseanjpn eupng turjor turchl saftaafg chlmys canjor kortur chlvnm sadcsyc turmys euciv eugha fit2, cluster(pair_id)

                        note: checking the existence of the estimates
                        WARNING: trade has very large values, consider rescaling
                        WARNING: ln_GDP_i has very large values, consider rescaling or recentering
                        WARNING: ln_GDP_j has very large values, consider rescaling or recentering
                        WARNING: fit2 has very large values, consider rescaling or recentering

                        Number of regressors excluded to ensure that the estimates exist: 4
                        Excluded regressors: exp_fe_52 exp_fe_68 eac sadcsyc
                        Number of observations excluded: 1654

                        note: time_fe1 omitted because of collinearity
                        note: exp_fe_78 omitted because of collinearity
                        note: imp_fe47 omitted because of collinearity

                        note: starting ppml estimation
                        note: trade has noninteger values

                        Iteration 1: deviance = 1.10e+11
                        Iteration 2: deviance = 7.10e+10
                        Iteration 3: deviance = 6.16e+10
                        Iteration 4: deviance = 5.73e+10
                        Iteration 5: deviance = 5.60e+10
                        Iteration 6: deviance = 5.58e+10
                        Iteration 7: deviance = 5.57e+10
                        Iteration 8: deviance = 5.57e+10
                        Iteration 9: deviance = 5.57e+10
                        Iteration 10: deviance = 5.57e+10
                        Iteration 11: deviance = 5.57e+10
                        Iteration 12: deviance = 5.57e+10
                        Iteration 13: deviance = 5.57e+10
                        Iteration 14: deviance = 5.57e+10
                        Iteration 15: deviance = 5.57e+10
                        Iteration 16: deviance = 5.57e+10

                        Number of parameters: 219
                        Number of observations: 105004
                        Pseudo log-likelihood: -2.787e+10
                        R-squared: .88545331
                        Option strict is: off
                        (Std. Err. adjusted for 6320 clusters in pair_id)
                        ------------------------------------------------------------------------------
                        | Robust
                        trade | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                        -------------+----------------------------------------------------------------
                        ln_GDP_i | 1.291668 .2434751 5.31 0.000 .8144654 1.76887
                        ln_GDP_j | 1.204141 .1897354 6.35 0.000 .8322661 1.576015
                        ln_GDPPC_i | -.2112285 .2002902 -1.05 0.292 -.6037902 .1813331
                        ln_GDPPC_j | -.1840733 .1263164 -1.46 0.145 -.431649 .0635024
                        ln_DISTANCE | -.9931771 .1534526 -6.47 0.000 -1.293939 -.6924156
                        border | .6589599 .1267878 5.20 0.000 .4104603 .9074595
                        lang_off | .5744317 .1208803 4.75 0.000 .3375106 .8113528
                        comcol | .1915244 .1508954 1.27 0.204 -.1042252 .4872741
                        tc_ij | .0000781 .1065739 0.00 0.999 -.2088028 .208959
                        td_iin_jout | -.4089032 .080488 -5.08 0.000 -.5666568 -.2511496
                        td_iout_jin | -.2255814 .0631433 -3.57 0.000 -.3493401 -.1018228
                        usacan | .8043289 .2457584 3.27 0.001 .3226513 1.286007
                        eueu | .724366 .1322358 5.48 0.000 .4651886 .9835433
                        euzaf | 1.226822 .2210137 5.55 0.000 .7936435 1.660001
                        eumar | 1.631674 .3095517 5.27 0.000 1.024963 2.238384
                        euisr | .368643 .2242583 1.64 0.100 -.0708951 .8081811
                        sadcsadc | 1.989663 .432692 4.60 0.000 1.141602 2.837724
                        indlka | 2.530628 .6720177 3.77 0.000 1.213497 3.847758
                        eujor | -.475621 .2021359 -2.35 0.019 -.8718 -.0794419
                        fit2 | -.0193551 .0074963 -2.58 0.010 -.0340475 -.0046626
                        _cons | -38.39923 6.741989 -5.70 0.000 -51.61328 -25.18517
                        ------------------------------------------------------------------------------

                        . do "C:\Users\Richa\AppData\Local\Temp\STD01000000.tmp "

                        . test fit2=0

                        ( 1) fit2 = 0

                        chi2( 1) = 6.67
                        Prob > chi2 = 0.0098

                        Can I say the model is correctly specified at 5 per cent?

                        Is it wrong to use same dataset at all levels?

                        Best regards
                        Richa



                        Comment


                        • #42
                          Dear Prof. @Joao Santos Silva,

                          I have couple of questions regarding ppml:

                          1) Clarification: Will ppml with FE dummies (country x time) in panel data yield the same results to that of xtpqml? Following commands (as example):
                          Code:
                          ppml trade(in levels) indep exporter*time_FE importer*time_FE, cluster(countrypair)
                          
                          xtpqml trade(in levels) indep, fe cluster(countrypair)
                          Will above two commands yield the same results? Reading some of the stata threads suggests me so.

                          2) Under/Over trading question: Refering to 'undertrading/overtrading' point in log of gravity website, can you please provide the reference of the paper where you have used the commands? It will help me to understand how you are measuring undertrading and overtrading. I could not follow your codes from gen yhat = exp(fitted7) command:
                          Code:
                          xtpqml rtrade_w0 cu ldist lrgdp_w0 lrgdppc_w0 comlang comborder fta landl island lareap comcol curcol evercol comctry , fe i(pairid)
                          predict fitted7, xb
                          gen yhat=exp(fitted7)
                          egen meany=mean(rtrade_w0) if yhat !=., by(pairid)
                          egen meanyhat=mean(yhat), by(pairid)
                          gen exp_alpha=meany/meanyhat
                          gen error_y=rtrade_w0 -yhat*exp_alpha
                          
                          su  error_y
                          i.e., why you have considered expotential term (exp(fitted7)), mean of trade and yhat, and error_y = rtrade_w0 - yhat*exp_alpha?

                          I will appreciate your guidance.

                          Regards,
                          Manmeet Ajmani
                          Stata 14.2

                          Comment


                          • #43
                            Dear Manmeet Ajmani,

                            1 - It is true that the results of xtpoisson can be obtained with ppml if this includes the right set of dummies. However, I do not think the commands you present will lead to the same result because there are 2 sets of FE in ppml and only one set in xtpoisson.

                            2 - I never used those commands on a paper; I wrote them to help someone. After taking the exponential, we then need to estimate the fixed effects and that is done based on the fact that the fixed effect sets the mean of predicted trade in each group equal to the mean of actual trade in the group.

                            Best wishes,

                            Joao

                            Comment


                            • #44
                              Dear Prof. @Joao Santos Silva,

                              I will be grateful if you can provide your feedback.

                              Objective of my research

                              I’m interested in finding out whether South Asian countries and Southeast Asian countries are under- or over-trading.

                              Description of data:
                              My data has 229320 observations of 105 exporter and importer countries, from year 1996 to 2016.
                              Code:
                              * Example generated by -dataex-. To install: ssc install dataex
                              clear
                              input int year str18 productdescription str26(reportername partnername) str6 tradeflowname float DefTradeMill str7 countrypair
                              2004 "Agricultural Trade" "Ireland"              "Sudan"              "Export"         0 "IRL SUD"
                              2014 "Agricultural Trade" "Saudi Arabia"         "Nepal"              "Export"         0 "SAU NPL"
                              2015 "Agricultural Trade" "Ghana"                "Paraguay"           "Export"         0 "GHA PRY"
                              2010 "Agricultural Trade" "India"                "Malaysia"           "Export"  803.9243 "IND MYS"
                              2013 "Agricultural Trade" "Cote d'Ivoire"        "Australia"          "Export"  5.401716 "CIV AUS"
                              2003 "Agricultural Trade" "Israel"               "Venezuela"          "Export" .13719939 "ISR VEN"
                              2011 "Agricultural Trade" "Nigeria"              "Japan"              "Export"  98.63414 "NGA JPN"
                              2014 "Agricultural Trade" "Colombia"             "Nigeria"            "Export"  3.769131 "COL NGA"
                              2009 "Agricultural Trade" "Syrian Arab Republic" "Dominican Republic" "Export"   .249697 "SYR DOM"
                              2014 "Agricultural Trade" "Peru"                 "Algeria"            "Export"  1.764022 "PER DZA"
                              end
                              Methodology:
                              Using country-pair dummies in ppml command, I’m trying to measure under-and over-exporting between countries following Mishra and Roy paper.
                              I executed the following ppml command:
                              Code:
                              xi, prefix(_fe) noomit i.reporteriso3*i.year i.partneriso3*i.year
                              drop _fepartneri_* _fereporter_* _feyear_*
                               
                              ppml DefTradeMill `cties' contig comlang_off comcol col45 ln_distw _fe*, cluster(en_ctypair)
                               
                              where DefTradeMill = deflated trade is million USD
                              `cties’ = country-pair dummy
                              contig = Contiguity
                              comlang_off = Common official language
                              comcol = common colonizer
                              col45 = pair in colonial relationship
                              ln_distw = log of distance
                              _fe* = exporter * time and importer * time fe
                              Code:
                              Results:
                              Number of parameters: 4288
                              Number of observations: 186378
                              Pseudo log-likelihood: -3450260.3
                              R-squared: .86713501
                              Option strict is: off
                                                             (Std. Err. adjusted for 10,776 clusters in en_ctypair)
                              -------------------------------------------------------------------------------------
                                                  |               Robust
                                     DefTradeMill |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                              --------------------+----------------------------------------------------------------
                                           contig |   .5161429   .0922634     5.59   0.000     .3353099    .6969759
                                      comlang_off |   .2007062   .0845267     2.37   0.018     .0350369    .3663755
                                           comcol |   .5511037   .1401718     3.93   0.000      .276372    .8258355
                                            col45 |   .8380919   .1432694     5.85   0.000     .5572891    1.118895
                                         ln_distw |  -1.070027   .0409086   -26.16   0.000    -1.150206   -.9898472
                                          BRN_KHM |  -5.321514   .5429197    -9.80   0.000    -6.385616   -4.257411
                                          BRN_IDN |  -1.965092   .5016265    -3.92   0.000    -2.948262   -.9819221
                                          BRN_LAO |  -3.147395   .5525154    -5.70   0.000    -4.230305   -2.064485
                                          BRN_MYS |    1.85671   .5060934     3.67   0.000      .864785    2.848635
                                          BRN_MMR |  -4.965856   .5699987    -8.71   0.000    -6.083033   -3.848679
                                          BRN_PHL |  -2.068478   .4853534    -4.26   0.000    -3.019753   -1.117202
                                          BRN_SGP |   .5853504   .5322933     1.10   0.271    -.4579252    1.628626
                                          BRN_THA |    .064716   .4767165     0.14   0.892    -.8696311    .9990632
                                          BRN_VNM |  -1.186524   .4697097    -2.53   0.012    -2.107138   -.2659097
                                          BRN_BGD |   -6.64619   .5676142   -11.71   0.000    -7.758693   -5.533686
                                          BRN_IND |  -6.298606   .5313226   -11.85   0.000    -7.339979   -5.257232
                                          BRN_NPL |  -2.871323   .5146126    -5.58   0.000    -3.879945   -1.862701
                                          BRN_PAK |  -6.306463   .5457102   -11.56   0.000    -7.376035   -5.236891
                                          BRN_CHN |  -1.187913     .49589    -2.40   0.017     -2.15984   -.2159864
                                          KHM_BRN |   2.220235   .5425527     4.09   0.000     1.156851    3.283619
                                          KHM_IDN |  -1.619641   .3956366    -4.09   0.000    -2.395075    -.844208
                                          KHM_LAO |   .8653939   .4947587     1.75   0.080    -.1043153    1.835103
                                          KHM_MYS |   .2687746    .383145     0.70   0.483    -.4821757    1.019725
                                          KHM_MMR |  -2.889298    .496502    -5.82   0.000    -3.862424   -1.916172
                                          KHM_PHL |  -1.210273   .3673196    -3.29   0.001    -1.930206   -.4903394
                                          KHM_SGP |  -.5198247   .4121216    -1.26   0.207    -1.327568    .2879188
                                          KHM_THA |  -1.927757   .3797639    -5.08   0.000     -2.67208   -1.183433
                                          KHM_VNM |  -2.141725   .4079412    -5.25   0.000    -2.941275   -1.342175
                                            _cons |   1.486915   .7780091     1.91   0.056    -.0379548    3.011785
                              …….*dummies removed for brevity
                              -------------------------------------------------------------------------------------
                              After this, I ran RESET test, which is as follows:
                              Code:
                              commands:
                              predict XB,xb
                              gen XB2 = XB^2
                              quietly ppml DefTradeMill `cties' contig comlang_off comcol col45 ln_distw XB2 _fe*, cluster(en_ctypair) keep
                               
                              test XB2 = 0
                               
                              results:
                              WARNING: XB2 has very large values, consider rescaling  or recentering
                              Number of regressors excluded to ensure that the estimates exist: 448
                              Number of observations excluded: 0
                              Warning:  variance matrix is nonsymmetric or highly singular
                              WARNING: The model appears to overfit some observations with DefTradeMill=0
                               
                               
                               ( 1)  XB2 = 0
                                     Constraint 1 dropped
                               
                                         chi2(  0) =       .
                                       Prob > chi2 =         .
                              Question: Why the test statistics is missing? Is it due to keep option?

                              When I run the above command without “keep” option, I got the following result:
                              Code:
                              ppml DefTradeMill `cties' contig comlang_off comcol col45 ln_distw XB2 _fe*, cluster(en_ctypair)
                               
                              Number of parameters: 4289
                              Number of observations: 186378
                              Pseudo log-likelihood: -3432757.5
                              R-squared: .86834016
                              Option strict is: off
                                                             (Std. Err. adjusted for 10,776 clusters in en_ctypair)
                              -------------------------------------------------------------------------------------
                                                  |               Robust
                                     DefTradeMill |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                              --------------------+----------------------------------------------------------------
                                      contig |    .681038   .1306765     5.21   0.000     .4249168    .9371593
                                      comlang_off |   .2224005   .0834714     2.66   0.008     .0587995    .3860015
                                           comcol |   .6621034   .1453955     4.55   0.000     .3771336    .9470733
                                            col45 |   .9477815   .1447849     6.55   0.000     .6640083    1.231555
                                         ln_distw |  -1.269803   .0739845   -17.16   0.000    -1.414809   -1.124796
                                              XB2 |  -.0149341   .0062214    -2.40   0.016    -.0271277   -.0027405
                                          BRN_KHM |  -3.759391    .880763    -4.27   0.000    -5.485655   -2.033127
                                          BRN_IDN |  -2.145936   .5367284    -4.00   0.000    -3.197905   -1.093968
                                          BRN_LAO |  -1.528459   .9113547    -1.68   0.094    -3.314681    .2577635
                                          BRN_MYS |   1.375353    .577688     2.38   0.017     .2431054    2.507601
                                          BRN_MMR |  -3.570065   .8520639    -4.19   0.000    -5.240079    -1.90005
                                          BRN_PHL |  -2.117421   .5197358    -4.07   0.000    -3.136084   -1.098757
                                          BRN_SGP |   .2472873   .5764133     0.43   0.668     -.882462    1.377037
                                          BRN_THA |  -.1081627       .516    -0.21   0.834    -1.119504    .9031788
                                          BRN_VNM |  -1.440556   .5119374    -2.81   0.005    -2.443935   -.4371775
                                          BRN_BGD |  -5.461992    .778698    -7.01   0.000    -6.988212   -3.935772
                                            _cons |   .9075362   .9549157     0.95   0.342    -.9640642    2.779137
                              -------------------------------------------------------------------------------------
                               
                              test XB2 = 0
                               
                               ( 1)  XB2 = 0
                               
                                         chi2(  1) =    5.76
                                       Prob > chi2 =    0.0164
                              So, can I say that my model specification is reliable at 1 percent?

                              If yes, then can you please guide me how to interpret my result, which is as follows:
                              1. If BRN_SGP = 0.25, then Brunei (BRN) is over-exporting to Singapore (SGP) by (e(0.25) – 1) = 0.29 million USD. Is my interpretation correct?
                              2. If not, then how will you interpret it?
                              Looking forward to your reply.

                              Regards,
                              Manmeet Ajmani

                              Comment


                              • #45
                                Dear Manmeet Ajmani

                                Please perform the RESET as

                                Code:
                                predict XB,xb
                                qui su XB
                                gen XB2 = (XB-r(mean))^2
                                quietly ppml DefTradeMill `cties' contig comlang_off comcol col45 ln_distw XB2 _fe*, cluster(en_ctypair)
                                test XB2 = 0
                                Best wishes,

                                Joao

                                Comment

                                Working...
                                X