Interpreting detection probability estimate from gdistsamp

951 views
Skip to first unread message

Manuel Spínola

unread,
Apr 18, 2012, 1:10:22 PM4/18/12
to unma...@googlegroups.com
Dear list members,

I ran the example for "gdistsamp"

But I don't understand the backtransformed estimate of the detection probability of 31.3.

How do I need to interpret the estimate?


> set.seed(36837)
> R <- 50 # number of transects
> T <- 5  # number of replicates
> strip.width <- 50
> transect.length <- 100
> breaks <- seq(0, 50, by=10)
> lambda <- 5 # Abundance
> phi <- 0.6  # Availability
> sigma <- 30 # Half-normal shape parameter
> J <- length(breaks)-1
> y <- array(0, c(R, J, T))
> for(i in 1:R) {
+   M <- rpois(1, lambda) # Individuals within the 1-ha strip
+   for(t in 1:T) {
+     # Distances from point
+     d <- runif(M, 0, strip.width)
+     # Detection process
+     if(length(d)) {
+       cp <- phi*exp(-d^2 / (2 * sigma^2)) # half-normal w/ g(0)<1
+       d <- d[rbinom(length(d), 1, cp) == 1]
+       y[i,,t] <- table(cut(d, breaks, include.lowest=TRUE))
+     }
+   }
+ }
> y <- matrix(y, nrow=R) # convert array to matrix
> umf <- unmarkedFrameGDS(y = y, survey="line", unitsIn="m",
+                         dist.breaks=breaks, tlength=rep(transect.length, R), numPrimary=T)
> summary(umf)
unmarkedFrame Object
50 sites
Maximum number of observations per site: 25 
Mean number of observations per site: 25 
Number of primary survey periods: 5 
Number of secondary survey periods: 1 
Sites with at least one detection: 50 

Tabulation of y observations:
   0    1    2    3    4 <NA> 
 838  334   65   12    1    0 
> m1 <- gdistsamp(~1, ~1, ~1, umf, output="density")
> summary(m1)

Call:
gdistsamp(lambdaformula = ~1, phiformula = ~1, pformula = ~1, 
    data = umf, output = "density")
Abundance (log-scale):
 Estimate    SE    z  P(>|z|)
     1.53 0.125 12.2 1.89e-34

Availability (logit-scale):
 Estimate    SE    z P(>|z|)
    0.519 0.318 1.63   0.103

Detection (log-scale):
 Estimate     SE    z P(>|z|)
     3.44 0.0706 48.8       0

AIC: 1812.616 
Number of sites: 50
optim convergence code: 0
optim iterations: 38 
Bootstrap iterations: 0 

> backTransform(m1, type="lambda")
Backtransformed linear combination(s) of Abundance estimate(s)

 Estimate    SE LinComb (Intercept)
      4.6 0.574    1.53           1
Transformation: exp 
> backTransform(m1, type="phi")
Backtransformed linear combination(s) of Availability estimate(s)

 Estimate     SE LinComb (Intercept)
    0.627 0.0745   0.519           1

Transformation: logistic 
> backTransform(m1, type="det")
Backtransformed linear combination(s) of Detection estimate(s)

 Estimate   SE LinComb (Intercept)
     31.3 2.21    3.44           1
Transformation: exp 


--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspi...@una.ac.cr
mspin...@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río
Institutional website: ICOMVIS

Richard Chandler

unread,
Apr 18, 2012, 3:37:06 PM4/18/12
to unma...@googlegroups.com
Hi Manuel,

For distance sampling models, you don't estimate detection probability directly, Instead, you estimate the scale parameter (sigma) of the detection function. In the example, the line-transect data are simulated using a half-normal detection function with sigma=30. To visualize this, you could issues the command:

# For line-transect only
plot(function(x, sigma=30) exp(-x^2/(2*sigma^2)), 0, 50, xlab="Distance", ylab="Detection prob", ylim=c(0,1))

To compute detection probability, you need to compute the integral of the detection function over the distance interval.

integrate(function(x, sigma=30) exp(-x^2/(2*sigma^2)), 0, 50)$value / 50 # line-transect only

The getP() function in unmarked does this for you. The book by Buckland et al (2001) covers the fundamentals in much more depth. There is also a short vignette in unmarked called "distsamp".

Richard

_____________________________________
Richard Chandler, post-doc
USGS Patuxent Wildlife Research Center
301-497-5696



From: Manuel Spínola <mspin...@gmail.com>
To: unma...@googlegroups.com
Date: 04/18/2012 01:13 PM
Subject: [unmarked] Interpreting detection probability estimate from gdistsamp
Sent by: unma...@googlegroups.com


Manuel Spínola

unread,
Apr 19, 2012, 9:11:56 AM4/19/12
to unma...@googlegroups.com
Thank you very much Richard,

Manuel

2012/4/18 Richard Chandler <rcha...@usgs.gov>

Tyler Hallman

unread,
Oct 31, 2018, 1:26:43 PM10/31/18
to unmarked
Hi Richard et al.,

The shapes of the detection probabilities for point counts here confuse me. In the code below, I make a figure of the detection probability as a function of distance in the half normal distribution:

plot(function(x) gxhn(x, sigma=0.4), 0, 150, xlab="Distance (m)",
     ylab="Detection prob", cex.lab=0.7,
     cex.axis=0.7, las=1)

Is this just for a line transect? Should I use grhn instead for a point transect? 

plot(function(x) grhn(x, sigma=0.4), 0, 150, xlab="Distance (m)",
     ylab="Detection prob", cex.lab=0.7,
     cex.axis=0.7, las=1)

What's confusing to me, is that when you integrate the grhn (integrate(grhn, 0, 150, sigma=40)$value * 2*pi / (pi*150^2)) or use getP to do so, you end up with lower detection probabilities closest to the center point. I understand that due to the increasing area sampled further from the point, the probability density function should change. Given an even distribution of birds throughout the sampled area, you would detect more at intermediate distances:

plot(function(x) drhn(x, sigma.distsamp), 0, TruncationD, xlab="distance",
     ylab="Probability density", main="Point-transect")

That said, shouldn't the detection probability itself still be highest closest to the observer? In fact, isn't that one of the assumptions of distance sampling?

I must be missing something really basic. I would love a simple explanation. 

Cheers,
-Tyler

Tyler Hallman

unread,
Oct 31, 2018, 1:33:40 PM10/31/18
to unmarked
As additional information, the reason I bring this up is that when I used getP() on some models, it's broken into the P for each of your distance bins, and the nearest bins had lower P than the intermediate bins. In terms of detection probability alone, that doesn't make sense to me. 

Again thank you for any clarification! 

Cheers,

-Tyler

Tyler Hallman

unread,
Nov 1, 2018, 3:32:23 PM11/1/18
to unmarked
I think I figured it out. The detection function itself is still 100% at the point, but what the bins are showing using getP() is the area weighted detection probability contributing to the overall detection within your truncation distance. In other words, within each bin, the reported p is not particularly meaningful, but when summed, that is the detection probability within your truncation distance at that point. 

Thanks all! 

Cheers,
-Tyler
Reply all
Reply to author
Forward
0 new messages