Skip to content
Prev 13424 / 398502 Next

multiple fitted curves plot

Stewart Schultz <schultz at fig.cox.miami.edu> writes:
Are you sure you want to do that?  Overlaying 24 curves on a single
plot tends to make for a busy plot.  You may want to consider a
trellis type of plot instead.  See xyplot from the lattice package.
An alternative would be to use the nlsList function from the nlme
package.

If you really do want to plot all the fitted nls models on a single
plot, it is best to use predict on the fitted model with a closely
spaced set of Ci values that cover the range of the observed data.  It
could look like


plot(Ci, Photo, type = "n")  # sets up the plotting scales
crange <- range(Ci)
cseq <- seq(crange[1], crange[2], len = 100)
for (s in levels(PairID)) {
  lines(cseq, predict(resff[[s]], list(Ci = cseq)))
}
Yes.
techniques available in the nlme package.  The book

@Book{pinh:bate:2000,
  author =	 {Jos\'{e} C. Pinheiro and Douglas M. Bates},
  title = 	 {Mixed-Effects Models in \textsf{S} and \textsf{S-PLUS}},
  publisher = 	 {Springer},
  year = 	 2000,
  series =	 {Statistics and Computing}
}

has several examples of these techniques.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._