Hello to all,
I believe I am having a little trouble with the new version of the package Distance.
I wish to estimate bird abundances based on aerial distance sampling data (obtained from transects).
I tried running models with different distributions and adjustement terms, without any covariates. For some models, I receive the following error message :
Fitting uniform key function with cosine(1,2,3) adjustments
Error in ddf.ds(model = dsmodel, data, meta.data = meta.data, control = control, :
More parameters to estimate than distance bins
Error in model fitting, returning: uniform key function with cosine(1,2) adjustments
Error: Error in ddf.ds(model = dsmodel, data, meta.data = meta.data, control = control, :
More parameters to estimate than distance bins
Warning in mrds::check.mono(model, n.pts = 20) :
Detection function is not strictly monotonic!
Warning in mrds::check.mono(model, n.pts = 20) :
Detection function is less than 0 at some distances
I tried looking at my variable types and their content, but I cannot find where this error is coming from. I find it especially weird as it only occurs on a few combinations of the distributions and adjustement terms I am trying to run.
Would anyone have an idea where this error could come from ?
I can send my data and script off-the-list if it can help to better understand the problem.
Many thanks in advance if you can help me deal with this error message, and I wish you all a very nice day !
Delphine
Dear Eric and all Distance sampling users,
Following my previous emails, I am writing you again as I cannot find any reason why some of my models are not working. I get the message ‘More parameters to estimate than distance bins’ for three of my models :
- Hn with no specification of adjustments nor orders
- Unif with no specification of adjustments nor orders
- And Hr with polynomial adjustment and order 2
All the other models are working fine, even those with a second order, so I do not get why these three return the error message.
As I mentioned in my previous message, I have used five distance bins in my model. I have got four intervals of distance in my data (0 to 0.08, 0.08 to 0.18, 0.18 to 0.38 and 0.38 to 0.78). I wrote those in the cutpoints object, and added 0 as the first element in the cutpoints, which makes five bins : 0, 0.08, 0.18, 0.38 and 0.78).
Is there anything wrong with my cutpoint object ?
Otherwise, any idea of why this problem is arising would be greatly appreciated !
Many thanks if you can help me with this problem, and I wish you all a very nice day !
Delphine
ds()
: adjustments=
the default of cosine adjustments will be usedorder=
, ds()
will attempt to fit several models with increasing numbers of adjustment terms.ducknest
data set that ships with the Distance package, I placed the detections into four bins:
library(Distance)