## nonparametric regression estimate of intensity
## as a function of terrain elevation
f <- rhohat(bei, bei.extra$elev)
## predicted intensity as a function of location
lam <- predict(f)
## residuals
res <- residualMeasure(bei, lam)
res
plot(res)
Run the code above in your browser using DataLab