"spike near zero-distance" and hazard rate models

38 views
Skip to first unread message

Aditya Ghoshal

unread,
Apr 3, 2023, 3:31:50 AM4/3/23
to distance-sampling
Hi Eric,
I am looking a multiyear multispecies survey for herbivores across two habitats. While running the models (using distance package in R) I have encountered the warning "spike near zero distance" especially while running the hazard rate models. Indeed those species have a very high detection on or close to the line. I assume this is because the 'hr' modelled detection function has a pronounced "shoulder"? (question 1)
Now the main issue is that for one of my species (hare), I have a high number of detections near the line but the hr model ran (and was in fact the model with the lowest AIC). However, for another species (chital deer) the hr model throws up the warning "spike near zero distance" even though the density plot has a smoother decline with distance compared to hare. Why this discrepancy? (question2)
Furthermore, all the models, with the various key-adjustment pairs for chital shows p value much lower than 0.05 in the CvM test during goodness-of-fit! Thus, none of the models would give me a reasonable estimate. What is the way around such a scenario (when no model is a 'good fit')?. Across all my trials this is the first time I am facing this issue. 
The histogram of detections and the density plot are attached below  along with the model comparison table for chitals.
hare hist.jpeghare density.jpeg

chital density.jpegchital hist.jpeg

Chital models.PNG
Thank you,


Eric Rexstad

unread,
Apr 3, 2023, 6:33:44 AM4/3/23
to Aditya Ghoshal, distance-sampling
Aditya

Line transect distance sampling data that has a "spike" at small detection distances are notoriously difficult to model adequately with detection function models. Models either fit poorly or have large uncertainty or produce unrealistic estimates of abundance.  This is why it is important to employ field procedures that produce data where detection at distance 0 is perfect, but also detection probability remains high for some range of distances.

The warning message the software produces is alerting the user to such a problem in the data being analysed. Note it is a "warning" rather than an "error" message, indicating the results should be studied more carefully.

There is no good analytical solution to resolve the "spike at small distances" I am afraid.

From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of Aditya Ghoshal <aditya...@ncf-india.org>
Sent: 03 April 2023 08:31
To: distance-sampling <distance...@googlegroups.com>
Subject: [distance-sampling] "spike near zero-distance" and hazard rate models
 
--
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/f1af8b66-1a1d-41a8-8982-45148f120aeen%40googlegroups.com.

Stephen Buckland

unread,
Apr 3, 2023, 7:34:30 AM4/3/23
to Eric Rexstad, Aditya Ghoshal, distance-sampling

Adding to Eric’s comment, it looks like you need to truncate your data considerably.  I don’t know what your distance units are, but it looks like your hare data should be truncated at around 0.02, and your chital data at around 0.05.  The histograms will hopefully then show how much of a problem you have with these data.  The spike might be caused by large numbers of zero distance, in which case better field methods are needed, or the data may look badly spiked simply because you have not chosen suitable truncation distances.

 

Steve Buckland

 

From: 'Eric Rexstad' via distance-sampling <distance...@googlegroups.com>
Sent: Monday, April 3, 2023 11:34 AM
To: Aditya Ghoshal <aditya...@ncf-india.org>; distance-sampling <distance...@googlegroups.com>
Subject: Re: [distance-sampling] "spike near zero-distance" and hazard rate models

 

Aditya

 

Line transect distance sampling data that has a "spike" at small detection distances are notoriously difficult to model adequately with detection function models. Models either fit poorly or have large uncertainty or produce unrealistic estimates of abundance.  This is why it is important to employ field procedures that produce data where detection at distance 0 is perfect, but also detection probability remains high for some range of distances.

 

The warning message the software produces is alerting the user to such a problem in the data being analysed. Note it is a "warning" rather than an "error" message, indicating the results should be studied more carefully.

 

There is no good analytical solution to resolve the "spike at small distances" I am afraid.


From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of Aditya Ghoshal <aditya...@ncf-india.org>
Sent: 03 April 2023 08:31
To: distance-sampling <distance...@googlegroups.com>
Subject: [distance-sampling] "spike near zero-distance" and hazard rate models

 

Hi Eric,

I am looking a multiyear multispecies survey for herbivores across two habitats. While running the models (using distance package in R) I have encountered the warning "spike near zero distance" especially while running the hazard rate models. Indeed those species have a very high detection on or close to the line. I assume this is because the 'hr' modelled detection function has a pronounced "shoulder"? (question 1)

Now the main issue is that for one of my species (hare), I have a high number of detections near the line but the hr model ran (and was in fact the model with the lowest AIC). However, for another species (chital deer) the hr model throws up the warning "spike near zero distance" even though the density plot has a smoother decline with distance compared to hare. Why this discrepancy? (question2)

Furthermore, all the models, with the various key-adjustment pairs for chital shows p value much lower than 0.05 in the CvM test during goodness-of-fit! Thus, none of the models would give me a reasonable estimate. What is the way around such a scenario (when no model is a 'good fit')?. Across all my trials this is the first time I am facing this issue. 

The histogram of detections and the density plot are attached below  along with the model comparison table for chitals.

 

 

Thank you,

 

 

--
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/f1af8b66-1a1d-41a8-8982-45148f120aeen%40googlegroups.com.

--
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.

Eric Rexstad

unread,
Apr 4, 2023, 2:12:18 AM4/4/23
to Aditya Ghoshal, Stephen Buckland, distance-sampling
Aditya

The negative exponential detection function model has poor properties, as we have discussed previously, precisely because it does fit highly spiked line transect data. For that reason, it was not programmed into the Distance R package.

From: Aditya Ghoshal <aditya...@ncf-india.org>
Sent: 04 April 2023 07:09
To: Stephen Buckland <st...@st-andrews.ac.uk>
Cc: Eric Rexstad <Eric.R...@st-andrews.ac.uk>; distance-sampling <distance...@googlegroups.com>

Subject: Re: [distance-sampling] "spike near zero-distance" and hazard rate models
 
I tried to set the truncation distance to 0.05, but the models still throw up the warning of "spike near zero" for chitals. I was reading in one of the questions posted in the group that negative exponential functions can be fitted for detections that drop off sharply. 
Is there a way to fit a negative exponential key function in the distance package? And what would be the appropriate adjustment terms? I could not find much information on that online. 

On Mon, Apr 3, 2023 at 5:19 PM Aditya Ghoshal <aditya...@ncf-india.org> wrote:
Thank you both Eric and Stephen! All my distance axes are in kms. I have currently been using a standard 5% truncation limit for all species that I am analysing but I will try out using separate truncation distances as well. And it probably does stem from the study design, as the sampling was carried out during the rainy season, during which a lot of vegetation growth impeded the observations beyond a certain distance from the line. 
Also as an additional comment, I am completely new to distance sampling analyses, and this group has been really helpful for a lot of my doubts and queries. It is an amazing job you guys are doing! 
--
Dr. Aditya Ghoshal
Senior Research Consultant
Nature Conservation Foundation
Western Ghats Programme


--
Dr. Aditya Ghoshal
Senior Research Consultant
Nature Conservation Foundation
Western Ghats Programme

Aditya Ghoshal

unread,
Apr 4, 2023, 5:20:15 PM4/4/23
to Stephen Buckland, Eric Rexstad, distance-sampling
Thank you both Eric and Stephen! All my distance axes are in kms. I have currently been using a standard 5% truncation limit for all species that I am analysing but I will try out using separate truncation distances as well. And it probably does stem from the study design, as the sampling was carried out during the rainy season, during which a lot of vegetation growth impeded the observations beyond a certain distance from the line. 
Also as an additional comment, I am completely new to distance sampling analyses, and this group has been really helpful for a lot of my doubts and queries. It is an amazing job you guys are doing! 

On Mon, Apr 3, 2023 at 5:04 PM Stephen Buckland <st...@st-andrews.ac.uk> wrote:

Aditya Ghoshal

unread,
Apr 4, 2023, 5:20:18 PM4/4/23
to Stephen Buckland, Eric Rexstad, distance-sampling
I tried to set the truncation distance to 0.05, but the models still throw up the warning of "spike near zero" for chitals. I was reading in one of the questions posted in the group that negative exponential functions can be fitted for detections that drop off sharply. 
Is there a way to fit a negative exponential key function in the distance package? And what would be the appropriate adjustment terms? I could not find much information on that online. 

On Mon, Apr 3, 2023 at 5:19 PM Aditya Ghoshal <aditya...@ncf-india.org> wrote:
Reply all
Reply to author
Forward
0 new messages