Different estimate values with secr 4.2

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

Different estimate values with secr 4.2

Postby adamdillon » Thu Apr 23, 2020 3:13 pm

Hi Murray,

I've updated my secr version to 4.2.0 and then I reran models I had analyzed with secr 3.1.6 and the results were quite different.

I'm running a set of 28 models for island foxes and island spotted skunks out on the California Channel Islands. After running all of the models I determine a model averaged estimate based on the AICc values. The models I'm running are quite simple. D is constant across all models, g0 varies by sex, b and B and sigma varies by sex, b, and B. When all combinations are done it results in 28 models. When I compared the density estimates for individual models the only ones that are the same between serc 4.2.0 and secr 3.1.6 are the models that do not include b or B, which is only a total of 4 of the 28 models (shown below). I've read over the information provided about the updated version but I haven't come across anything that would explain why the b and B models are different in this new version. Am I missing something? I'm hoping you can guide me a bit on why this is happening. Thanks.

Code: Select all
Adult.Foxes <- read.capthist(captfile="Capture_File.txt", trapfile="Detection_File.txt", detector = "multi", fmt="trapID", noccasions=6, covnames = c("sex"))
Polygon <- readShapePoly("Buffer")
Fox.Mask <- make.mask(traps(Adult.Foxes), spacing = 100, type = "polygon", poly = Polygon)

D.1.g.1.s.1 <- secr.fit(Adult.Foxes, model = list(D ~ 1, g0 ~ 1, sigma ~ 1), trace = TRUE, mask=Fox.Mask, detectfn=0, hcov='sex')



    Model secr 3.1.6 secr 4.2.0 Same?
    D.1.g.1.s.1 0.082818 0.082818 YES
    D.1.g.1.s.sex 0.082806 0.082806 YES
    D.1.g.1.s.b 0.095340 0.079095 NO
    D.1.g.1.s.B 0.102280 0.081603 NO
    D.1.g.1.s.sex.b 0.095264 0.079087 NO
    D.1.g.1.s.sex.B 0.102242 0.081607 NO
    D.1.g.sex.s.1 0.082916 0.082916 YES
    D.1.g.sex.s.sex 0.082912 0.082912 YES
    D.1.g.sex.s.b 0.095652 0.079208 NO
    D.1.g.sex.s.B 0.102344 0.081667 NO
    D.1.g.sex.s.sex.b 0.095703 0.079197 NO
    D.1.g.sex.s.sex.B 0.102500 0.081696 NO
    D.1.g.b.s.1 0.098572 0.083548 NO
    D.1.g.b.s.sex 0.098534 0.083530 NO
    D.1.g.b.s.b 0.089194 0.071563 NO
    D.1.g.b.s.sex.b 0.089079 0.071504 NO
    D.1.g.B.s.1 0.092721 0.084683 NO
    D.1.g.B.s.sex 0.092700 0.084669 NO
    D.1.g.B.s.B 0.095703 0.075149 NO
    D.1.g.B.s.sex.B 0.095684 0.075162 NO
    D.1.g.sex.b.s.1 0.099072 0.083648 NO
    D.1.g.sex.b.s.sex 0.099002 0.083635 NO
    D.1.g.sex.b.s.b 0.089843 0.071695 NO
    D.1.g.sex.b.s.sex.b 0.089671 0.071595 NO
    D.1.g.sex.B.s.1 0.092847 0.084756 NO
    D.1.g.sex.B.s.sex 0.092819 0.084749 NO
    D.1.g.sex.B.s.B 0.095785 0.075241 NO
    D.1.g.sex.B.s.sex.B 0.095977 0.075239 NO

Last edited by adamdillon on Thu Apr 23, 2020 5:18 pm, edited 1 time in total.
adamdillon
 
Posts: 21
Joined: Tue Mar 03, 2015 2:11 pm

Re: Different estimate values with secr 4.2

Postby murray.efford » Thu Apr 23, 2020 4:49 pm

Dillon
Looks like something that needs fixing, but before I chase this up, can you please check one or two examples with the latest version secr 4.2.2? Your code appears to use a different capthist to the one whose input you indicate - just a typo? (Also please note this is a general forum, not a way of addressing me).
Murray
murray.efford
 
Posts: 712
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: Different estimate values with secr 4.2

Postby adamdillon » Thu Apr 23, 2020 5:21 pm

Yeah that was just a typo when I posted the code here. I changed it. I'll update to 4.2.2 and see if the differences persist. We were running models for both Santa Rosa Island and San Miguel Island. Many of the 28 models for the 2019 San Miguel data had errors and estimation problems but none of them had issues with the 4.2 version. But again estimates for many of the models were different between the versions.
adamdillon
 
Posts: 21
Joined: Tue Mar 03, 2015 2:11 pm

Re: Different estimate values with secr 4.2

Postby adamdillon » Thu Apr 23, 2020 5:58 pm

So I updated to 4.2.2 and the resulting estimates were the same as version 4.2.0 and different than those from version 3.1.6

If it would be easier I could send you the capture and detection files as well as simplified R script. To reproduce the issue you could simply run a single model (D ~ 1, g0 ~ B, sigma ~ 1) with both versions and see the differences in estimates.

Any guidance would be great.
adamdillon
 
Posts: 21
Joined: Tue Mar 03, 2015 2:11 pm

Re: Different estimate values with secr 4.2

Postby murray.efford » Thu Apr 23, 2020 6:00 pm

Thanks for checking. I'm seeing a difference with even simple ~b models and will follow up.
murray.efford
 
Posts: 712
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: Different estimate values with secr 4.2

Postby murray.efford » Fri Apr 24, 2020 3:03 am

Today I found a bug in secr 4.0.0 - secr 4.2.2 that caused fitted learned response models (~b, ~B etc.) for detector types 'multi', 'polygonX' and 'transectX' to differ from previous versions. A pre-release version of secr 4.2.3 fixes the bug and is available as the source package at https://www.otago.ac.nz/density/zip/secr_4.2.3.tar.gz and as the Windows binary at https://www.otago.ac.nz/density/zip/secr_4.2.3.zip. The final version of secr 4.2.3 will not be published for some time and may include further changes.

Thanks to Adam for raising this issue. Perhaps I should add a paragraph to secr-version4.pdf that tracks major teething problems in version 4 -there have been a few.

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

Re: Different estimate values with secr 4.2

Postby adamdillon » Mon May 04, 2020 10:40 am

So Murray is looks as though all of the estimates I'm getting from secr 4.2.3 are the same estimates I've been getting with the earlier versions of secr 4, but different than the estimates I was getting from secr 3.2. It's interesting because I've gone back and rerun past analysis with the secr 4.2.3 (fox estimates 2008-2019 Santa Cruz Island, 2009-2019 Santa Rosa Island, and 2006-2019 San Miguel Island) and the estimates I'm getting, when compared to those of secr 3.2) seem to flatten out the spikes in population size. Lots of our model include behavior as a component and often we would see these drops and rise in population size from year to year and now with the new estimates the peaks and troughs are tempered a bit from year to year.

We're just kind of in a holding pattern right now trying to see why these estimates are different with the different versions and which is more reliable. Thanks.
adamdillon
 
Posts: 21
Joined: Tue Mar 03, 2015 2:11 pm

Re: Different estimate values with secr 4.2

Postby adamdillon » Mon May 04, 2020 1:59 pm

Well Murray I just reran some of the analysis again and I'm getting the same results I did in the earlier versions now. Maybe I downloaded the 4.2.3 version before all the glitches were fixes.

Any idea what the issue was with those different estimates? When I reran all of our past data with that version the estimates were really interesting in comparison.

Thanks a lot!
adamdillon
 
Posts: 21
Joined: Tue Mar 03, 2015 2:11 pm


Return to analysis help

Who is online

Users browsing this forum: No registered users and 2 guests

cron