Hello colleagues! As part of my PhD thesis I'm working on some dsm for a dolphin species in southern Argentina. I'm having trouble calculating the variance estimation, I keep receiving an error. I was doing it with the following code:
preddata.varprop <- split(prediction.data, 1:nrow(prediction.data))
dsm.xy.varprop <- dsm_var_prop(model1, pred.data = preddata.varprop,
off.set = prediction.data$AREA)
summary(dsm.xy.varprop)
This is what came out from the code:
Error in dsm_var_prop(modelo.t14, pred.data = preddata.varprop, off.set = prediction.data2$AREA) :
No detection function in this analysis, use dsm_var_gam
I changed to dsm_var_gam and I got this:
> summary(dsm.xy.varprop)
Summary of uncertainty in a density surface model calculated
analytically for GAM, with delta method
Approximate asymptotic confidence interval:
2.5% Mean 97.5%
45.63008 360.08097 2841.50936
(Using log-Normal approximation)
Point estimate : 360.081
Error in round(x$gam.cv, 4) :
non-numeric argument to mathematical function
I keep receiving that error, do you have an idea of how to correct it?
My selected model has a tweedie distribution and three covariates:
model1 <- dsm(count~s(x,y, k=15)+s(distcosta, k=10)+s(rug, k=10),dummy_ddf(observation.data$object,width=600),segment.data,observation.data,family=tw(), method="REML")
Many thanks in advance