if (FALSE) {
library(Distance)
library(dsm)
# load the Gulf of Mexico dolphin data (see ?mexdolphins)
data(mexdolphins)
# fit a detection function and look at the summary
hr.model <- ds(distdata, truncation=6000,
key = "hr", adjustment = NULL)
summary(hr.model)
# fit a simple smooth of x and y
mod1 <- dsm(count~s(x, y), hr.model, segdata, obsdata)
# Calculate the variance
# this will give a summary over the whole area in mexdolphins$preddata
mod1.var <- dsm_var_gam(mod1, preddata, off.set=preddata$area)
}
Run the code above in your browser using DataLab