-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera trapping example produces seemingly non-monotonic solution #133
Comments
NCNLIN=MAXNLC/2
XLAT=WIDTH/FLOAT(NCNLIN)**1.5
c XLAT=WIDTH/FLOAT(NCNLIN)
DO I=1,NCNLIN
XGRID(I)=FLOAT(I)**1.5*XLAT
c XGRID(I)=FLOAT(I)*XLAT
END DO
NCNLIN=MAXNLC where As it stands, getRefPoints<- function(no_d, int.range){
# previous versions just used width and assumed that left truncation
# was at zero, now using int.range to tell us the interval
# note this currently doesn't work with multiple integration ranges
# i.e. when int.range is a matrix w. > 1 row. This should have been caught
# and an error throw before now though.
xlat <- (int.range[2]-int.range[1])/(no_d^1.5)
ref_points <- double(no_d)
for(i in 1:no_d){
ref_points[i] <- (i^1.5) * xlat
}
ref_points <- ref_points+int.range[1]
return(ref_points)
} The default value of Fiddling with the |
Using the Distance for Windows parameters in control <- uni3$ddf$control
control$initial$adjustment <- c(0.9352, -0.05346, -0.08074)
control$nofit <- TRUE
rr <- ddf(dsmodel = ~cds(key = "unif", formula = ~1, adj.series = "cos",
adj.order = c(1, 2, 3), adj.scale = "width"), data = uni3$ddf$data,
method = "ds", meta.data =uni3$ddf$meta.data, control = control)
plot(rr) |
It was the implementation of the scaling for adjustments. The code used |
Great that you found the scaling issue @dill ! 🥇 |
Another thought: I just got the following warning message during fitting in an analysis (I can provide the analysis if required): |
Moving these to a separate issue about consistency between Distance for Windows and |
Analysis of the camera trapping example with the QAIC-best model, unif + 3 cosine adjustments, seems to produce a solution in which the detection probability increases beyond about 13 meters.
Distance 1.0.6
mrds 2.2.7
Note that Distance for Windows produces a fit with a slightly higher AIC (so lower negative log-likelihood) but without the non-monotonicity. I would have thought that both would check monotonicity at the same evaluation points, so I struggle to see how this happens (below is from the DuikerDaytime sample project in DistWin, analysis 6).
The text was updated successfully, but these errors were encountered: