Hi Scarlett,
It sounds like you have something odd going on with your updating algorithm. Are you sure you are calculating your acceptance probabilities correctly, proposing reasonable new values and storing the updated parameter values (as opposed to the current values)?
The detection function model should not be affected by whether you include absences or not as the data used here are the distances to the detections. Hence, the similarity between your first run and the results using the distance:ds() function.
The count model, on the other hand, will be affected by only using segments with detections (what you refer to as presences). I would think that if you combine all data you should have enough observations that will allow you to fit the model. So, please try
your algorithm with all data first and see if you can get it to work.
I don't believe the problem lies in too many zeros, however. If your algorithm was reacting to the high number of zeros, your parameter values for the count model would update accordingly from your starting values, reflecting the low mean counts. I would recommend
checking at each small step if the algorithm does the correct thing, i.e.
- do the proposal distributions give a reasonable value?
- is the acceptance probability calculated in the correct manner?
- does the current parameter value get updated?
- does the updated value get stored?
With regards to the proposal distributions, please remember that when using e.g. a normal distribution with a mean = current value and a fixed standard deviation, using small standard deviations will, on average, increase your chances of the newly proposed
value being accepted and vice versa.
Hope this helps.
Cheers, Cornelia