Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: Stcox ereturn list: wrong chi2 p-value?s


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: Stcox ereturn list: wrong chi2 p-value?s
Date   Sun, 21 Sep 2008 13:19:51 +0200

I agree with you that if the p-value is given in the output, it would be nice to have it posted to the results for convenience. It is not always as straightforward to calculate as in this case.
As a matter of fact, Stata does not report the p-values for the parameter estimates, either, though. It merely gives you the point estimates in e(b) and the varcov in e(V). Luckily, -ssc d parmest- allows one to access the p-values without fuss...

HTH
Martin
_______________________
----- Original Message ----- From: "junin" <dv.junin@gmail.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Sunday, September 21, 2008 1:11 PM
Subject: Re: Stcox ereturn list: wrong chi2 p-value?s



Thanks a lot Martin,

that helped a lot. I just thought that these values are already stored
somewhere, since they are reported when running the analysis.
However calculating it by myself, then storing it with estadd, works
just fine. Then it is also easy to use it with outreg2 using the
addstats() option.

Again,

thanks for the help,

dirk

2008/9/21 Martin Weiss <martin.weiss1@gmx.de>:
I would not know how to do this with -outreg2-, but if you could be bothered
to use the -estout- family of commands, then

********
clear*
cap ssc inst estout
webuse stan3, clear
stset
stcox age posttran surg yea
estadd sca prchi2= 1-chi2(e(df_m),e(chi2))
eststo
esttab, sca(prchi2)
********

Tweak the -esttab- line to your needs, i.e. Latex output or csv... See -h
esttab-

HTH
Martin
_______________________
----- Original Message ----- From: "junin" <dv.junin@gmail.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Sunday, September 21, 2008 11:52 AM
Subject: Stcox ereturn list: wrong chi2 p-value?s



Hello,

I have a question concerning the output of a Cox regression, which I
want to access with outreg2. Below you find the results of the Cox
regression command as well as the ereturn list results. My question
is: Why doesn't the e(r2_p) = .0006402283288656 repor the Prob >
chi2 = 0.0025?
How can I access the Prob > chi2?

Thank you for you help,

dirk


Cox regression -- Breslow method for ties

No. of subjects = 1970 Number of obs = 15654
No. of failures = 1065
Time at risk = 15654
LR chi2(1) = 9.17
Log likelihood = -7153.7882 Prob > chi2 =
0.0025


------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf.
Interval]

-------------+----------------------------------------------------------------
Xsales | .99992 .0000413 -1.94 0.053 .9998391 1.000001

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

. ereturn list

scalars:
e(N) = 15654
e(ll_0) = -7158.37122089778
e(ll) = -7153.788228853626
e(df_m) = 1
e(chi2) = 9.165984088309415
e(r2_p) = .0006402283288656
e(N_sub) = 1970
e(N_fail) = 1065
e(risk) = 15654
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



--
Dirk Volland
mobile +358468948277
skype junin7
! new Email: vollanddirk@gmail.com
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index