# \donttest{
library(Distance)
library(dsm)
# load the data, see ?mexdolphins
data(mexdolphins)
# fit a model
hr.model <- ds(distdata, truncation=6000,
key = "hr", adjustment = NULL)
mod1 <- dsm(count~s(x,y), hr.model, segdata, obsdata)
# look at lag 1 differences up to a maximum of lag 9, using deviance
# residuals
dsm_cor(mod1, resid.type="deviance", max.lag=9,
Segment.Label="Sample.Label")
# }
Run the code above in your browser using DataLab