s-news
[Top] [All Lists]

overlay of survival and bioaccumulation plots

To: s-news@lists.biostat.wustl.edu
Subject: overlay of survival and bioaccumulation plots
From: Manoel Pacheco <mpacheco@glec.com>
Date: Tue, 20 May 2008 16:11:18 -0400
Organization: Great Lakes Environmental Center
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)
I successfully plotted Kaplan-Meier estimates of survival over time, but I am struggling to overlay fitted estimates of tissue concentrations of a contaminant (ct) over time. Here is the code I wrote,

setiss <- pretty(range(se3t6$ct))

se3.surv <- survfit(Surv(time, cens) ~ treat,
data = se3[se3$treat=="8",], conf.type="plain")
plot(se3.surv, conf.int=T, cex=1.5, xlab="Days", ylab="Survival")
text(30,0.02,cex=2.0,"ES3-Treatment 6")

axis(side = 4, at = setiss/15, lab = setiss, srt = 90)
mtext("[Se]tissue (ug/g dw)", side = 4, line = 3)

lines(se3t6$time, se3t6$ct, type = "p")               # add observed concns.
lines(se3t6fit$time, se3t6fit$ct, type = "l") # add fitted curve

All but the the last two commands (lines) work. Concentrations range from 1.9 to 12.7. I suspect that values may be plotted out of the range for survival (0 - 1). It would explain why I cannot see the plotted points and fitted curve.

I appreciate suggestions to solve this problem.

  Thanks

  Manolo

<Prev in Thread] Current Thread [Next in Thread>
  • overlay of survival and bioaccumulation plots, Manoel Pacheco <=