
gam
or surf.ls
and optionally provides a graph.
residualssurface(model, data, x, y, gam = F, npol = 2, plotit = T, filled = F, bubble = F)
surf.ls
. interp
and the residuals) . filled.contour
. residuals
). Optionally, a graph is produced that can contain the trend surface, filled contours and bubble graphs in addition to the spatial location of the sample units.
library(vegan)
library(mgcv)
library(akima)
data(faramea)
Count.model1 <- lm(Faramea.occidentalis ~ Precipitation,
data=faramea, na.action=na.exclude)
surface.1 <- residualssurface(Count.model1, na.omit(faramea),
'UTM.EW', 'UTM.NS', gam=TRUE, plotit=TRUE, bubble=TRUE)
Run the code above in your browser using DataLab