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]
AW: st: WG: XML TAB - inconsistent p-value output
From
"Kleindienst, Ingo" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
AW: st: WG: XML TAB - inconsistent p-value output
Date
Sun, 16 Jun 2013 09:58:10 +0000
Seriy,
Thank your very much for your answer.
Below the additional information:
Stata version: 11.0
Xml_tab version: 3.24
As you proposed I used a public dataset to try to reproduce the inconsistency. Below are my Stata commands:
--> use http://www.stata.com/data/jwooldridge/eacsap/patent
--> xtset cusip year
--> xtreg return patents patentsg stckpr merger sic sales
--> estimates store xtreg
--> xtscc return patents patensg stckpr merger sic sales
--> estimates store xtscc
--> xml_tab xtreg xtscc, p save(C:\Desktop\...\xtreg vs xtscc.xls)
The p-values reported for the xtreg model in the Stata results monitor are consistent with the p-values reported in the Excel-file produced by xml_tab.
However, the p-values reported for the xtscc model in the Stata results monitor do not correspond to the p-values reported in the Excel-file produced by xml_tab. In particular, the p-values reported in the xml_tab file are consistently lower than those reported in the State results monitor.
For example:
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
I made some additional tests with other estimators and other datasets (xtabond, areg). The problem did not occur with these estimators but did occur with xtscc and other datasets.
Below the -ereturn list- after my estimations with xtreg and xtscc
ereturn list for xtreg
scalars:
e(rank) = 7
e(df_m) = 6
e(chi2) = 174.8559236866668
e(p) = 4.19491705850e-35
e(sigma_u) = 3.400876980217211
e(sigma_e) = 4.070117243032458
e(sigma) = 5.303943684335409
e(rho) = .4111346086902908
e(rmse) = 4.073657423364998
e(N) = 2252
e(Tbar) = 9.951076320939334
e(Tcon) = 0
e(N_g) = 226
e(g_min) = 6
e(g_avg) = 9.964601769911505
e(g_max) = 10
e(thta_min) = .5610100539706587
e(thta_5) = .6460439694667539
e(thta_50) = .6460439694667539
e(thta_95) = .6460439694667539
e(r2_w) = .0661225799380726
e(r2_b) = .1239851695834196
e(r2_o) = .093572659666385
e(thta_max) = .6460439694667539
macros:
e(cmdline) : "xtreg return patents patentsg stckpr merger sic sales"
e(cmd) : "xtreg"
e(marginsnotok) : "E U UE SCore STDP XBU"
e(predict) : "xtrere_p"
e(model) : "re"
e(ivar) : "cusip"
e(vce) : "conventional"
e(depvar) : "return"
e(chi2type) : "Wald"
e(properties) : "b V"
matrices:
e(b) : 1 x 7
e(V) : 7 x 7
e(theta) : 1 x 5
e(VCEf) : 7 x 7
e(bf) : 1 x 7
functions:
e(sample)
ereturn list for xtscc
scalars:
e(N) = 2252
e(N_g) = 226
e(df_m) = 6
e(df_r) = 9
e(F) = 215.2730394966106
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)
I hope these additional information help.
Any hint is greatly appreciated
Best,
Ingo
Dr. Ingo Kleindienst
Juniorprofessor für Strategieprozesse
Assistant Professor of Strategy Processes
Lehrstuhl für Betriebswirtschaftslehre, insbesondere Unternehmensentwicklung und Corporate Governance
Chair of Corporate Strategy and Governance
Burgplatz 2, 56179 Vallendar, Germany
Fon: ++49-(0)261-65 09-204
Fax: ++49-(0)261-65 09-209
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Sergiy Radyakin
Gesendet: Donnerstag, 13. Juni 2013 23:15
An: [email protected]
Betreff: Re: st: WG: XML TAB - inconsistent p-value output
Ingo,
can you reproduce the same issue with any public dataset (webuse-able or sysuse-able) and post the full code here? Economic interpretation does not have to make sense, but the illustration of difference in the reported coefficients is crucial.
What is the version of Stata you are using? --> about
What is the version of -xml_tab- you are using? --> which xml_tab
Do you have any problems when outputting e.g. p-values from a simple linear regression model?
Provide -return list- and -ereturn list- after your estimation commands. Show us how the estimates results are saved/restored. Make sure there is a unique set of p-values reported (e.g. ttest creates three sets of p-values one for each type of alternative hypothesis)
Finally, STATA-->Stata
Best, Sergiy
On Thu, Jun 13, 2013 at 5:02 PM, Kleindienst, Ingo <[email protected]> wrote:
> Dear Statalisters,
>
> I have the following question regarding xml_tab
>
> I regularly use xml_tab to save results in Excel. However, I have no encountered some inconsistencies between the results shown in the STATA results monitor and the Excel-Output generated by xml_tab.
> The coefficents are consistent between the STATA results monitor and the Excel-output created by xml_tab. However, there is what seems to be a non-random deviation between the p-values that are shown in the STATA results monitor and the respective Excel-output using xml_tab. In particular, the Excel-output consistently shows lower p-values than are reported in the STATA results monitor.
>
> As an example: The p-value shown in the STATA results monitor is 0.022 for a certain variable. The respective Excel-output using first the command "estimates store modelX" and then the command "xml_tab modelX , p save(C:\ \Desktop\results_paper.xls)" leads to a p-value of only 0.014 for the respective variable.
>
> The problem with inconsistent p-values occur when using the "xtscc"
> STATA command (Driscoll-Kraay panel estimator)
>
> So, I am wondering what the problem here is? Am I missing something?
>
> I would be very happy, if you could give me some hints.
>
> Best regards
>
> Ingo
>
>
> *
> * 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/
*
* 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/