[R-sig-teaching] Legend for curve fit plot

Warford, Stan Stan.Warford at pepperdine.edu
Wed Dec 31 06:49:41 CET 2014


Thanks for the prompt responses. What a great list!

I am going with Ista’s solution. I appreciate the R way, but the whole point of this script is to shield students from having to know R as much as possible. I don’t want to give them any choices. In fact, last year I had them use Deducer thinking that point and click would be easy and they could experiment to their hearts content, but that was a complete disaster. This year using these pre-written scripts with RStudio was much better. Even I have only learned enough R to show students how to do a curve fit. I am a complete novice.

Dennis questioned the model.

Q: Do you want x:log(x) or x * log(x) in the second geom_smooth() formula?

I hope I am doing this correctly. Computer science theory predicts n lg n behavior for some data sets and quadratic for others. I hope I am fitting to 

A * n * log(n) + B * n + C

where * in the above expression represents multiplication. I was under the impression that : in the model formula was multiplication. Can someone verify that.

Thanks,
Stan

J. Stanley Warford
Professor of Computer Science
Pepperdine University
Malibu, CA 90263
Stan.Warford at pepperdine.edu
310-506-4332



More information about the R-sig-teaching mailing list