Platform: WIN2000
Version of R: 1.6.2
I'm interested in plotting fitted values in a trellis xyplot. I believe the
following should work; however, I only get the points (not the fitted
lines).
library(lattice)
trellis.device(bg="white")
xyplot(MULTDV~TIME|SUBNUM,data=TEMP,
panel=function(x,y){
panel.xyplot(x,y)
lines(x,fitted(lm(y~poly(x,1),na.action=na.omit)))
lines(x,fitted(lm(y~poly(x,2),na.action=na.omit)),lty=3)},
xlab="Time",
ylab="Average Reaction Time")
Happy to send the very small TEMP file for the curious...
Any suggestions?
Paul
MAJ Paul Bliese, Ph.D.
Walter Reed Army Institute of Research
Phone: (301) 319-9873
Fax: (301) 319-9484
[EMAIL PROTECTED]
______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help