[R] Schoenfeld Residuals with tied data
Bessy
piglet630 at hotmail.com
Tue Jun 16 11:07:24 CEST 2009
Thank you for the reply. I really appreciate it.
I calculated the Scoenfeld residual per event and my results are the
following:
fin age race
17 -0.33942334 -2.072218727 0.29024804
20 0.394600944 5.303968774 0.517689472
25 0.488184603 -1.438140647 -0.359535162
25 -0.511815397 -1.438140647 -0.359535162
However, the results from R are shown as below:
fin age race
17 -0.3394233 -2.072219 0.290248
20 0.3946009 5.303969 0.5176895
25 0.4724112 -1.615875 -0.4039688
25 -0.5275888 -1.615875 -0.4039688
These two results are both calculated based on the same dataset, which is
shown as below (the formula was attached with the original message):
week arrest fin age race
17 1 0 18 1
20 1 1 27 1
25 1 1 19 0
25 1 0 19 0
52 0 1 23 1
52 0 0 19 0
At time 17 and 20, there is no ties, my results are almost the same as R's.
However, the dataset contains two failures at time 25, I had got different
results from R's.
If I summed the Schoenfeld residuls at a given event time, for example, 25
in my dataset, I cannot get the common results.
Does R modified the formula when meeting ties?
Thank you so much.
Bessy
Terry Therneau wrote:
>
>
> Formally, the Schoenfeld residuals are defined as one residual per event
> time.
>
> I found that when there are tied events, however, that plots of the
> residuals
> could be hard to visually interpret: sometimes a residual was large
> because of a
> lack of fit at that point, sometimes because several death happened
> concurrently
> at that point.
>
> Since the Shoenfeld residual is a sum over the events at each time point,
> coxph
> returns one residual per EVENT, rather than one per event time. The plots
> work
> much better (my subjective opinion). If you sum the returned residuals at
> a
> given event time, you will get the common result.
>
> Terry Therneau
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
--
View this message in context: http://www.nabble.com/Schoenfeld-Residuals-with-tied-data-tp24033333p24050423.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list