Varying effort and multiple sessions

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

Varying effort and multiple sessions

Postby CHWarbington » Tue Sep 03, 2019 3:45 pm

Hello -
I am trying to obtain a density estimate using secrlinear across three sampling sessions(years). I am also combining detector types - I used a camera trap array and human observations. Since the camera traps "work" around the clock while human observers worked 5-6 hours per shift I want to specify varying usage across the trap array (29 locations) for each session and for each occasion. Sampling periods within a year (session) ranged from 111 - 251 days (occasions), and not every site was in use each session. The camera trap sites were used multiple days in a row, whereas human observation stations were used sporadically.
I have the data files across all traps for each session (one for each year), but it is not clear to me if I can or how to incorporate the varying usage files into the secr capthist file. Or is it called in the command?

from the usage help file:
usage(object) <- value (This command only appears to allow one varying usage file at a time, and I cannot use it to assign other names, such as for each session in my data set)

For replacement of usage, various forms are possible for value
- a vector of R+1 values where R is the number of sessions in a multi-session object and elements 2..R+1 correspond to the numbers of occasions S1, S2,... in each session
(so in my case R = 3; but this calls for 4 values, again in my case: 3 111 112 251
This does not allow for varying usage of a trap site within a session)

So is it possible to use multiple sessions with varying usage/effort within each session?
Or should i run each year separately?
Thanks in advance!
Posts: 11
Joined: Fri Aug 09, 2019 5:40 pm

Re: Varying effort and multiple sessions

Postby CHWarbington » Thu Sep 26, 2019 1:29 pm

I am still trying to use varying effort and multiple sessions, without success.
Instead of setting varying effort per occasion per session (what i described in my previous post), I tried to set only varying effort per session (locations of traps in use, as accessible locations also varied between years)
But it appears I do not understand how to code that in R either, or it is not possible.
From what I understand, I can add columns for used (1) or not (0) per occasion in the trapfile, or I can use usage () to set the varying per occasion. However, I cannot use different trapfiles (with or without associated use columns) per session. To model what I am trying to do requires modelling each year separately.
Do I understand this correctly?

I apologize for the basic question, but I am really stuck here and could use some help.
Posts: 11
Joined: Fri Aug 09, 2019 5:40 pm

Re: Varying effort and multiple sessions

Postby murray.efford » Sat Sep 28, 2019 6:38 pm

Sorry to leave you hanging there... A mini tutorial on 'usage':

The 'usage' attribute of a single-session traps object is a matrix with k rows and s columns where k is the number of detectors and s is the number of occasions in that session. If a usage attribute is present it is automatically used by

The traps object for each session in a multisession capthist object may have a unique usage matrix (and they must vary if k or s varies among sessions). If you're having trouble reading these from input text files then construct each matrix separately and assign it as in this example using the 5-session builtin ovenCH dataset (for speed each usage matrix is uniform 1's here - yours will vary).

Code: Select all
# generate usage matrix for each of 5 sessions, or construct your own
usgelist <- list(matrix(1, 44, 9), matrix(1, 44, 10), matrix(1, 44, 10),
    matrix(1, 44, 10), matrix(1, 44, 10))

# insert each usage matrix in relevant traps object
for (i in 1:5) usage(traps(ovenCH)[[i]]) <- usgelist[[i]]

# review the result

Posts: 582
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: Varying effort and multiple sessions

Postby CHWarbington » Sun Oct 06, 2019 1:18 pm

Thanks for your response.
The command usagelist solved the problem.
Posts: 11
Joined: Fri Aug 09, 2019 5:40 pm

Return to analysis help

Who is online

Users browsing this forum: No registered users and 1 guest