convergence problems with mark-resight and pID<1

questions concerning anlysis/theory using program DENSITY and R package secr. Focus on spatially-explicit analysis.

convergence problems with mark-resight and pID<1

Postby Mateo » Thu Dec 27, 2018 7:40 pm

I am trying to design a mark-resight study, and I find that if pID <1, either secr.fit does not converge, or the estimates are bad (low accuracy and precision).

Of course, if pID<1, the data contains less information, and we expect some drop off in precision, but the effect is greater than I expected. For models where the number of marked animals is known, here is what I observed with simmed data:
If I change pID from 1 to 0.8, my model does not converge.
If pID=0.8 and I double resight sessions from 5 to 10, my model does not converge.
If pID=0.8 and I double g0 from 0.2 to 0.4, my model does not converge.
If pID=0.8 and I include the marking session (and drop a resight session), the above models do converge.

Again, I understand the marking session provides more information, but the effect is much stronger than I would expect. Also, in many mark-resight surveys, capture is relatively ad-hoc and there is not a clean capture session to model, so I would like this to work without a capture session.

I provide code below. My questions are, why does pID<1 cause so much trouble? Did I make a mistake? Why does the marking session dramatically improve estimates? Can I do something, either in secr or in the design, to get a secr mark-resight model to converge without a capture session?

Code: Select all
# I wrote a function to aid repetition
pctID.foo <- function(seed=1, sight.sessions=5, g0=0.2, pctID=1) {
     # some parameters
     set.seed(seed)         
     sig <- 8
     D <- 46.3
     g0.capture <- g0
     g0.resight <- g0

     # sim grid and animals
     grid <- make.grid(nx = 10, ny = 10, spacex = 20, spacey = 20, spacing = NULL,
                       detector = c("multi", rep("count",sight.sessions)),
                       originxy = c(0,0), hollow = F, ID = "alphay", markocc = NULL)
     pop2 <- sim.popn(grid, D = D, buffer = 0)   # expect 150 animals
     
     # sim capture histories
     markocc(grid) <- c(1, rep(0, sight.sessions))
     g0mr <- c(g0.capture, rep(g0.resight, sight.sessions)) 
     simMS <- sim.resight(grid, detectpar=list(g0 = g0mr, sigma = sig),
                          popn = pop2, pID = pctID)

     # drop either the last (resight) session, or first (capture) session
     dropLast <- subset(simMS, occasions=1:sight.sessions)  # remove final
     dropFirst <- subset(simMS, occasions=2:(sight.sessions+1),
                       dropnullCH=F)  # remove marking session
     
     # (optimal) starting values
     ostart <- c(log(D), qlogis(g0.resight), log(sig), qlogis(pctID-0.0000000001))
     mask <- make.mask(traps(simMS), nx = 32, buffer = 0)   # habitat mask

     # fit model
     fit.dropLast <- secr.fit(dropLast, model = list(g0 ~ 1),
                            mask = mask, start=ostart)
     fit.dropFirst <- secr.fit(dropFirst, model = list(g0 ~ 1),
                            mask = mask, start=ostart)

     return(data.frame(abund = nrow(pop2),
                       est.with.mark=tryCatch(region.N(fit.dropLast)[1,1],
                                              error=function(e) NA),
                       est.without.mark=tryCatch(region.N(fit.dropFirst)[1,1],
                                              error=function(e) NA)
                       ))
     
} # end function
     


works <- pctID.foo(seed=1, sight.sessions=5, g0=0.2, pctID=1)
low.pctID <- pctID.foo(seed=1, sight.sessions=5, g0=0.2, pctID=0.8)
high.sessions <- pctID.foo(seed=1, sight.sessions=10, g0=0.2, pctID=0.8)
high.g0 <- pctID.foo(seed=1, sight.sessions=5, g0=0.4, pctID=0.8)



Output of code:

Model || abundance || estimate with marking || estimate w/o marking
works || 142 || 132 || 148
low.pctID || 142 || 131 || NA
high.sessions || 142 || 139 || NA
high.g0 || 142 || 158 || NA

I tried this for several seeds and got similar results. I think I have examples where it does converge, but with low precision and accuracy. Thanks for any ideas!
Mateo
 
Posts: 13
Joined: Thu Oct 01, 2009 10:56 am
Location: Georgia

Re: convergence problems with mark-resight and pID<1

Postby murray.efford » Thu Jan 03, 2019 4:44 pm

I'll try to troubleshoot this in the next day or so...
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: convergence problems with mark-resight and pID<1

Postby murray.efford » Thu Jan 03, 2019 8:49 pm

The case of sighting-only data when not all sightings of marked animals are identified (pID < 1) is messy - it's covered by Eq 12 etc. in Efford & Hunter 2018, but not (fully) implemented in 'secr' (early coding gave problems that were not solved). The secr 3.1 code was supposed to terminate with a message in this case, but that was triggered only for unknown-n (it continued when n was known, giving NA likelihoods). I've patched my working version to give the message. I can't say when a full implementation will be available (it's a grind, it's low priority and sighting-only seldom seems very satisfactory).

Thanks for bringing this to light. I'll see what can be done.
Murray
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: convergence problems with mark-resight and pID<1

Postby murray.efford » Sat Jan 05, 2019 1:33 am

I think I have sorted this out.

See notes at https://www.otago.ac.nz/density/pdfs/sightingonlyTm.pdf and provisional updated package at https://www.otago.ac.nz/density/zip/secr_3.2.0.tar.gz (source) and https://www.otago.ac.nz/density/zip/secr_3.2.0.zip (Windows binary).

Emphasising: this is provisional and both 3.2.0 and the sighting-only notes may disappear or be modified. Some density estimates seem suspiciously far from truth (but remember the CI is underestimated in the uncorrected version shown). If you try this and have problems I'd like to hear.

Murray
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: convergence problems with mark-resight and pID<1

Postby Mateo » Thu Jan 10, 2019 1:02 pm

Thanks so much for the help! Phidot notified me of your Jan 3 post, and I was waiting for another notification, but I didn't get one, so I only just noticed the updates. I will have to look at this. Thanks.
Mateo
 
Posts: 13
Joined: Thu Oct 01, 2009 10:56 am
Location: Georgia

Re: convergence problems with mark-resight and pID<1

Postby Mateo » Fri Jan 11, 2019 6:45 pm

So if the CI is underestimated, would a bootstrap be the appropriate procedure to correct that?
Mateo
 
Posts: 13
Joined: Thu Oct 01, 2009 10:56 am
Location: Georgia

Re: convergence problems with mark-resight and pID<1

Postby murray.efford » Sun Jan 13, 2019 4:07 pm

I suggest you read the documentation. It describes a way to adjust the CI.
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand


Return to analysis help

Who is online

Users browsing this forum: No registered users and 11 guests