clarification on using and naming sessions

35 views
Skip to first unread message

drd11

unread,
Jul 9, 2020, 2:23:23 PM7/9/20
to secr

Hi Murray,

 

I am doing some analyses where I would like to estimate density by sex and  am using a "session =3D sex" approach. I have 4 years of data.

 

I have labeled the sessions for a single year something like "Male2012" and  "Female2012" and it works fine for a single year. However, there is a warning about the model statement being deprecated. If I change the sessions to "1" and "2" the deprecated warnings go away.

 

I tried running a model of just one sex where each session represented a different year (4 years). It seemed to go fine for females. For males I got a message that there were too few records for males and the suggestion was to use a different session as the reference level (I'm assuming that's what the message meant). I couldn't figure out how to change the reference level for the session in autoini so I did it manually.

 

So I took the first year's worth of data and made it the second session (se ssions in the capture file were labeled "Male2012", "Male 2016", "Male 2018 ", and "Male2019"). I then got a message that for Male 2012 (now the second session) that secr could not find any traps! However, after several hours I found that changing the session labels to "1" "2" "3" "4" ("2" now is the 2012 data) solved the problem. Note that ordering the sessions in the capture file "2" "1" "3" "4" did not work.

 

Could you give some insight into naming sessions for secr and also how to use autoini to change the reference level of a session (I think that would have save me a lot of time!)? If it's in the documentation, just point me in the right direction because I missed it. However, I was not able to figure anything out about using autoini to change the reference level of a session in the secr.pdf


I would greatly appreciate it.

 

Thanks,

 

Duane

Murray Efford

unread,
Jul 13, 2020, 3:01:22 PM7/13/20
to secr
Duane
I'm sorry for the hassle. I guess from the model warning that you are using R 4.0. Other changes in that R version may be responsible, particularly the new default for stringsAsFactors in data.frame(). The next version of secr tries to bring secr into line with R 4.0 - there is a Windows pre-release copy at https://www.otago.ac.nz/density/zip/secr_4.2.3.zip and I'll try to get it onto CRAN soon.

The autoini details option relates only to finding initial parameter values for likelihood maximisation. By default these are based on data from the first session, but if that is inadequate you can change it by specifying another session number, or perhaps details = list(autoini = "all").

You probably don't want to change the factor reference level, but the 'contrasts' option is there (mentioned in ?details but will need more homework).

Murray
Reply all
Reply to author
Forward
0 new messages