empty sessions

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

empty sessions

Postby agoldberg » Mon Nov 15, 2021 5:25 pm

Hi, I am trying to run a multi-session with some empty sessions/occasions (traps were open but no individuals were trapped). I tried to create capture files as described in the manual following the empty sessions section but I keep running into errors.

Input
# Session ID Occasion Detector
. . . .
7 2421 3 276
7 2422 3 289
7 2361 4 204
7 2367 4 209
7 2455 4 1127
10 3028 1 1134
11 3282 1 209
11 3282 2 209
11 3028 2 1134
11 3302 3 234
11 3313 3 1137
. . . .
8 NONE 1 0
8 NONE 2 0
8 NONE 3 0
8 NONE 4 0
9 NONE 1 0
9 NONE 2 0
9 NONE 3 0
9 NONE 4 0
10 NONE 2 0
10 NONE 3 0
10 NONE 4 0
11 NONE 4 0


I am using the same trap input file for all sessions as we opened the same traps every night. I then:

Code: Select all
msCH<- read.capthist("e:/file/FS131_capt_nosex.txt",
                         "e:/file/FS131_trap.txt", detector = "multi")


and get the following error:
Code: Select all
Error in order(captTrap, abs(captures[validcapt, 3]), captID) :
  argument lengths differ


The trap file works fine when there are no missing sessions/occasions but I would like to be able to include them in the analysis. Do I need to add a dummy row(s) to the trap file? Any help for where I am going wrong is greatly appreciated.

Thank you in advance,
Amanda
agoldberg
 
Posts: 11
Joined: Sun Aug 23, 2015 9:10 pm

Re: empty sessions

Postby murray.efford » Tue Nov 16, 2021 5:33 am

Amanda

I read
To create a session with no detections, include a dummy row with the value of the noncapt argument as the animal identifier; the default noncapt value is ‘NONE’. The dummy row should have occasion number equal to the number of occasions and some nonsense value (e.g. 0) in each of the other fields (trapID etc.)


So you should add only one dummy row per (primary) session:
8 NONE 4 0
9 NONE 4 0
11 NONE 4 0

Also, your session 10 cannot both have caught an animal (3028) and qualified as 'empty'.

I see that verify() gives a misleading message 'Duplicated or missing row names (animal ID)'. This is a minor bug that I'll fix. For now you can dodge it by setting verify = FALSE in secr.fit().

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

Re: empty sessions

Postby agoldberg » Tue Nov 16, 2021 7:24 pm

Murray,
perfect, thank you very much. Do I need to worry about empty occasions (that is why I had a few extra lines; one for each occasion within a session)? Will I be able to use a behavioral response since some of the sessions have multiple occasions while session 10 does not?

Thanks,
Amanda
agoldberg
 
Posts: 11
Joined: Sun Aug 23, 2015 9:10 pm

Re: empty sessions

Postby murray.efford » Tue Nov 16, 2021 7:35 pm

I think the idea of using "occasion number equal to the number of occasions" is that secr.fit() will know there were that many occasions in your empty session. Otherwise, occasions when no animal was detected don't get special treatment.

Behavioural response models should be OK, but presumably you can't make any parameter session-dependent if some sessions have no detections (i.e. g0~b OK, g0~b*session or g0~session Not). You'll soon discover what works.
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 8 guests

cron