--- Verena Schoenleber
<[email protected]> wrote:
> i am trying to test the overall model fit of my cox
> model, using
> cox-snell residuals.
> the command predict cs, csnell
> seems to work, but it generates a large amount of
> missings.
>
> can anyone explain me what is going on? what can i
> do solve the
> problem?
-predict, csnell- will only compute the residual for
observations without missing data. For example:
. sysuse auto, clear
(1978 Automobile Data)
. stset mpg foreign
failure event: foreign != 0 & foreign < .
obs. time interval: (0, mpg]
exit on or before: failure
------------------------------------------------------------------------------
74 total obs.
0 exclusions
------------------------------------------------------------------------------
74 obs. remaining, representing
22 failures in single record/single failure
data
1576 total analysis time at risk, at risk from t
= 0
earliest observed entry t
= 0
last observed exit t
= 41
. stcox rep78 price, mgale(mg)
failure _d: foreign
analysis time _t: mpg
Iteration 0: log likelihood = -57.493118
Iteration 1: log likelihood = -53.497231
Iteration 2: log likelihood = -53.220366
Iteration 3: log likelihood = -53.218995
Iteration 4: log likelihood = -53.218995
Refining estimates:
Iteration 0: log likelihood = -53.218995
Cox regression -- Breslow method for ties
No. of subjects = 69
Number of obs = 69
No. of failures = 21
Time at risk = 1469
LR
chi2(2) = 8.55
Log likelihood = -53.218995
Prob > chi2 = 0.0139
------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z|
[95% Conf. Interval]
-------------+----------------------------------------------------------------
rep78 | 1.342636 .4218106 0.94 0.348
.7253372 2.485289
price | 1.000263 .0000816 3.22 0.001
1.000103 1.000423
------------------------------------------------------------------------------
. predict cs, csnell
(5 missing values generated)
There are 5 observation that have missing rep78
values, therefore there are 5 missing residuals.
Hope this helps,
Ricardo.
=====
Ricardo Ovaldia, MS
Statistician
Oklahoma City, OK
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/