Identical estimates in mark-resight by session

20 views
Skip to first unread message

Andrew Barnas

unread,
Aug 3, 2023, 3:44:44 PM8/3/23
to secr
Hello everyone,

I am hopeful someone can point me in the right direction here. I am trying to fit a mark-resight model with multiple sessions to estimate deer density using camera traps. However when fitting the model to obtain a separate estimate for each session, I am ending up with identical estimates for all parameters for both sessions.

Question #1. Am I specifying the model for mark resight data correctly? The number of cameras and layout is different in each session, so I first read in both detector files (in order), and then specify those in the trapfile argument. My "deer_reduced.txt" file contains detections of known individuals at cameras in each session (sessionyear2021 and sessionyear2022). There are 30 occasions in each session, but no marking occasions as all individuals were marked prior to the sampling occasions. Its also worth noting that estimates seem extremely low, compared to when I fit each year individually. I've attached the data files, as well as the relevant code and results here: 

CODE:
#read in camera trap files - order matters here!
camera_names = c(file.path(input_directory, "deer_cameras_2021.txt"),
                 file.path(input_directory, "deer_cameras_2022.txt"))

#Prepare the capthist object
deer_multisession<-read.capthist(captfile = file.path(input_directory, "deer_reduced.txt"),
              trapfile = camera_names,
              detector = "count",
              markocc = rep(0,30),
              skip = 1,
              verify = TRUE)
summary(deer_multisession, terse = TRUE)

start_time<-Sys.time()
#Fit the model
multisession_fit<-secr.fit(deer_multisession,
                           model = D ~ session, #lowercase "session" to fit a value for each level of session
                           details = list(autoini = 2), #Was having getting started unless I specify
                           buffer = 500,
                           trace = TRUE)
#I just like to know how long this takes
end_time<-Sys.time()
end_time - start_time

#Inspect results
summary(multisession_fit)

RESULTS:
$predicted $predicted$`session = year2021` link estimate SE.estimate lcl ucl D log 0.1509411 0.00000000 0.15094112 0.1509411 g0 logit 0.1133912 0.01177286 0.09228244 0.1385911 sigma log 264.9015328 11.31864106 243.63021321 288.0300483 pID logit 0.7000000 0.00000000 0.70000000 0.7000000 $predicted$`session = year2022` link estimate SE.estimate lcl ucl D log 0.1509411 0.00000000 0.15094112 0.1509411 g0 logit 0.1133912 0.01177286 0.09228244 0.1385911 sigma log 264.9015328 11.31864106 243.63021321 288.0300483 pID logit 0.7000000 0.00000000 0.70000000 0.7000000

Question #2. I've tried playing with the simulation functions in secr, but again am running into difficulties with the sim.resight and sim.capthist. First, does sim.resight allow simulating multiple sessions? I am thinking no, so I have tried sim.capthis but am encountering a similar problem. When I simulate a capthist object with a single marking occasion and then fit "D~session"  I get reasonable estimates:

CODE:
grid<-make.grid(detector = "count")
markocc(grid)<-c(1,0,0,0,0)
#
sim.test3<-sim.capthist(grid, detectpar= list(g0 = 0.3, sigma = 25),
                       nsessions = 2, renumber = FALSE,
            popn = list(D = 30), seed = 123)

fit0<-secr.fit(sim.test3,
               model = D~session,
               buffer = 500,trace = TRUE)

summary(fit0)

RESULTS:
$predicted $predicted$`session = 1` link estimate SE.estimate lcl ucl D log 27.7515912 2.8254041 22.74311 33.8630327 g0 logit 0.3709993 0.0152951 0.34155 0.4014397 sigma log 23.8974678 0.4960173 22.94490 24.8895803 pID logit 0.7000000 0.0000000 0.70000 0.7000000 $predicted$`session = 2` link estimate SE.estimate lcl ucl D log 29.6750432 2.9256002 24.47237 35.9837721 g0 logit 0.3709993 0.0152951 0.34155 0.4014397 sigma log 23.8974678 0.4960173 22.94490 24.8895803 pID logit 0.7000000 0.0000000 0.70000 0.7000000

But, when I change the marking occasions to all zeros (trying to replicate a sighting only scenario but with multiple sessions), leaving all else the same,  I again end up with identical estimates for each session. What is going on here? 

CODE:
#Trying it now with just sighting data
grid<-make.grid(detector = "count")
markocc(grid)<-c(0,0,0,0,0)

sim.test4<-sim.capthist(grid, detectpar= list(g0 = 0.3, sigma = 25),
                       nsessions = 2, renumber = FALSE,
            popn = list(D = 30), seed = 123)

summary(sim.test4)

fit1<-secr.fit(sim.test4,
               model = D~session,
               buffer = 500,trace = TRUE)

summary(fit1)

RESULTS:
$predicted $predicted$`session = 1` link estimate SE.estimate lcl ucl D log 4.9985018 0.00000000 4.9985018 4.9985018 g0 logit 0.3434086 0.01423374 0.3160754 0.3718205 sigma log 27.4431483 0.74448919 26.0223449 28.9415267 pID logit 0.7000000 0.00000000 0.7000000 0.7000000 $predicted$`session = 2` link estimate SE.estimate lcl ucl D log 4.9985018 0.00000000 4.9985018 4.9985018 g0 logit 0.3434086 0.01423374 0.3160754 0.3718205 sigma log 27.4431483 0.74448919 26.0223449 28.9415267 pID logit 0.7000000 0.00000000 0.7000000 0.7000000
Thanks for any help folks can offer!

-Andrew
deer_reduced.txt
deer_cameras_2021.txt
deer_cameras_2022.txt

Murray Efford

unread,
Aug 3, 2023, 7:56:00 PM8/3/23
to secr
What marks are you using? You seem to have no sightings of unmarked animals. If all animals are ID then this is not a mark-resight study.
Reply all
Reply to author
Forward
0 new messages