library(Distance)
library(dsm)
data(mexdolphins)
hr.model <- ds(mexdolphins$distdata, max(mexdolphins$distdata$distance),
key = "hr", adjustment = NULL)
mod1<-dsm(N~s(x,y), hr.model, mexdolphins$segdata, mexdolphins$obsdata)
dsm.cor(mod1,resid.type="d",max.lag=9,Segment.Label="Sample.Label")Run the code above in your browser using DataLab