|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: Stcox ereturn list: wrong chi2 p-value?s
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" <[email protected]>
To: <[email protected]>
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/