Hi everybody,
I want to add a single contourline to a levelplot. While everything
works fine if the value at which the line should be drawn is positive,
there is an error if the value is negative:
library(lattice)
my.panel <- function(..., at, contour=FALSE, labels=NULL) {
panel.levelplot(
Instead of using smooth.spline, use lm with spline terms, e.g.:
> library(splines)
> sp.fit <- lm(y~bs(x,4))
Now both use predict.lm for the predictions and all will be consistent.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail
On Wed, Aug 19, 2009 at 3:52 PM, Greg Snow wrote:
> Instead of using smooth.spline, use lm with spline terms, e.g.:
>
> > library(splines)
> > sp.fit <- lm(y~bs(x,4))
>
> Now both use predict.lm for the predictions and all will be consistent.
>
> Hope this helps,
>
> --
> Gregory (Greg) L. Snow P