Hello R-help members,
I have a dataset with 2 treatments and want to assess the effect of a continous covariate on the Hazard ratio between treatment A and B. I want a smoothed interaction term which I have modelled below with the following code: surv.fit <- coxph(my.surv ~ pspline(CONTINUOUS, df=0) + factor(DICHOTOMOUS) + pspline(CONTINUOUS, df=0)*factor(DICHOTOMOUS), data = datanew2) and consequently I would like to obtain a smoothed plot of the hazard ratio between treatment A and B on the y-axis with the continuous covariate on the x-axis. As termplot ignores interaction terms, I was wondering if anyone has seen anything like this before and can advise on the best way to do it. Many thanks in advance for any help that you can offer, Kind regards, Lynn [[alternative HTML version deleted]] ______________________________________________ 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.