Release: unmarked 1.1.1

351 views
Skip to first unread message

Ken Kellner

unread,
Jun 1, 2021, 3:24:10 PM6/1/21
to unmarked
Hi all,

unmarked v1.1.1 is now on CRAN. There are a number of new features.

1. We have begun to add experimental support for random effects on model parameters. Right now, single-season occupancy and N-mixture models (occu/pcount) are supported but this should grow over time. Random effects are specified using lme4 syntax. Some more complex random effects structures are not supported. I'd be happy to get feedback on this feature if you try it - post bugs here or on Github, or email me directly. We've used Template Model Builder (TMB) to implement this.

2.  A new function nmixTTD() for estimating abundance from time-to-detection data is now available. See Strebel et al. (2021) "Estimating abundance based on time-to-detection data", in Methods in Ecology and Evolution, for more details on this model.

3. Some of the slower-running model functions, like occuRN, gdistsamp, gmultmix, etc., now support multi-threaded likelihood calculation. This should speed up long model run times on more powerful computers. Check the help files for individual functions - supported functions will have a "threads" argument to set how many you want to use. You may not see a speed-up on all computers as it depends on availability of openMP.

We also fixed many bugs, mainly related to predict and especially related to the predict function for occuMulti models.

Hope you find these new features to be useful!

Ken


aw...@scenichudson.org

unread,
Jun 2, 2021, 10:21:09 AM6/2/21
to unmarked
Thank you, Ken, and all collaborators who have helped and are helping develop unmarked!  The package is hugely useful and just keeps getting better!

Kery Marc

unread,
Jun 2, 2021, 11:05:15 AM6/2/21
to unma...@googlegroups.com
Dear Ken, Richard and Andy,

that's a short and concise message to describe a LOT of really groundbreaking new functionality: thank you very much !

Best regards  --- Marc




From: unma...@googlegroups.com [unma...@googlegroups.com] on behalf of Ken Kellner [ken.k...@gmail.com]
Sent: Tuesday, June 01, 2021 21:24
To: unmarked
Subject: [unmarked] Release: unmarked 1.1.1

--
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unmarked/c02ad20b-9053-48af-8513-47fbf7ff504cn%40googlegroups.com.

Richard Chandler

unread,
Jun 2, 2021, 11:09:58 AM6/2/21
to unma...@googlegroups.com
All the credit goes to Ken! 

--
Richard Chandler
Associate Professor
Wildlife Ecology and Conservation
Warnell School of Forestry and Natural Resources
University of Georgia


From: unma...@googlegroups.com <unma...@googlegroups.com> on behalf of Kery Marc <marc...@vogelwarte.ch>
Sent: Wednesday, June 2, 2021 2:48 AM
To: unma...@googlegroups.com <unma...@googlegroups.com>
Subject: RE: [unmarked] Release: unmarked 1.1.1
 
[EXTERNAL SENDER - PROCEED CAUTIOUSLY]

Dusit Ngoprasert

unread,
Aug 13, 2021, 9:11:57 PM8/13/21
to unmarked
Dear Ken,
From time to time, R crashed and automatic shut down when running gdistsamp. I never encounter this problem before with previous unmarked or R v4.0.3. Even a simple model still causes the problem and unpredictable (the same model ran fine before but the second time may cause shut down). 
Are there any compatibility issues?

> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                           LC_TIME=English_United States.1252    
system code page: 874

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] unmarked_1.1.1  lattice_0.20-44

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7       codetools_0.2-18 MASS_7.3-54      grid_4.1.1       plyr_1.8.6       nlme_3.1-152     minqa_1.2.4      nloptr_1.2.2.2   raster_3.4-13    sp_1.4-5         Matrix_1.3-4     boot_1.3-28      splines_4.1.1   
[14] lme4_1.1-27.1    parallel_4.1.1   compiler_4.1.1  
Thank you,
Dusit
............................................................................
Dusit Ngoprasert
Conservation Ecology Program, King Mongkut’s University of Technology Thonburi (Bangkhuntien campus) 

Ken Kellner

unread,
Aug 13, 2021, 9:15:29 PM8/13/21
to unmarked
Hi Dusit,

Sorry about that. Do you have some example code that you know crashes sometimes that I could run locally?

In the meantime you can set argument engine="R", it will be a little slower but shouldn't ever crash that way.

Ken

Dusit Ngoprasert

unread,
Aug 13, 2021, 9:35:08 PM8/13/21
to unmarked
Dear Ken,
Thanks for your fast response.  Here below is the code that mostly crashes.

Exp <- gdistsamp(~1, ~1, ~1, gibbonumf, keyfun="exp", output="density", 
mixture="P", K=100, unitsOut="kmsq")

hn <- gdistsamp(~1, ~1, ~1, gibbonumf, keyfun="halfnorm", output="density",
  mixture="P", K=100, unitsOut="kmsq")

haz <- gdistsamp(~1, ~1, ~1, gibbonumf, keyfun="hazard", output="density", method = "Nelder-Mead",
mixture="P", K=100, unitsOut="kmsq")
st <- coef(haz)
haz2 <- gdistsamp(~1, ~1, ~1, gibbonumf, keyfun="hazard", output="density",  method = "Nelder-Mead",
mixture="P", K=300, unitsOut="kmsq", starts=st, control=list(trace=TRUE, REPORT=1))# numerical failure here

global <- gdistsamp(~elevation + ele_SD + gscs + pf + dvg + dlc + offset(log(days)), ~1, ~Block + Team, gibbonumf, 
keyfun="halfnorm", output="density", mixture="P", K=100, unitsOut="kmsq")
The global model run fine most of the times, but only a few times crash.

Regard,
Dusit

Dusit Ngoprasert

unread,
Aug 13, 2021, 10:07:45 PM8/13/21
to unmarked
Dear Ken,
As far as I can tell,  added engine="R", seems to prevent R crashes. I ran >23 models already. Why was that?
Thank you so much,
Dusit

Ken Kellner

unread,
Aug 14, 2021, 5:59:48 PM8/14/21
to unmarked
Can you send me your data (gibbonumf) as an .Rds or an .Rdata file (off-list) so I can run the code on my computer to try to find the problem?

I'm certain the crashing is happening in the C++ likelihood function code for gdistsamp. If you use engine="R" you don't run the C++ code, so there's no chance of crashing.

Ken

Reply all
Reply to author
Forward
0 new messages