From therneau at mayo.edu  Fri Oct 19 19:15:26 2012
From: therneau at mayo.edu (Terry Therneau)
Date: Fri, 19 Oct 2012 12:15:26 -0500
Subject: [Rd] Addition of plot=F argument to termplot
Message-ID: <50818AAE.6030008@mayo.edu>

I have a suggested addition to termplot.
We have a local mod that is used whenever none of the termplot options is quite right.  It 
is used here almost daily for Cox models in order to put the y axis on a risk scale:

----
fit <- coxph(Surv(time, status) ~ ph.ecog + pspline(age), data=lung)
zz <- termplot(fit, se=TRUE, plot=FALSE)

yy <- zz$age$y + outer(zz$age$se, c(0, -2, 2), '*')
matplot(zz$age$x, exp(yy), log='y', type='l', lty=c(1,2,2),
     xlab="Age", ylab="Relative risk")

----
The return value is a list, each element of which is a dataframe.  Another use is to 
overlay the fits from two different models.
The changes to termplot.R and .Rd are small.  Since we're not supposed to add attachments 
to these emails, where to I send the updated files?

Terry T



[Rd] Addition of plot=F argument to termplot
Terry Therneau