Bayesian model-based inference question: no chain movement when absence data included

31 views
Skip to first unread message

Scarlett Taylor

unread,
Apr 13, 2021, 10:58:51 AM4/13/21
to distance-sampling
Hello Cornelia and whomever else this may concern, 

I'm working my way through converting the example of Model-based inference analysis from Buckland et al (2015) at https://examples.distancesampling.org/book-bobwhite/bobwhite.html#defining-the-likelihood-function by Cornelia Oedekoven for my line-transect data. 

I have the algorithm up and running for my line-transect data running ok - and I tested it (accidentally) first on survey data with only presence data. The chain was moving ok and I got reasonably good estimates that were similar to those of basic distance with the ds() function. However, when I realized my mistake (i.e. not including the absence data), and added in the absence data, the chain no longer moves. 

While the algorithm will run, the trace plots are flat and do not move at all from their initial values. 

I'm thinking it's because I don't have enough presences (n_obs=216) compared to the zeros. With all transects and all observations, my total is n_tot=418 for one of the years (2016) that I'm sampling. The other year's (2007) split in data is more drastic (n_obs= 54, n_total=1440); and I could understand 2007 having "too many zeros" but I'm confused why 2016 wouldn't work either. Is there something in the R code that I should adjust to allow for more zeros or should the algorithm be able to handle this, and there may be a mistake somewhere else? 


Thanks for your time, 

Scarlett Taylor 
MSc. Candidate
Integrated Fisheries Lab | Department of Biology | LSC 7088
Dalhousie University | Halifax, NS B3H 4R2

Halifax Coordinator: 
Sharks of the Atlantic Research and Conservation Centre (ShARCC)

e: scarlet...@dal.ca
c: (905) 872-8534

Cornelia Oedekoven

unread,
Apr 13, 2021, 12:02:55 PM4/13/21
to Scarlett Taylor, distance-sampling
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

><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <><

Cornelia S. Oedekoven, PhD

Centre for Research into Ecological and Environmental Modelling (CREEM)

University of St Andrews

+44 1334 461826

cs...@st-andrews.ac.uk

creemmural.org

creem2.st-andrews.ac.uk

coedekoven.wix.com/cornelia-oedekoven

><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <><



From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of Scarlett Taylor <scarlet...@hotmail.com>
Sent: 13 April 2021 15:58
To: distance-sampling <distance...@googlegroups.com>
Subject: [distance-sampling] Bayesian model-based inference question: no chain movement when absence data included
 
--
You received this message because you are subscribed to the Google Groups "distance-sampling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distance-sampl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/410438e3-a9d8-47d3-9d7b-b113399c5ae3n%40googlegroups.com.

Scarlett Taylor

unread,
Apr 13, 2021, 12:43:24 PM4/13/21
to distance-sampling
Hi Cornelia, 

Thanks for the quick reply. This does really help. I'll look into this with a fine-toothed comb with my supervisor and we'll keep you updated if we find something that is making it go wonky. 

Cheers, 
Scarlett 

Reply all
Reply to author
Forward
0 new messages