Skip to content
Prev 201114 / 398503 Next

changing plot symbol and/or size in plot(cox.zph)

On Nov 21, 2009, at 4:28 PM, <cryan at binghamton.edu> wrote:

            
Yes, but after looking at the code, the points call does not have  
trailing "..." so, not without modifying the function:

library(survival)
methods(plot)
getAnywhere(plot.cox.zph)

Now just hack the function:

plot.cox.zph
<gives you the function arguent list and body.

plot.cox.zph2 <-  <insert arguments and code here>

And change these lines:

+         if (resid)
+             points(xx, y)
+         lines(pred.x, yhat)

  to

+         if (resid)
+             points(xx, y, ...)
+         lines(pred.x, yhat)


Then using the example in help(cox.zph) :
plot.cox.zph2(temp, pch=4)  gives you "x"'s instead of "o"'s

--
David Winsemius, MD
Heritage Laboratories
West Hartford, CT