Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: st: WG: XML TAB - inconsistent p-value output


From   Sergiy Radyakin <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: AW: st: WG: XML TAB - inconsistent p-value output
Date   Mon, 17 Jun 2013 14:51:02 -0400

Ingo,
the most relevant info from the ereturn list is, of course, the valuse
of matrices e(b) and e(V) which are not in your output.

The differences you observe might be explained with the following:
pvalues are not stored in the estimates, but are computed from e(b)
and other matrices stored there 'on-the-fly'. It seems that xml_tab is
computing them using this formula:

            local p = 2*cond(e(df_r)==.,1-norm(abs(`t')),
ttail(e(df_r),abs(`t')));

(search for it in xml_tab.ado to see how the arguments are defined).

If xtscc is using a different formula, you will see differences in output.

So, check how the xtscc is computing the pvalues. Also check the
hypothesis being tested, whether it is P>|t| or, e.g. P>t, or
something else.

Paul, the reason for the difference in ereturn list is likely that the
results are not cleared before the program runs, so there is a lot of
trash from other commands. The benchmark program in this scenario
should start with
  clear all
  estimates drop _all
to be sure. It seems we are all getting the same value of e(r2) at
least. So clean it up a bit, and it should be ok. But given that there
is a suspicion that xtscc might be misbehaving, probably it is better
to report
A) The table as it is reported in Stata output;
B) All the contributing results saved in ereturn;
C) All the output from XLS file.

Best, Sergiy







On Mon, Jun 17, 2013 at 5:40 AM, Seed, Paul <[email protected]> wrote:
> Dear Statalist,
>
> To add to the confusion with -xtscc- and -xml_tab-
> that Ingo Kleindienst & Sergiy Radyakin have already commented on,
> I followed Inigo's instructions and go a completely different set of
> results from -xtscc-.
>
> This suggests the problem is with -xtscc-, not -xml_tab-.
>
> . version
> version 11.2
>
> . which xml_tab
> c:\ado\stbplus\x\xml_tab.ado
> *! version 3.50 24Jun2008 M. Lokshin, Z. Sajaia
>
> . which xtscc
> c:\ado\stbplus\x\xtscc.ado
> *! xtscc, version 1.1.4, Daniel Hoechle, 27feb2007
>
> . xtscc return patents patentsg stckpr merger sic sales
>
> Regression with Driscoll-Kraay standard errors   Number of obs     =      2252
> Method: Pooled OLS                               Number of groups  =       226
> Group variable (i): cusip                        F(  6,   225)     =    239.83
> maximum lag: 2                                   Prob > F          =    0.0000
>                                                  R-squared         =    0.0983
>                                                  Root MSE          =    5.2641
>
> ------------------------------------------------------------------------------
>              |             Drisc/Kraay
>       return |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
> -------------+----------------------------------------------------------------
>      patents |  -.0012341   .0048402    -0.25   0.799     -.010772    .0083037
>     patentsg |  -.0029532   .0038567    -0.77   0.445    -.0105531    .0046466
>       stckpr |   .0745453   .0123332     6.04   0.000      .050242    .0988487
>       merger |  -1.187542   .5551972    -2.14   0.034    -2.281593   -.0934909
>          sic |  -4.54e-06    .000188    -0.02   0.981    -.0003751     .000366
>        sales |  -.0000461   .0000351    -1.31   0.190    -.0001152    .0000231
>        _cons |   6.515627   .5316984    12.25   0.000     5.467881    7.563372
> ------------------------------------------------------------------------------
>
> . eret li
>
> scalars:
>                   e(N) =  2252
>                 e(N_g) =  226
>                e(df_m) =  6
>                e(df_r) =  225
>                   e(F) =  239.8315327428236
>                  e(r2) =  .0982803084873544
>                e(rmse) =  5.264078304739547
>                 e(lag) =  2
>
> macros:
>                 e(cmd) : "xtscc"
>             e(predict) : "xtscc_p"
>              e(method) : "Pooled OLS"
>              e(depvar) : "return"
>             e(vcetype) : "Drisc/Kraay"
>               e(title) : "Regression with Driscoll-Kraay standard errors"
>            e(groupvar) : "cusip"
>          e(properties) : "b V"
>
> matrices:
>                   e(b) :  1 x 7
>                   e(V) :  7 x 7
>                   e(t) :  1 x 7
>             e(se_beta) :  1 x 7
>
> functions:
>              e(sample)
>
> *** End of Stata output ***
> ***************************
> For comparison, Inigo reported:
> The p-values for the xtscc model in the Stata results monitor are:
>
> Patents 0.815
> Patensg 0.487
> Stckpr  0.000
> Merger  0.073
> Sic             0.982
> Sales           0.245
>
> The p-values for the xtscc model in the Excel-file created using xml_tab are:
>
> Patents 0.809
> Patensg 0.468
> Stckpr  0.000
> Merger  0.043
> Sic             0.982
> Sales           0.213
>
> *******************************
>
>
> Best wishes,
> Paul T Seed
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index