Dear R users I would like to calculate the Cumulative incidence for an event adjusting for competing risks and adjusting for covariates. One way to do this in R is to use the cmprsk package, function crr. This uses the Fine & Gray regression model. However, a simpler and more classical approach would be to implement the Kalbfleisch & Prentice method (1980, p 169), where one fits cause specific cox models for the event of interest and each type of competing risk, and then calculates incidence based on the overall survival. I believe that this is what the cuminc function in the aforementioned package does, but it does not allow to adjust for a vector of covariates. My question is, is there an R package that implements the Kalbfleisch & Prentice method for competing risks with covariates? for example, if k1 is the cause of interest among k competing causes: P_k1(t; x)=P(T<=t, cause=k1|x)=Sum(u=0, ..., u=t) {hazard_k(u;x)*S(u;x)} where S(u;x) = exp{-sum_of_k(sum(hazard_k(u))} I have searched extensively for an implementation of this in many packages, but it appears that more complex approaches are more commonly implemented, such as timereg package. Eleni Rapsomaniki Research Associate Strangeways Research Laboratory Department of Public Health and Primary Care University of Cambridge [[alternative HTML version deleted]]
I don't think there is a package to do that. But you could have a look at ?predict.crr. Best regards, Arthur Allignol Eleni Rapsomaniki wrote:> > > Dear R users > > > > I would like to calculate the Cumulative incidence for an event > adjusting for competing risks and adjusting for covariates. One way to > do this in R is to use the cmprsk package, function crr. This uses the > Fine & Gray regression model. However, a simpler and more classical > approach would be to implement the Kalbfleisch & Prentice method (1980, > p 169), where one fits cause specific cox models for the event of > interest and each type of competing risk, and then calculates incidence > based on the overall survival. I believe that this is what the cuminc > function in the aforementioned package does, but it does not allow to > adjust for a vector of covariates. > > > > My question is, is there an R package that implements the Kalbfleisch & > Prentice method for competing risks with covariates? > > > > for example, if k1 is the cause of interest among k competing causes: > > P_k1(t; x)=P(T<=t, cause=k1|x)=Sum(u=0, ..., u=t) {hazard_k(u;x)*S(u;x)} > > where S(u;x) = exp{-sum_of_k(sum(hazard_k(u))} > > > > I have searched extensively for an implementation of this in many > packages, but it appears that more complex approaches are more commonly > implemented, such as timereg package. > > > > Eleni Rapsomaniki > > > > Research Associate > > Strangeways Research Laboratory > > Department of Public Health and Primary Care > > > > University of Cambridge > > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >
Ravi's last note finished with> I am wondering why Terry Therneau's "survival" package doesn't > have this option.The short answer is that there are only so many hours in a day. I've recently moved the code base from an internal Mayo repository to R-forge, one long term goal with this is to broaden the developer base to n>2 (me and Thomas Lumley). A longer statistical answer: I'm not sure if the "this" of Ravi's question is a. smoothed hazards, b. the K&P cumulative incidence or c. the Fine & Gray model. b. I like the CI model and am using it more. We also have local code. The latest version of survival (on rforge, likely in the next default R release) has added simple CI curves to the survfit function. Adding code for survfit on Cox models is on the todo list. But -- this release also fixes up survfit.coxph to handle weighted Cox models and that was on my list for approx 10 years, i.e., don't hold your breath. I don't release something until it also has a set of worked out test cases to add to the 'tests' directory. a. smoothed hazards. For the case at hand I don't see any particular advantage of this. On the other hand, I often would like to display hazard functions instead of CI functions for Cox models; with time dependent covariates I don't think a survival curve makes sense. But I haven't had the time to think through exactly which methods should be added. c. Fine & Gray model, i.e., where covariates have a direct influence on the competing risk. I find the model completely untenable from a biologic point of view, so have no interest in adding it. (Due to finite time, everything in the survival package is code that I needed for an analysis; medical research is what pays my salary.) Assume that I have competing processes/risks, say progression of a tumor and heart disease; I expect that the tumor process pays no attention whatsoever to what is going on in the heart. But this is necessary if "type=squamous" is modeled as an absolute beta=__ increase in the CI for cancer. The squamous cells need to "step up the pace" of invasion if heart failure threatens, like jockeys in a horse race. Terry T.
Possibly Parallel Threads
- Competing risks adjusted for covariates
- Re : Help on competing risk package cmprsk with time dependent covariate
- Competing Risks Regression with qualitative predictor with more than 2 categories
- competing risks regression
- Help on competing risk package cmprsk with time dependent covariate