Mark-recapture MCDS with gamma key function questions

Skip to first unread message

Jan 10, 2023, 3:56:15 PMJan 10
to distance-sampling

Dear DS Group,

 I few questions regarding mark-recapture distance analysis when paired with the gamma key function. My data is from an aerial transect survey with independent observers. 

 When I include a cosine adjustment term with the gamma key function, the AIC is lower but the plot for the ‘pooled detections’ has some of the covariate traces going above 100% detection (I’m assuming that this is bad).  Is it appropriate to use cosine adjustment terms with the gamma function?  Just to note, the model converged without any error messages.

 This brings me to a couple of arguments for the MCDS function definition that I can find little information about:

 ‘shape.formula’ - other than being described as the formula for the shape function, and applicable to the hazard-rate or gamma key functions, I can find any additional information. The default value is ~1 but altering this numerical value produces errors and I’m unsure of what variables are intended to be included?  I’m assuming that the shape coefficient is optimized during the fitting of the detection function so I’m also wondering what benefit there might be to setting this value manually?  

 ‘adj.exp’ -   I found listed as “if TRUE uses exp(adj) for adjustment to keep f(x)>0” and “Added argument adj.exp which if set to TRUE will use key*exp(adj) rather than key*adj to keep f(x)>0”.  I occasionally see the warning “Detection function is less than 0 at some distances” and assume that adj.exp=TRUE would apply there, but when I test applied this adjustment to a function that has no warnings, it still changes the shape of the resulting detection function.  It would help if I knew more about how this adjustment works and when it is appropriate.  


I’m also curious about how mark-recapture probability is combined with MCDS probability, in the specific case of a gamma key function when including distance in the mark-recapture model.  Although the model summary states the probability at distance zero is used from the conditional detection function for inclusion in the average (overall) probability, I would assume that probability at the same distance as the gamma peak would be preferred?  This might be the case but I haven't been able to test this.

 Any help would be appreciated.



Len Thomas

Jan 11, 2023, 12:19:15 PMJan 11
Hi Mitch, (cc list)

All good questions. We have a reduced ability to support the gamma key
function now that Dave Miller has left the Distance development team.
Nevertheless I'm happy to help as best I can. Perhaps we can correspond
offline on this, and post a summary of findings to the list. If that
sounds okay, would you mind sending me a copy of your data and code so I
can look into the g(x)>1 issue with the cosine adjustment.

Thanks! Len
> --
> 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
> <>.
> To view this discussion on the web visit
> <>.

I am a member of the University and College Union and am currently
participating in industrial action to improve UK higher education
staff pension, pay, equality and working conditions. For more
information, please see

Len Thomas (he/him) @len_thom
Centre for Research into Ecological and Environmental Modelling
and School of Mathematics and Statistics
The Observatory, University of St Andrews, Scotland KY16 9LZ
Office: UK+1334-461801 Admin: UK+1334-461842

While I may be sending this email outside of my normal office hours,
I have no expectation to receive a reply outside of yours.

The University of St Andrews is a charity
registered in Scotland, No SC013532.

Jan 13, 2023, 11:44:24 AMJan 13
to distance-sampling
Hi Len,

I've sent you the data and code.  Yes, let's post a summary of findings to the list.


Reply all
Reply to author
0 new messages