Session-specific array in multi-session model

250 views
Skip to first unread message

rasm...@gmail.com

unread,
Sep 29, 2015, 4:17:48 AM9/29/15
to secr
Hi

I am trying to get SECR to estimate densities for 6 individual arrays within a multi-session model.
It appears that SECR includes the total array area within each individual session.
How can you get SECR to only include the area+buffer of the individual arrays, within a multi-session model?

Best regards

Rasmus

Murray Efford

unread,
Sep 29, 2015, 4:37:06 AM9/29/15
to rasm...@gmail.com, secr
Hi, and welcome to the group!

I understand that what you want is to specify a distinct array for each session, rather than just using one pooled array repeatedly.

It's all in the construction of the 'capthist' object. There is a paragraph in the 'read.capthist' section of secr-datainput.pdf that should help:

"If the study includes multiple sessions and the detector layout or usage varies between sessions then it is
necessary to provide session-specific detector layout files. This is done by giving ‘trapfile’ as a vector of names,
one per session (repetition allowed; all ‘.csv’ or all not ‘.csv’). Sessions are sorted numerically if all session
identifiers are numeric, otherwise alphanumerically. Care is needed to match the order of layout files to the
session order: always confirm the result matches your intention by reviewing the summary."

Done correctly this embeds a different array (traps object) in each component (session) of the capthist object. Then using secr.fit with a particular 'buffer' argument will cause a different mask to be constructed for each session.

Let us know if you have trouble applying that.
Murray

P.S. I think you mean 'secr' :-)

--
You received this message because you are subscribed to the Google Groups "secr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to secrgroup+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rasmus Gren Havmøller

unread,
Dec 10, 2015, 1:33:32 PM12/10/15
to Murray Efford, secr
Dear Murray and ‘secr’ user group

Again thank you for help last time.

However I have now hit a problem in extension of your help from last time as seen below.

I have split my trapfile into one per session as you recommended below, but now when I try to create to use the make.mask function, using various parameter files, make.mask only creates a mask surrounding one of the trap arrays, not all.

They way I have created my trapfile is as a list (or more precisely a list of matrices).

trapfile=list(trapfileIdete,trapfileLumemo,trapfileMbatwa,trapfileMwanihana,trapfileNdundulu,trapfileRuipa )

And in making the mask I have used the following code

leoudzmask <- make.mask(trapfile, buffer=30000, type='trapbuffer', spacing=500)
leoudzmask1 <- addCovariates(leoudzmask,r.DEM)

But when plotted, the mask created by ‘secr’ only appears to be covering one of the trap arrays.

Is there a way where I can still have ‘secr’ running simulations on individual arrays, still using a multisession model, but with individual masks for each array as well?

Best regards

Rasmus

Murray Efford

unread,
Dec 10, 2015, 2:24:35 PM12/10/15
to Rasmus Gren Havmøller, secr
I don't think that code works at all with a list of matrices. With traps objects you get a multi-session mask in which each component is the mask appropriate to a particular traps object. Plotting this multi-session mask spills out each in turn, leaving only the last one visible unless you make space on the page (try code below)

I cannot remember the context of your simulations, but I think the answer to your question is Yes.

Murray

library(secr)

## multiple matrices - doesn't work
tf1 <- matrix(runif(100),nc=2) * 100
tf2 <- matrix(runif(100),nc=2) * 100
tf <- list(tf1,tf2)
mask <- make.mask(tf)

## multiple traps objects - multi-session mask
tf1 <- make.grid()
tf2 <- make.grid(nx=7)
tf <- list(tf1,tf2)
mask <- make.mask(tf)
summary(mask)

par(mfrow=c(1,2))
for (i in 1:2) {
    plot(mask[[i]])
    plot(tf[[i]], add=T)
}


Reply all
Reply to author
Forward
0 new messages