Schneider, Friederike Dr.
2011-Jan-21 11:17 UTC
[R] Function comparable to cutpt.coxph from "Survival Analysis using S"
Dear Mrs Rachel Pearce, I am looking for a function "cutpt-coxph" in R - like you did some years ago. How have you solved the problem? Have you found it or a similar function? thank you, Sincerely, Friederike "The title says it all really; I am looking for a function along the lines of cutpt.coxph as described in "Survival Analysis Using S" (Tableman and Kim), Chapter 6. As may be guessed, the function optimises the cutpoint of a continuous variable for cox proportional hazard modelling. I can't find it, or any similar function, on CRAN. Alternatively, perhaps there is a way of extracting the likelihoods from the output of coxph." Dr. med. Friederike Schneider Assistenz?rztin Klinikum der LMU Campus Grosshadern Marchioninistr. 15 81377 M?nchen Tel.: 089-7099-425 Friederike.Schneider at med.uni-muenchen.de
Frank Harrell
2011-Jan-21 14:03 UTC
[R] Function comparable to cutpt.coxph from "Survival Analysis using S"
It is very uncommon for the assumptions underlying this method to be satisfied. These assumptions include (1) the relationship between X and log relative hazard is discontinuous at X=c and only X=c; (2) c is correctly found as the cutpoint; (3) X vs log hazard is flat to the left of c; (4) X vs log hazard is flat to the right of c; (5) the 'optimal' cutpoint does not depend on the values of other predictors. These relationships rarely occur in nature unless X=time. Failure to have these assumptions satisfied will result in (1) great error in estimating c (because c doesn't exist); (2) low predictive accuracy; (3) serious lack of fit; (4) residual confounding; and (5) overestimation of effects of remaining variables. This non-existence of cutpoints is why in medical research no two investigators seem to find the same cutpoint for the same predictor in different datasets. Frank ----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/Function-comparable-to-cutpt-coxph-from-Survival-Analysis-using-S-tp3229420p3229704.html Sent from the R help mailing list archive at Nabble.com.
Terry Therneau
2011-Jan-24 14:03 UTC
[R] Function comparable to cutpt.coxph from "Survival Analysis using S"
Quoting Frank H: "These relationships rarely occur in nature..." I agree; I have seen cutpoint relationships only a handful of times in 25 years of medical work. A better approach is to look at the data using a smoothing spline: options(na.action=na.exclude) fit <- coxph(Surv(time,status) ~ age + weight + pspline(x)) temp <- predict(fit, type='terms') plot(x, temp[,3]) My primary goal has always been to learn rather than to test. It is common to see upper or lower thresholds, but not cutpoints. Terry T.