Dear All, I want to have the cumulative incidence curves for 'mstate' data using Survival package in R. But I got some problems: I. Problem 1: 1. If I only use intercept without any covariates, I can have 'right' cumulative incidence curves (2 for 2 competing risks): library(Survival) fitCI <- survfit(Surv(stop, status*as.numeric(event), type="mstate") ~ 1,data=mgus1, subset=(start==0)) plot(fitCI) 2. If I include one variate ('sex'), I get 4 curves (attached; I guess because there are two levels in 'sex' and 2 competing risks): fitCI <- survfit(Surv(stop, status*as.numeric(event), type="mstate") ~sex,data=mgus1, subset=(start==0)) plot(fitCI) However, I want to just have 2 cumulative incidence curves estimated from several covariates (such as 'sex', 'age', 'alb', etc. in mgus1). Could you please help me to do that? Thank you very much! II. Problem 2: I try using an example from sourcecode.pdf: fit <- survfit(Surv(time, status, type=’mstate’) ~ sex, data=mine) but where can I have the 'mine' data? Thank you!
Best, Jieyue
<<attachment: Rplot.png>>
______________________________________________ R-help@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.