Re: [R] Predicted Cox survival curves - factor coding problems..

2007-05-07 Thread Terry Therneau
The combination of survfit, coxph, and factors is getting confused. It is not smart enough to match a new data frame that contains a numeric for sitenew to a fit that contained that variable as a factor. (Perhaps it should be smart enough to at least die gracefully -- but it's not). The

Re: [R] Predicted Cox survival curves - factor coding problems..

2007-05-07 Thread Prof Brian Ripley
On Mon, 7 May 2007, Terry Therneau wrote: The combination of survfit, coxph, and factors is getting confused. It is not smart enough to match a new data frame that contains a numeric for sitenew to a fit that contained that variable as a factor. (Perhaps it should be smart enough to at

[R] Predicted Cox survival curves - factor coding problems...

2007-05-04 Thread sally . x . wetten
I am trying to use the survfit() function with the newdata argument to produce predicted survivor curves for a particular covariate profile. The main purpose of the plot will be to visualise the effect of snp1, coded 0 and 1. In my Cox model I have stratified by one variable, edu, and so I