Re: [R] Relative Risk/Hazard Ratio plots for continuous variables

2010-05-26 Thread Terry Therneau
I prefer smoothing splines, Frank prefers regression splines. The former is built into the survival package: options(na.action=na.exclude) # This should be the default IMHO coxfit1- coxph(Surv(rtime,rcens) ~ pspline(cts), data=data1) summary(coxfit1) #shows the linear and nonlinear tests

[R] Relative Risk/Hazard Ratio plots for continuous variables

2010-05-25 Thread Laura Bonnett
Dear all, I am using Windows and R 2.9.2 for my analyses. I have a large dataset and I am particularly interested in looking at time to an event for a continuous variable. I would like to produce a plot of log(relative risk) or relative risk (also known as hazard ratio) against the continuous

Re: [R] Relative Risk/Hazard Ratio plots for continuous variables

2010-05-25 Thread Frank E Harrell Jr
On 05/25/2010 07:28 AM, Laura Bonnett wrote: Dear all, I am using Windows and R 2.9.2 for my analyses. I have a large dataset and I am particularly interested in looking at time to an event for a continuous variable. I would like to produce a plot of log(relative risk) or relative risk (also