I think it really depends on what your event of interest is.  If your event is 
that the patient got better and "left treatment" then I think this could work.  
You would have to mark as censored any patient still in treatment or any 
patient that stopped treatment w/o getting better (e.g. in the case of death).  
You would then be predicting the cost required to make the patient well enough 
to leave treatment.  It is a little non-standard to use $ instead of time, but 
time is money after all.

You could set up your data frame with two columns: 1) cost 2) event/censored.  

Then create your survival object:
mySurv = Surv(my_data$cost,my_data$event)

And then use survfit to create your KM curves:
myFit = survfit(mySurv~NULL)


If you have other explanatory variables that you think may influence the cost, 
you can of course add them to your data frame and change the formula you use in 
survfit.  For instance, you could have some severity measure, e.g. High, 
Medium, Low.  You could then do:
myFit = survfit(mySurv~my_data$severity)




-----Original Message-----
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On 
Behalf Of Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST)
Sent: Monday, October 31, 2011 1:29 PM
To: r-help@r-project.org
Subject: [R] Kaplan Meier - not for dates

I have some data which is censored and I want to determine the median.  Its 
actually cost data for a cohort of patients, many of whom are still on 
treatment and so are censored.

I can do the same sort of analysis for a survival curve and get the median 
survival... ...but can I just use the survival curve functions to plot an X 
axis that is $ rather than date? If not is there some other way to achieve this?

Thanks

Calum

********************************************************************************************************************

This message may contain confidential information. If yo...{{dropped:9}}

______________________________________________
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.
  • [R] Kapl... Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST)
    • Re:... Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST)
    • Re:... Lancaster, Robert (Orbitz)
    • Re:... Terry Therneau
    • Re:... Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST)
    • Re:... Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST)

Reply via email to