NEWS
secr 5.1.1
New features or changed behaviour of old functions
- split.mask() acquires argument 'na.rm' and drops NA cells by default
Bugs fixed
Other
- tweaked OVpossum Rd example to avoid 'sp'
secr 5.1.0 (2024-11-04)
New features or changed behaviour of old functions
- MCgof() acquires 'debug' argument
- makeNewData.secr acquires 'bytrap' argument
- fxTotal extended to mixture models
- split.capthist() acquires 'bysession' argument
- simulate.secr() acquires 'poponly' argument
- sim.popn() infers 'core' from bbox of 'poly' argument if missing
Bugs fixed
- MCgof() stalled in model with trap covariates (detectpar problem)
- MCgof() error when zero unobserved AC
- direct calling of fxi.secr() disabled prematurely in 5.0.0
- simulate.secr() when D~1 generated AC in rectangular window instead of respecting mask
- esaPlot() in 5.0.0 failed with multi-session model
Other
- predict.secr() speed up when se.fit = FALSE
- detectpar() speedup (calls predict.secr with se.fit = FALSE)
- suggest.buffer() rounds to 3 sig.fig. and more robust
- expose 'externalpdot' details option
- plot.capthist() warning when petal plot rad argument large
- plot.secrtest() allows user-specified xlab
- MCgof() dots argument passed to testfn
secr 5.0.0 (2024-10-02)
New features or changed behaviour of old functions
- MCgof() goodness-of-fit after Choo et al. (2024) DOI: 10.1111/2041-210X.14386
- blackbearCH new dataset of J. Laufenberg, F. van Manen and J. Clark
- default criterion for AIC and modelAverage changed from AICc to AIC
- score.table reports dAIC rather than dAICc
- detectpar() optionally returns values for each detector
- pdot() accepts detector- and occasion-specific detection parameters
- usage() method for traps objects acquires argument 'noccasions' to create from scratch
Other
- internal addzeroCH() ignores covariate dataframe with zero columns
- improved robustness of fxi.secr by setting occasional NaN to zero
- imports from mvtnorm
- list.secr.fit() now works with details$LLonly = TRUE
- trappingtransect, trappingtransectX revert to built-in integration
- some minor functions restricted to point detectors (i.e. not area search)
CVa, CVpdot, reparameterize.esa, make.mask(type=pdot)
- derivedSystematic() defunct
- purged unused code
- derived() uses nlme::fdHess for gradients
- esa(), fxTotal(), MCgof() become S3 generic
- unused HPX detectfn removed
- fxi.secr() becomes S3 generic fxi() with method for secr objects
- other fxi.xxx functions renamed fxiXxx (old ones deprecated for now)
- pdot.contour and buffer.contour renamed pdotContour and bufferContour (old names deprecated for now)
- esa.plot() renamed to esaPlot() to avoid clash with generic
secr 4.6.10 (2024-08-22)
New features or changed behaviour of old functions
- sim.detect() optionally computes expected counts or retains null histories
Other
- list.secr.fit() recovers when some fits fail
- added dots argument to secr.test(), passed to statfn
- added dots argument to sim.secr(), passed to extractfn
- secr.test() fit = TRUE trim keeps mask
- internal changes to sim.detect() may change output order
- include pmix in output of detectpar() from mixture models
- as.array method for capthist objects
Bugs fixed
- code for deviance of binomial model failed (broken for years)
secr 4.6.9 (2024-06-29)
New features or changed behaviour of old functions
Other
- added package anchor in Rd files when linking to sf and RcppParallel functions, to satisfy CRAN
secr 4.6.8
New features or changed behaviour of old functions
Bugs fixed
- bug in likelihood for 'relativeD'
secr 4.6.7 (2024-06-05)
New features or changed behaviour of old functions
- sim.popn() the covariates argument may specify a function to
construct covariates
- sim.capthist() detectpar = list(individual = TRUE) uses individual
parameter values from popn covariates
- rlnormCV() is wrapper for rlnorm with inputs on the natural scale
- make.spcosa() new function for spatial coverage designs (Walvoort et al. 2010)
- append.capthist() new function to combine independent capthist
Bugs fixed
- rotate.traps added spurious polyID
- sim.capthist() with single,multi detectors did not respect 'renumber = FALSE'
- sim.popn() rLGCP saveLambda failed in one case
Other
- onLoad defaults to options()matprod = "internal"
secr 4.6.6 (2024-02-29)
New features or changed behaviour of old functions
- list.secr.fit() replaces par.secr.fit()
- unRMarkInput() accepts '.' for missing
Deprecated
- functions par.secr.fit(), par.derived() and par.region.N() for parallel
processing of multiple models will be removed later in 2024
Bugs fixed
- detection models failed with polygon and transect detectors
- sim.popn() row numbering glitch (open population)
secr 4.6.5 (2024-02-17)
New features or changed behaviour of old functions
- sim.popn() saves 'parents' and 'Lambda' attributes from rThomas
- relative density option 'relativeD'
- AICcompatible() checks for 'relativeD'
- secrlist acquires argument 'names'
- binCovariate() new function
Bugs fixed
- score.test() failed with condition length>1
- makeStart() failed with details$fixedbeta
- obscure reparameterizations param = 2,6 failed
- fxi.secr() did not allow polygon data
- static userdist not working
Other
- secr.fit() warns if factor levels inconsistent for covariates of
multi-session mask
- undocumented feature: details = list(externalpdot = 'pd') where 'pd'
is the name of a mask covariate to substitute for internally computed
p.(x|theta)
- traps<- replacement function works for multi-session capthist
secr 4.6.4 (2023-10-17)
New features or changed behaviour of old functions
Other
- tweak kfn.Rd to reduce CRAN check time
secr 4.6.3
New features or changed behaviour of old functions
- sim.popn() simulates log-gaussian Cox process (model2D = "rLGCP") using
packages spatstat and RandomFields
- sim.popn() simulates Thomas process (model2D = "rThomas") using spatstat
- as.popn() converts spatstat ppp objects
- randomDensity() new wrapper for randomHabitat() for use with sim.popn()
- reduce.capthist() now retains popn attribute
- trend reparameterization of density (secr.fit details 'Dlambda')
- kfn() new function for overlap index
Bugs fixed
- make.capthist() could lose individual covariates of animals later
lost on capture (negative occasion number)
Other
- suggests spatstat, spatstat.geom, spatstat.random (LGCP),
and igraph (randomHabitat)
- randomHabitat() loads igraph automatically if needed
- imports raster::flip
- Fletcher.chat() returns NA instead of error when input NA
- sim.popn() argument 'number.from' applied to multi-session data
- sim.popn() details$clone=="constant" applies scale (model2D="cluster")"
- secr.fit() distribution="binomial" warns when initial value of N less than number detected
- model.average() now defunct (replaced by modelAverage)
- LLsurface message edit
- secr.fit() attempt to use learned response with mark-resight data now blocked
- fixed \itemize in Rd files
secr 4.6.1 (2023-07-10)
New features or changed behaviour of old functions
- collate() redefined as generic, behaviour mostly unchanged
Bugs fixed
- collate() failed if betanames specified for multi-session model (multi-row newdata)
- LR.test() failed when class of fitted models had length>1
- secr.fit() crashed R for polygon data with hcov specified
Other
- read.traps() allows comma-separated usage values when binary.usage = FALSE
- sim.popn() handles IHP N=0 without crashing
- shift.mask() updates boundingbox
- chat.nk may use clusters in parallel for simulation
- internal boundarytoSF extended to sf geometry objects
- Fletcher.chat() protected against near-zero expected values
secr 4.6.0 (2023-05-23)
New features or changed behaviour of old functions
- exports Fletcher.chat(), nk()
- Enk() simulation option
- chat.nk() optionally simulates c-hat
- AIC and modelAverage methods acquire variance inflation argument 'chat'
for optional computation of quasi-AIC etc.
- adjustVarD() acquires optional argument 'chat'
Bugs fixed
- make.capthist() lost covariates when creating non-spatial capthist
Other
- trim() method for secrlist objects
- chat.nk() 'stats' components renamed; sbar added
- Enk() (and hence chat.nk) works for multi-catch traps
- sim.popn() model2D 'cluster' has clone-in-place option
- fast computation of spacing (PR of Philipp Jund, now ctb)
- faster C++ for transect fitting (PR of Philipp Jund)
secr 4.5.9
New features or changed behaviour of old functions
Bugs fixed
- secr.fit() fitted wrong model for Poisson count detectors when
fastproximity = FALSE, giving bad estimates esp. of detectfn parameters
- make.capthist() failed with points snapped to transects
- sim.popn() model2D 'cluster' mistakenly allowed Ndist = 'fixed'
- region.N() could fail with user-provided distance function or when
detectors varied among sessions
Other
- MS.capthist() help clarified
- ip.secr() and pfn() defunct
- secr.fit() recognises time-covariate model when timecov is a
multi-session list, avoiding default to fastproximity
secr 4.5.8 (2022-11-29)
New features or changed behaviour of old functions
- plot method for traps acquires argument 'frame'
- trapsPerAnimal() new capthist summary function
- Enk() new function expected individuals per detector
- chat.nk() and adjustVarD() new functions for spatial overdispersion
- summary method for capthist optionally includes frequency
distribution of traps per animal (count of tpa >= 2 if terse)
- sim.popn() with model2D = 'IHP' the density argument may be a function
Bugs fixed
- hcov failed with one level missing in some sessions
(following change in 4.5.1)
- sim.secr() crashed R when used with learned-response models (b, B etc.)
- secr.fit() failed occasionally with distribution = 'binomial'
- randomHabitat(..., plt = TRUE) assumed raster::plot loaded
- spotHeight() not working
Other
- make.lacework limit of 5000 detectors
- plot.traps() box always black (bty='o')
secr 4.5.7 (2022-10-08)
New features or changed behaviour of old functions
- nontarget() replacement function
- addCovariates() may be applied to popn object
Bugs fixed
- Tu<- replacement failed with multi-session capthist
- region.N erroneous values with new mask
secr 4.5.6 (2022-08-15)
New features or changed behaviour of old functions
- sim.popn() model2D = 'IHP' allows session-specific density
- clone() new option type = 'truncatedpoisson'
Bugs fixed
- plot.mask legend sometimes failed ("object 'cex' not found")
Other
- for CRAN, update latex specials in help pages
- nontarget documentation
secr 4.5.5 (2022-05-31)
New features or changed behaviour of old functions
- verify.capthist() checks nontarget matrix if present
- plot.capthist() new type 'nontarget'
- gridCells() constructs cells around points (e.g., traps)
Bugs fixed
- make.systematic() failed because quantities from sf are class 'units'
- addCovariates could fail when source polygons overlap
- predictDsurface failed with user-provided density function and single-session
- trap.builder() failed with edgemethod 'centreinside'
Other
- on GitHub at https://github.com/MurrayEfford/secr
secr 4.5.4 (2022-04-22)
New features or changed behaviour of old functions
- reinstate GRTS option in trap.builder()
- makeStart() encapsulates code for initial values
- ip.secr() is deprecated (see new package at https://github.com/MurrayEfford/ipsecr)
Bugs fixed
- distancetotrap() and hence esa.plot() failed with polygon inputs
- addSightings() did not pass extra arguments to read.table() for multisession input
- secr.fit() failed with sighting data when usage 0 for any detector (since 4.4.6 Oct 2021)
- likelihood-only evaluation failed with mark-resight models if chat not initialised
- read.traps() failed for polygon or transect data with non-contiguous data points
Other
- suggests spsurvey >= 5.3.0
- bad densities in likelihood give warning, not error
- autoini tweaked to treat 'capped' detector type as 'proximity'
- collate tweaked to allow mixture of secr, ipsecr models
secr 4.5.3 (2022-02-13)
New features or changed behaviour of old functions
- more spatial data types for 'poly' and 'region' function arguments
- rast generic method for mask, Dsurface objects creates terra SpatRaster object
- read.traps() accepts ESRI shapefile of point, polygon or line features (experimental)
- fxi.contour() argument 'SPDF' replaced by 'output', with options 'sf', 'SPDF'
Bugs fixed
- moves() failed with empty capthist input when names = FALSE
- details$ignoreusage=TRUE not respected by esa(), derived(), region.N()
- secr.fit() details$ignoreusage=TRUE failed when using 'fastproximity'
Other
- classes (sf, sfc, sfg) and methods (st_) from package 'sf' largely replace 'sp' (now in Suggests)
- trap.builder() SRS sf::st_sample replaces sp::spsample
- imports functions from 'sf' and 'terra'
- no longer suggests maptools, rgeos, rgdal
- internal function boundarytoSF documented
- new vignette secr-spatialdata.pdf
- revised OVforest shapefile in extdata
- one trap.builder() example moved to \dontrun to save time
secr 4.5.1 (2022-01-18)
New features or changed behaviour of old functions
Bugs fixed
- secr.fit() hybrid mixture model (hcov with known-class data)
did not use class-dependent detection model, resulting in
erroneous estimate of pmix (secr >= 4.0)
- memory error getxy() C++ (transect simulation; no effect on users)
secr 4.5.0 (2022-01-06)
New features or changed behaviour of old functions
- make.capthist() 'snapXY' also works for points along transects
- modelAverage() new generic supercedes model.average()
- snip() acquires 'tol' argument, now used by discretize()
- new link 'i1000' (identity x 1000) for modelling very low density
- sim.popn() 'UNI' movement model (radius move.a)
- sim.popn() models differential settlement of dispersers (model2D = 'IHP'
and core has covariate 'settle' 0-1)
- f() term in formula for non-linear density models (experimental)
Bugs fixed
- verify() error 'Duplicated or missing row names (animal ID)'
triggered when no live releases
- sim.popn() multi-session movement allowed some animals outside the
boundary on the first step (edgemethod 'truncate')
- secr.fit() failed with data from multiple transects
- snip() and discretize() failed when transectID contained '.'
- nearesttrap, discretize etc. failed if no detections in some sessions
- alive() and reduce.capthist() erroneous when only one animal
- secr.fit() fastproximity failed when no detections in some sessions
- secr.fit() signal detector problem with Boost distribution function
(since 4.4.7 Oct 2021)
- secr.fit() mark resight simulations failed (since 4.4.5 July 2021)
Other
- suggests 'terra' package (potentially supercedes 'raster')
- tests added for transect and signal data
- model.average() deprecated
- update C++ code for BH 1.78
secr 4.4.8 (2021-11-09)
New features or changed behaviour of old functions
Bugs fixed
- 'count' detectors failed with Poisson model (reported by Ian Durbach)
owing to problem with switch to Boost statistical distributions in C++
secr 4.4.7 (2021-10-18)
Other
- options requiring package 'spsurvey' suspended - trap.builder(method =
'GRTS') and derivednj(method = 'local') - because of changes in spsurvey 5.0.0
- 'spsurvey' removed from Suggests
secr 4.4.6
New features or changed behaviour of old functions
- sim.popn() exponential (RDE), gamma (RDG) and lognormal (RDL) movement distance
- sim.popn() zero-inflated movement models BVNzi, BVEzi, RDEzi, INDzi
- addCovariates() accepts RasterLayer spatialdata
- make.capthist() and read.capthist() tweaked to allow nonspatial input
Bugs fixed
- snip() failed in recent versions
- secr.fit() and bias.D() spurious warning of variable usage
Other
- Boost math library used for statistical distributions in C++ code
- number of threads explicit in calls to RcppParallel parallelFor
- sim.popn() with movement: edgemethod 'truncate' now synonym 'normalize'
- deprecated and defunct functions handled formally (see e.g., help("secr-defunct"))
secr 4.4.5 (2021-07-12)
New features or changed behaviour of old functions
- 'sigmak' parameterization allows session covariates
- experimental parameter 'd' for parameterization sigma = sigmak/sqrt(D+d) + c
- sim.popn() all movement simulations use polar coords + rgamma, rweibull etc.
- extractMoves() new function for checking movement simulations
Bugs fixed
- as.data.frame.capthist() in 4.4.4 mis-assigned traps to captures
- trivial: bad trace when fixedbeta specified
Other
- 'BVN','BVE','BVT' aliases for movemodels 'normal','exponential','t2D'
secr 4.4.4 (2021-06-01)
New features or changed behaviour of old functions
- animalID(), trap() etc. acquire argument 'sortorder'
Bugs fixed
- erroneous plot(), verify() and RPSV() results for multi-polygon data
- ASAN error: container overflow prwifastproximity.cpp
- rectangularMask() misaligned covariates by one cell, with
consequences for raster method for 'mask' class
Other
- multithreaded Examples now in dontrun{} to avoid TBB library in checks
- interactive dontrun{} Examples trapped to allow R CMD check --run-dontrun
- new text files in extdata for MRCH addSightings example
- flip() arguments changed F to FALSE
- new test: multi-detector polygon likelihood
- new test: join() nonspatial data
secr 4.4.2
Other
- rename generic make.newdata() to makeNewData()
- Imports RcppParallel version >= 5.1.1 to dodge problems in earlier releases
- run tests with Sys.setenv(RCPP_PARALLEL_BACKEND = "tinythread") to avoid CRAN errors
secr 4.4.1 (2021-04-30)
Other
- Add final '/' to url in DESCRIPTION and fix typo in secr-package.Rd
secr 4.4.0
New features or changed behaviour of old functions
- sim.popn() movement model may be user-provided function
- sim.popn() recrmodel may be 'specified' (add number in details$Nrecruits)
- sim.popn() optional age covariate for multisession populations
- HPX new detectfn (binary detection in polygon)
- plot.traps minor change in colours used with polygon detectors
- split.capthist() accepts multi-session input
- reduce.traps() 'newxy' selects 'mean' or 'first' for coordinates of
new detector from group defined by 'newtraps'
Bugs fixed
- make.capthist() rejected some valid records as duplicates (R. Glennie)
- length > 1 in coercion to logical (internal function sessionLL x2)
- sim.popn() with movement: 'normalize' edgemethod did not normalize
- secr.make.newdata() (and predict.secr()) sometimes ignored all.levels = FALSE
- make.grid() spacing attribute missing in case of single detector
- reduce.capthist() failed with polygon input and nonspatial output
- no warning when attempt to combine capped and other detector types
- subset.capthist() by occasion could return wrong session labels
Other
- Suggests testthat, adds some unit tests in 'tests' folder
- sim.popn() with movement: 'clip' edgemethod works with constantN
- generic make.newdata() replaces secr.make.newdata() (seldom used directly; see 4.4.2)
- shareFactorLevels() when not multisession now converts ch _covariates_ to factor
secr 4.3.3 (2020-12-11)
New features or changed behaviour of old functions
- subset.capthist() all-negative subset argument indicates exclusion
- shareFactorLevels() default for stringsAsFactors now TRUE
- sim.popn() with movement: new 'normalize' option for edgemethod
Bugs fixed
- multisession hcov failed if only one level present in one or more sessions
- plot.capthist() failed when no detections in session
- plot.mask(..., dots = FALSE) crashed when no points in mask
- secr.fit failed with hcov if only one class present in a session
- region.N() with multisession model failed using 'hcov' and otherwise not reliable
- alive() incorrect order of output
- sim.detect() renumbered multi-session capthist even when renumber = FALSE
Other
- terminal '/' on https://www.otago.ac.nz/density/ in Rd required by CRAN
- verify() suggests shareFactorLevels() when needed
- more robust handling of sessions with zero detections
- join() gives advice when table limit exceeded (2^31 elements)
- output from region.N() with multisession model uses session names
- rectangularMask() rewritten to allow disjunct mask blocks
- character sessioncov used in D~ models automatically converted to factor
- sim.popn() undocumented movement options 'radialexp' and 'radialnorm'
- reduce.capthist() more robust when no detections
- sim.capthist() now accepts character detectfn when nsessions>1
secr 4.3.1 (2020-09-01)
New features or changed behaviour of old functions
- subset.traps() allows subset argument to be function, as for
subset.capthist()
- de novo calculation of spacing for traps, mask uses median instead of mean
- read.traps() enables usage and covariate input from data and xls
- summary.traps() new argument 'covariates' for covariate summaries (default FALSE)
- verify() invisible output includes detail on captures
- ORL() new function for observed range length
- centroids() new function for detection centroids
Bugs fixed
- verify() bug on covariates call to stringsAsFactors fn
- moves() lost animal order when animal IDs numeric and names = TRUE
- secr.make.newdata() (and hence predict() etc.) included superfluous
combinations of session covariates
- read.mask() assigned wrong spacing for some unusual configurations
- occasion() could result in wrong sequence, with consequences for various plots
and summaries
Other
- summary.secr() always reports detector percent usage
- plotMaskEdge() increased robustness
- make.capthist() coerces third column of captures dataframe to integer
- updateCH() recoded to avoid reduce.capthist() that now assumes 3-D
- secr.fit() calls check3D in case data pre-dates secr 3.0
- fxi.secr() and related functions work with models fitted using fastproximity = TRUE
secr 4.3.0 (2020-07-14)
New features or changed behaviour of old functions
- RSE() returns matrix with one row for each row of newdata
- shareFactorLevels() gains argument stringsAsFactors to convert character to factor
Bugs fixed
- learned response models (b, B etc.) fitted incorrectly to data from multi-catch traps
(detector 'multi') and exclusive polygon-type detectors (detector 'polygonX', 'transectX')
- esa() ignored individual covariates in models with CL = TRUE, with consequences
for derived() and region.N()
Other
- internal changes for compatibility with R 4.0
- make.capthist() forces character covariates to factor for backward compatibility
- verify() converts character covariates to factor before checking levels consistent
across sessions
- derived() and region.N() now work for models fitted in secr versions before 4.0
secr 4.2.2 (2020-04-09)
New features or changed behaviour of old functions
Bugs fixed
- individual covariate (CL) models for proximity data failed unless fastproximity = FALSE
- Bk models for proximity data gave error unless fastproximity = FALSE
- join() sometimes failed (circumstances unclear)
Other
- adjusted protection for calls to suggested package rgdal
- suggest.buffer() trivial change to Examples
secr 4.2.0 (2020-02-22)
New features or changed behaviour of old functions
- new mechanism for setting number of threads (default 2)
- setNumThreads() new function
- make.systematic() 'rotate', 'centrexy' and 'keep.design' arguments
- make.lacework() new function
- make.grid() and make.circle() acquire argument 'leadingzero') (default TRUE)
Bugs fixed
- make.systematic() unintended result when spacing of rows and columns differs
Other
- pdot() uses multithreaded C++ function pdotpointcpp2
- pdot() acquires argument ncores
- derivedSystematic() acquires argument ncores
- esa() internal limit on ncores (2) removed
- trim.secr() drops designD, designNE by default (see 4.0.0)
- rotate.traps() checks for zero rows
- suggest.buffer() minor internal changes
- distancetotrap() uses rgeos::gDistance for polygon detectors if available
- fxi.secr() and related functions enabled for polygon detector types
secr 4.1.0 (2019-12-17)
New features or changed behaviour of old functions
- AICcompatible() new S3 method to check models for AIC compatibility
- AIC() warns if secr models not compatible
- LR.test() stops if secr models not compatible
- secr.fit() faster fitting of polygon and transect data
- secr.fit() option details = list(convexpolygon = FALSE) allows non-convex polygons.
- autoini() uses simpler and more robust code; secr.fit() start values differ slightly
from earlier versions; new argument 'adjustsigma'.
Bugs fixed
- reduce.capthist() subtracted dead animals when outputdetector = "count"
- verify.capthist() spurious warning for transect data with character animalID
- derived() bad for polygon and transect data in secr 4.0 because esa() corrupted
- secr.fit() in secr 4.0 bad likelihood and estimates for some covariate models
(bad indexing of parameter array PIA)
- secr.fit() failed with multi-session mark-resight data (fixed pID, non-null Tm)
- suggest.buffer() failed with input from multi-session fitted model
- make.systematic() unintended result when spacing of rows and columns differ
Other
- RcppNumerical used for numerical integration with polygon and transect detectors
- requires R >= 3.5.0 for obscure reasons (serialization of data objects)
- suppressed new warnings from regularize.values in approx()
- internal function secr.design.MS() argument bygroup replaced with CL
- LLsurface() returns value matrix when plot = FALSE (otherwise invisibly as before)
(NA where likelihood could not be evaluated)
- mark-resight sighting only, partial identification re-enabled
secr 4.0.2 (2019-11-11)
New features or changed behaviour of old functions
- secr.fit() LLonly = TRUE stores number of parameters and timing information
- secr.fit() LLonly = TRUE uses default or autoini start values if none provided
- summary.secr() versiontime includes elapsed time
- summary.capthist() includes summary of individual covariates
Other
secr 4.0.0
New features or changed behaviour of old functions
- 'ncores' argument defaults to NULL in most functions (meaning one less than number
of available cores for multi-threading)
- fx functions 'normal' argument dropped
- 'ncores' argument dropped from mask.check(), pmixProfileLL() and simulate.secr()
- autoini(), region.N() and suggest.buffer() acquire 'ncores' argument
- fast secr.fit() for binary and count proximity detectors (default details$fastproximity = TRUE)
- make.systematic() new argument 'order' to control cluster sequence
- RSE() extract precision of estimated parameter from fitted model
- par.secr.fit() no longer automatically sets ncores=1 in the separate calls to 'secr.fit'
- secr.fit() details option autoini = 'all' for start values from multi-session data
Bugs fixed
- sim.secr() with 'multi' detectors slightly understated detection rate owing to mis
-assignment of detection locations
- make.systematic() and trap.builder() ignored region polygon when cluster not
specified (edgemethod set internally to 'allowoverlap'
Other
- converted C code to C++ with multithreading in RcppParallel as appropriate
- some features of earlier versions have yet to be implemented in 4.0
- secr object from secr.fit() includes design matrices for D and noneuc
- functions read.SPACECAP() and write.SPACECAP() removed
secr 3.2.2
New features or changed behaviour of old functions
- summary method for popn objects
- write.mask() function
Bugs fixed
- sim.popn() exponential
- plotMaskEdge() sometimes shows internal lines (non-integer spacing)
Other
- write.capthist help wrote files to disk; now in \dontrun{}
secr 3.2.1 (2019-06-03)
New features or changed behaviour of old functions
- sim.popn() allows exponential and t2D movement between sessions
- sim.popn() new details arguments movemodel, move.a; sigma.m deprecated
Bugs fixed
- make.capthist() with transect data gave error when points did not lie on transect
- moves() failed with nonspatial capthist (also summary.capthist(moves = T) etc.)
- plot.popn() ignored frame argument when collapse = TRUE
secr 3.2.0 (2019-01-25)
New features or changed behaviour of old functions
- derivednj() extended for weighted variance (R2, R3), with subtle argument changes
- derivednj() and dependent functions return 2-line dataframe (rows 'esa', 'D') as for derived()
- derivedSession() extended for weighted variance
- derivedCluster() extended for weighted variance
- derived() for secr and secrlist objects acquires argument 'bycluster'
- split method for mask objects (split.mask)
- trap.builder() new edgemethod and exclmethod options "anyinside", "centreinside" etc.
- derived.secr() improved handling of sessions with zero detections
- derivedSystematic() implements Fewster 2011 variance for systematic cluster designs
- make.systematic() acquires argument "chequerboard", saves originbox,
argument 'originoffset' replaces 'bufferorigin'
- spacing.traps() returns numeric(0) instead of NULL for 1-trap arrays
- write.traps() removed single quotes around objectname
- secr.fit() allows mixture models when detector 1 unused on occasion 1
- make.mask() more explicit warning when nrow = 0
- plot.traps() gridlines = TRUE respected for add = TRUE (default gridlines = !add)
- pdot.contour() and related functions acquire argument 'poly.habitat'
- summary method for capthist objects (summary.capthist) optionally reports movements
Bugs fixed
- make.systematic() grid didn't span extremes of some region polygons
- sighting-only did not allow unidentified marked sightings
- reduce.traps() failed for reduced number of occasions when both usage and markocc specified
secr 3.1.8 (2018-11-19)
New features or changed behaviour of old functions
- make.systematic() saves origin and centres as attributes
- make.systematic() new argument bufferorigin controls random origin
- summary method for secr objects, with print and AIC methods for summary (may change)
- clone.popn() rownames consistent with clone.capthist() (1.1, 1.2...)
Bugs fixed
- make.mask() not using keep.poly and check.poly arguments for multi-session masks
- detector usage not correctly included in some models with detector type "multi"
- clone methods not robust - freq now rounded to avoid quirky behaviour of rep()
Other
- some models (e.g., g0~bk with detector type "multi") fit more quickly than before
secr 3.1.7 (2018-10-04)
New features or changed behaviour of old functions
- esa.plot() computes CVpdot for varying buffer width
- esa.plot 'as.density' argument replaced with 'type' and new argument 'conditional'
- sim.popn() edgemethod new options 'stop' and 'reflect'
Bugs fixed
- OVpossumCH dataset Ageclass covariate placed 1-year-olds in >=2 year class
- join() detector attribute not expanded correctly for some inputs
- reduce.capthist() bug introduced in 3.1.6
- subset.popn() failed for multi-session populations
- region.N() gave misleading R.N for models with individual variation in detection,
including h2
- trap.builder() failed when projection specified for 'region'
- addTelemetry() failed with mark-resight data
- write.capthist() lost non-numeric detector names (since 2017-11-30)
Other
- secr-manual.pdf is no longer distributed with package - see
https://www.otago.ac.nz/density/pdf/secr-manual.pdf or https://CRAN.R-project.org/package=secr/secr.pdf.
secr 3.1.6 (2018-05-14)
New features or changed behaviour of old functions
- sim.popn() details (turnover) argument "wrap" deprecated; use "edgemethod"
- plot method for capthist object copes with missing rownames
- CVpdot() new function for CV of p. across mask
- improved handling of attributes (intervals and sessionlabels) in subset and reduce
methods for capthist objects
- join() allows site matching by name, which is faster
- timevaryingcov() extended to capthist objects for openCR - see ?join
Bugs fixed
- internal fn predictD returned matrix instead of vector, causing problems in region.N
- sim.capthist() failed for signal detectors (df0 error reported by Ben S)
secr 3.1.5 (2018-02-25)
New features or changed behaviour of old functions
- rotate method for capthist objects
- secrlist() returns input secrlist object unchanged
- plotMaskEdge() accepts multi-session input
- secr.make.newdata() rewritten; acquires logical argument 'all.levels'
- predict method for secr objects passes dots argument to secr.make.newdata()
- join() intervals optionally passed as attribute 'intervals'
- coef method for secrlist objects
- unRMarkInput() assumes all freq = 1 if freq field missing
- new detectfn 19 (HVP hazard variable power)
- RMarkInput ignores 'covariates' argument when no covariates
- reduce and subset methods for capthist objects allow nonspatial input and output
when verify = FALSE
- reduce and subset methods for capthist objects honour 'intervals' attribute
- summary method for nonspatial capthist objects drops detectors from table of counts
- plot method for popn objects acquires new arguments for overlaying multiple sessions
- sim.popn() argument sigma.m < 0 causes random relocation
- sim.popn() open population recruitment model "multinomial"
- LLsurface now a generic function with method for 'secr' objects
- new capthist attribute 'sessionlabels' useful for joined capthist
Bugs fixed
- secr.fit gave misleading estimates with binomial count data when size derived from usage
(reported by Mathias Tobler)
- predict.secr misreported pmix for other than simple h2 models (pmix = 0.5 for some levels)
- detectfnplot() in error when detectfn = 'HAN'
- sim.capthist() and sim.resight() failed in 3.1.3 when detector type varied by occasion
- make.poly() failed with some polygon list inputs
Other
- optional 'interval' attribute of capthist objects renamed 'intervals' (see ?join)
- export internal function insertdim()
- minor tweaks for compatibility with open population code
- NEWS for versions before 3.0.0 archived
- some old documentation removed to online vignette secr-models.pdf
secr 3.1.3 (2017-12-03)
New features or changed behaviour of old functions
- secr.design.MS() acquires argument 'contrasts' (used internally)
Bugs fixed
- sim.capthist() ignored recapfactor provided in detectpar
Other
- region.N now a generic method with functions for secr and secrlist objects
- corrected some obsolete documentation references to maptools package
secr 3.1.1
New features or changed behaviour of old functions
- new detector type 'capped' in make.grid(), sim.capthist(), reduce(), verify(), secr.fit() etc.
- as.data.frame methods for capthist and traps objects
- secrlist() and MS.capthist() generate names from input objects
- circular.r() and circular.p() acquire argument 'upper' for explicit upper limit of integration
- LR.test generalised to any fitted models with a logLik method
- plot method for secr objects: confidence limits now computed on log scale
for hazard detectfn HHN, HEX etc. to match predict.secr
- rbind method for traps adds suffix to names only when needed to avoid any duplication
- verify method for capthist objects checks for all-zero histories and missing rownames
- summary method for capthist objects: 'terse' option activated for single-session objects
- subset method for capthist objects: subset may be defined as function (useful for covariate-based selection)
- join() acquires arguments interval, to set between-session intervals directly, and sessions, for session names
- secr.fit() details argument 'contrasts' for specialised coding of factor predictors (example in secr-multisession.pdf)
- secr.fit() details argument 'newdetector' to override detector type
- 'newdetector' reported by print.secr
Bugs fixed
- predict method for secr objects failed to report SE for parameters with some fixed coefficients (fixedbeta)
- verify.capthist failed to report detections at unused detectors
Other
- requires package stringr for some functions
- class attribute of multisession objects changed to place "list" last --
c("list", "capthist") becomes c("capthist", "list")
- LLsurface.secr automatically substitutes lambda0 for g0 given detectfn 14:18
- experimental "nontarget" capthist attribute
- make.mask() explicit error when capthist passed
- derived is now a generic method with functions for secr and secrlist objects
- derived.nj() renamed derivednj(), derived.mash() renamed derivedMash() etc.
- && changed to & throughout - should have no effect except fixes verify bug, but be wary
secr 3.1.0 (2017-09-20)
New features or changed behaviour of old functions
- par.secr.fit() acquires arguments save.intermediate and LB to allow
load balancing (thanks to Mathias Tobler)
- par.secr.fit() default value of 'seed' changed from 123 to NULL
- rbind.popn() now an S3 method; no longer accepts list input
- rbind.capthist() now an S3 method
- randomHabitat() acquires argument 'seed', saved as an attribute
(thanks to Erin Peterson)
- detectfnplot() acquires argument 'hazard' for plotting hazard
Other
- adjustment to 'ts' predictor for secr.fit mark-resight models
- documentation of random number seeds in ?secrRNG
- start vector returned by secr.fit now named
Bugs fixed
- faulty start vector when model included both h2 and noneuc
secr 3.0.2
New features or changed behaviour of old functions
- make.grid() and make.circle() acquire argument 'markocc'
- read.traps() accepts Excel xls or xlsx input (requires readxl)
Bugs fixed
- plot.secr misleading axis label 'Detection lambda'
- sim.resight() could fail with markingmask and predefined popn
Other
- imports file_ext from tools package
- attributes of output from sim.popn now include Nbuffer and D
- speed increase for "count" detectors
- miinor adjustments to sim.popn for compatibility R 3.4.0
secr 3.0.1 (2017-05-03)
New features or changed behaviour of old functions
- 'unresolved' sightings now stored in Tn attribute of capthist
- sim.resight() acquires argument 'unresolved'
- plot.secrlist() accepts colour vector
- new function as.mask() to coerce traps objects for plotting
- moves() acquires argument 'names' to control sort order (new default)
Bugs fixed
- sightingPlot() legend ignored fill argument
Documentation
- addTelemetry omitted 'single' and 'multi' from permitted detectionCH types
Other
- discretize() updated for 3.0
- native routine registration completed
secr 3.0.0
New features or changed behaviour of old functions
- 3-D data structure used for trapping data
- updateCH() for easy conversion of old data
- multiple detector types may be used in one session
(point detectors only: single, multi, proximity or count)
- marking and sighting occasions may be interspersed
- rbind.traps acquires argument 'checkdetector'
- user-provided distance matrix may be session-specific
- esa 'noccasions' may be less than ncol(usage)
- function occasionKey() to embellish petal plots
- explicit handling of 'uncertain' sightings Tn
- plotMCP() now works with data from point detectors
- details$debug in secr.fit() now integer with multiple levels
- sightingPlot() new function
- plot.capthist() new option "centres"
- secr.fit() argument 'details' may be given as character value
- telemetrytype attribute of traps objects replaces details$telemetrytype
- new addTelemetry() function and revised handling of telemetry data
- addTelemetry() allows multi-session data
- secr.fit() etc. auto predictor 'tt' nontelemetry vs telemetry occasions
- addCovariates() acquires argument 'replace'
- c new method for combining secrlist objects
- make.capthist() discards repeat detections at exclusive detectors, with a warning
- models for polygon or transect detectors requre hazard detection functions
- esa.plot() accepts secrlist as input (curves overlaid)
- par.secr.fit() acquires argument 'prefix'
- predict.secr() acquires argument 'realnames' to select a subset of 'real' parameters
Bugs fixed
- make.grid() did not assign polyID attribute for polygon detectors
- snip() and discretize() for transects dropped occasions with no detections
- sim.capthist() failed when 'userdist' supplied (non-Euclidean distances)
Other
- ovenbird dataset provided with detector type "proximity"
- esa() more robust to variation when noccasions specified
- new details option 'splitmarked' for resightings (default FALSE)
- usagePlot() argument occasion renamed occasions
- more compact 'call' component of secr.fit output
- discontinued warning when detectfn requires changed parameters (g0 -> lambda0)
- plot method for traps enables box around plot (bty = 'o')
- plotMaskEdge faster
- secr.fit() details savecall = FALSE suppresses call (default in par.secr.fit)
- new function shareFactorLevels() to force factor covariates to use the same levels
- rgdal::readOGR used instead of deprecated maptools::readShapeSpatial
- minor speed improvments for models without learned response
- ip.secr() faster default predictorfn