[R] lattice add a fit
Bond, Stephen
Stephen.Bond at cibc.com
Tue Oct 7 15:01:35 CEST 2014
What is the way to add an arbitrary fit from a model to a lattice conditioning plot ?
For example
xyplot(v1 ~v2 | v3,data=mydata,
panel=function(...){
panel.xyplot(...)
panel.loess(...,col.line="red")
}
)
Will add a loess smoother. Instead, I want to put a fit from lm (but not a simple straight line) and the fit has to be done for each panel separately, not one fit for the full data set, so sth like an lm equivalent of panel.locfit (there is no panel.lmfit)
Thank you.
Stephen B
[[alternative HTML version deleted]]
More information about the R-help
mailing list