Package: secr 5.1.1

secr: Spatially Explicit Capture-Recapture

Functions to estimate the density and size of a spatially distributed animal population sampled with an array of passive detectors, such as traps, or by searching polygons or transects. Models incorporating distance-dependent detection are fitted by maximizing the likelihood. Tools are included for data manipulation and model selection.

Authors:Murray Efford [aut, cre], Philipp Jund [ctb], David Fletcher [ctb], Yan Ru Choo [ctb]

secr_5.1.1.tar.gz
secr_5.1.1.zip(r-4.5)secr_5.1.1.zip(r-4.4)secr_5.1.1.zip(r-4.3)
secr_5.1.1.tgz(r-4.4-x86_64)secr_5.1.1.tgz(r-4.4-arm64)secr_5.1.1.tgz(r-4.3-x86_64)secr_5.1.1.tgz(r-4.3-arm64)
secr_5.1.1.tar.gz(r-4.5-noble)secr_5.1.1.tar.gz(r-4.4-noble)
secr_5.1.1.tgz(r-4.4-emscripten)secr_5.1.1.tgz(r-4.3-emscripten)
secr.pdf |secr.html
secr/json (API)
NEWS

# Install 'secr' in R:
install.packages('secr', repos = c('https://murrayefford.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/murrayefford/secr/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

9.98 score 3 stars 5 packages 394 scripts 2.0k downloads 33 mentions 233 exports 33 dependencies

Last updated 14 days agofrom:3b7e33db07. Checks:OK: 3 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 07 2024
R-4.5-win-x86_64OKNov 07 2024
R-4.5-linux-x86_64OKNov 07 2024
R-4.4-win-x86_64NOTENov 07 2024
R-4.4-mac-x86_64NOTENov 07 2024
R-4.4-mac-aarch64NOTENov 07 2024
R-4.3-win-x86_64NOTENov 07 2024
R-4.3-mac-x86_64NOTENov 07 2024
R-4.3-mac-aarch64NOTENov 07 2024

Exports:addCovariatesaddSightingsaddTelemetryadjustVarDAICcompatiblealivealongtransectanimalIDappend.capthistARLas.maskas.popnattenuationplotautoinibias.DbinCovariateboundarytoSFbuffer.contourbufferContourcentroidschat.nkcircular.pcircular.rclip.hexcloneclosedNclosure.testcluster.centrescluster.countsclusterIDclusterID<-clustertrapclustertrap<-collatecountscovariatescovariates<-CVCVaCVa0CVpdotD.designdatadbardeleteMaskPointsderivedderivedClusterderivedExternalderivedMashderivednjderivedSessiondetectfnplotdetectordetector<-detectparDfn2discretizedistancetotrapedistellipse.bvnellipse.secrEnkesaesa.plotesaPlotexpected.nextractMovesFletcher.chatflipfx.totalfxifxi.contourfxi.modefxi.secrfxiContourfxiModefxTotalgetMeanSDgridCellsinsertdimintervalsintervals<-invlogitip.secrjoinkfnlist.secr.fitLLsurfacelogitlogmultinomLR.testmake.capthistmake.circlemake.gridmake.laceworkmake.lookupmake.maskmake.polymake.spcosamake.systematicmake.telemetrymake.transectmake.trimakeNewDatamakeStartmarkoccmarkocc<-mashmask.checkmaskareamasklengthmasksizeMCgofMMDMmodel.averagemodelAveragemovesmsMS.capthistnearesttrapnedistnknoisenoise<-nontargetnontarget<-occasionoccasionKeyORLpar.derivedpar.region.Npar.secr.fitpdotpdot.contourpdotContourPGplotMaskEdgeplotMCPpmixProfileLLpointsInPolygonpolyareapolyIDpolyID<-predictDlambdapredictDsurfacerandomDensityrandomHabitatrastrasterread.capthistread.DAread.maskread.telemetryread.trapsrectangularMaskreduceregion.NrlnormCVRMarkInputrotateRPSVRSERsurfacescore.tablescore.testsearchareasecr.design.MSsecr.fitsecr.testsecrlistsessionsession<-sessionlabelssessionlabels<-setNumThreadsshareFactorLevelsshiftsightingsightingPlotsignalsignal<-signalframesignalframe<-signalmatrixsim.capthistsim.detectsim.popnsim.resightsim.secrsnipspacingspacing<-spotHeightstrip.legendsuggest.buffertelemeteredtelemetrytypetelemetrytype<-telemetryxytelemetryxy<-tiletimevaryingcovtimevaryingcov<-TmTm<-TnTn<-transectIDtransectID<-transectlengthtraptrap.buildertrapstraps<-trapsPerAnimaltrimTuTu<-unjoinunRMarkInputupdateCHusageusage<-usagePlotverifywrite.capthistwrite.captureswrite.DAwrite.maskwrite.trapswriteGPSxyxy<-xy2CH

Dependencies:abindBHclassclassIntcliDBIe1071glueKernSmoothlatticelifecyclemagrittrMASSMatrixmgcvmvtnormnlmeproxyrasterRcppRcppEigenRcppNumericalRcppParallelrlangs2sfspstringistringrterraunitsvctrswk

Data input for secr

Rendered fromsecr-datainput.Rmdusingknitr::rmarkdownon Nov 07 2024.

Last update: 2022-04-22
Started: 2022-04-22

secr 5.1 - spatially explicit capture--recapture in R

Rendered fromsecr-overview.Rmdusingknitr::rmarkdownon Nov 07 2024.

Last update: 2024-11-07
Started: 2022-04-22

Readme and manuals

Help Manual

Help pageTopics
Spatially Explicit Capture-Recapture Modelssecr-package secr
Add Covariates to Mask or TrapsaddCovariates
Mark-resight DataaddSightings
Combine Telemetry and Detection DataaddTelemetry telemetrytype telemetrytype<- xy2CH
Compare SECR ModelsAIC.secr AIC.secrlist logLik.secr secrlist [.secrlist
Model CompatibilityAICcompatible AICcompatible.secr AICcompatible.secrlist
Coerce capthist to Data Frame or Arrayas.array as.array.capthist as.data.frame as.data.frame.capthist as.data.frame.traps
Coerce traps object to maskas.mask
Coerce ppp object to popnas.popn
Initial Parameter Values for SECRautoini
Add Binned CovariatebinCovariate
Black Bear Hair Snag Datasetblackbear blackbear.0 blackbear.h2bk blackbearCH GSM
Convert Data To Or From BUGS Formatread.DA write.DA
Spatial Capture History Objectcapthist
Dissect Spatial Capture History Objectalive alongtransect animalID occasion telemetered telemetryxy telemetryxy<- trap xy xy<-
Overdispersion of Activity CentresadjustVarD chat.nk Enk nk
Circular Probabilitycircular.p circular.r
Replicate Rowsclone clone.capthist clone.default clone.popn
Closed population estimatesclosedN
Closure testsclosure.test
Detector Clusteringcluster clusterID clusterID<- clustertrap clustertrap<-
Coefficients of secr Objectcoef.secr
Array of Parameter Estimatescollate collate.ipsecr collate.secr collate.secrlist
Profile Likelihood Confidence Intervalsconfint.secr
Contour Detection ProbabilitybufferContour pdotContour
Covariates Attributecovariates covariates<-
Coefficient of VariationCV CVa CVa0
Construct Density Design DataD.designdata
Deermouse Live-trapping Datasetsdeermouse deermouse.ESG deermouse.WSG
Edit Mask PointsdeleteMaskPoints
Derived Parameters of Fitted SECR Modelderived derived.secr derived.secrlist esa esa.secr
Detail Specification for secr.fitdetails fixedbeta LLonly maxdistance miscparm param
Detection Functionsdetectfn Detection functions
Detector Typecapped count detector detector<- multi polygon polygonX proximity single transect transectX
Deviance of fitted secr model and residual degrees of freedomdeviance deviance.secr df.residual df.residual.secr
Rasterize Area Search or Transect Datadiscretize
Distance To Nearest Detectordistancetotrap nearesttrap
Density SurfacesDsurface Dsurface-class print.Dsurface summary.Dsurface
Confidence Ellipsesellipse.bvn ellipse.secr
Empirical Variance of H-T Density EstimatederivedCluster derivedExternal derivedMash derivednj derivedSession empirical.varD
Mask Buffer Diagnostic PlotesaPlot
Expected Number of Individualsexpected.n
Simulated MovementsextractMoves
Frequently Asked Questions, And OthersFAQ
Estimate overdispersionFletcher.chat
Probability Density of Activity Centrefxi fxi.secr fxiContour fxiMode
Activity Centres of Detected and Undetected AnimalsfxTotal fxTotal.secr
Construct Grid CellsgridCells
Hybrid Mixture Modelhcov
First or Last Part of an Objecthead.capthist head.Dsurface head.mask head.traps tail.capthist tail.Dsurface tail.mask tail.traps
Home Range StatisticsARL centroids dbar MMDM moves ORL RPSV trapsPerAnimal
Flat-tailed Horned Lizard Datasethornedlizard hornedlizardCH
House mouse live trapping dataCoulombe housemouse
Internal FunctionsboundarytoSF Dfn2
Work with Open Population dataintervals intervals<- sessionlabels sessionlabels<-
Combine or Split Sessions of capthist Objectjoin unjoin
Overlap Indexkfn
Fit Multiple SECR Modelslist.secr.fit
Plot Likelihood SurfaceLLsurface LLsurface.secr
Logit Transformationinvlogit logit
Multinomial Coefficient of SECR Likelihoodlogmultinom
Likelihood Ratio TestLR.test
Construct capthist Objectmake.capthist
Construct Lacework Detector Designmake.lacework
Build Habitat Maskmake.mask
Construct Spatial Coverage Designmake.spcosa
Construct Systematic Detector Designmake.systematic
Build Detector Arraymake.circle make.grid make.poly make.telemetry make.transect
Build Detector Array on Triangular or Hexagonal Gridclip.hex make.tri
Initial Parameter ValuesmakeStart
Mask Objectmask mask-class
Mask Diagnosticsmask.check
Monte Carlo Goodness-of-fit for SECR ModelsMCgof MCgof.secr MCgof.secrlist
Averaging of SECR Models Using Akaike's Information CriterionmodelAverage modelAverage.secr modelAverage.secrlist
Multi-session Objectsms ms.default ms.mask ms.secr
Create Default Design DatamakeNewData makeNewData.default makeNewData.secr newdata
Non-target Datainterference nontarget nontarget<-
Key to Petal PlotoccasionKey
Ovenbird Mist-netting Datasetovenbird ovenbird.model.1 ovenbird.model.D ovenCH ovenCHp ovenmask
Ovenbird Acoustic Datasetovensong ovensong.model.1 ovensong.model.2 signalCH
Orongorongo Valley Brushtail PossumsOVpossum OVpossumCH
Multi-core ProcessingMulti-core processing ncores Parallel
Net Detection ProbabilityCVpdot pdot
Telemetry Fixes in PolygonsPG
Plot Detection Historiesplot.capthist plotMCP
Plot Habitat Mask, Density or Resource Surfaceplot.Dsurface plot.mask plot.Rsurface spotHeight
Methods for MCgof Objectshist.MCgof plot.MCgof print.MCgof summary.MCgof
Plot Population Objectplot.popn
Plot Detection Functionsattenuationplot detectfnplot plot.secr plot.secrlist
Plot traps Objectplot.traps
Outline Around Mask CellsplotMaskEdge
Mixture Model CheckpmixProfileLL
Points Inside PolygonpointsInPolygon
Area of Polygon(s)polyarea
Population Objectpopn
Brushtail Possum Trapping Datasetpossum possum.model.0 possum.model.Ds possumarea possumCH possummask possumremovalarea
SECR Model Predictionsdetectpar detectpar.secr predict.secr predict.secrlist
Predict Density SurfacepredictDsurface
Print Detectionsprint.capthist
Print or Summarise secr Objectprint.secr summary.secr
Print Detectorsprint.traps
Random LandscaperandomDensity randomHabitat
Create a RasterLayer Object from Mask or Dsurfacerast rast,Dsurface-method rast,mask-method raster raster,Dsurface-method raster,mask-method
Combine capthist Objectsappend.capthist MS.capthist rbind.capthist
Combine popn Objectsrbind.popn
Combine traps Objectsrbind.traps
Import or export dataread.capthist write.capthist
Read Habitat Mask From Fileread.mask
Import Telemetry Fixesread.telemetry
Read Detector Data From Fileread.traps
Rectangular MaskrectangularMask
Combine Columnsreduce reduce.default
Combine Occasions Or Detectorsreduce.capthist reduce.traps
Population Sizepopulation size region.N region.N.secr region.N.secrlist
Convert Data to RMark Input FormatRMarkInput unRMarkInput
RSE from Fitted ModelRSE
Smoothed Resource SurfaceRsurface
Score Test for SECR Modelsscore.table score.test
Defunct Functions in Package 'secr'defunct derivedSystematic ip.secr make.newdata model.average pfn read.SPACECAP secr-defunct secr.make.newdata write.SPACECAP
Deprecated Functions in Package 'secr'buffer.contour esa.plot fx.total fxi.contour fxi.mode par.derived par.region.N par.secr.fit pdot.contour secr-deprecated
Changes in 'secr' 5.0secr-version5 version5
Construct Detection Model Design Matrices and Lookupsinsertdim make.lookup secr.design.MS
Spatially Explicit Capture-Recapturesecr.fit
Goodness-of-Fit Testsecr.test
SECR Models Fitted to Demonstration Datacaptdata captXY secrdemo secrdemo.0 secrdemo.b secrdemo.CL trapXY
Random Number Seedrandom numbers secrRNG seed
Goodness-of-fit Test Resultsplot.secrtest print.secrtest secrtest
Session Vectorsession session<-
Number of ThreadssetNumThreads
Fix Inconsistent CovariatesshareFactorLevels
Sighting Attributesmarkocc markocc<- sighting sightings Tm Tm<- Tn Tn<- Tu Tu<-
Signal Fieldsnoise noise.capthist noise<- signal signal.capthist signal<- signalframe signalframe<-
Reformat Signal Datasignalmatrix
Simulate Detection Historiessim.capthist sim.resight
Simulate 2-D Populationsim.popn tile
Simulate From Fitted secr Modelsim.detect sim.secr simulate simulate.secr
Skink Pitfall DatainfraCH lineoCH LStraps skink
Smooth Terms in SECR Modelssmooths
Slice Transect Into Shorter Sectionssnip
Sort Rows of capthist or mask Objectsort.capthist sort.mask
Detector or Mask Spacingspacing spacing.mask spacing.traps spacing<-
Speed Tipsspeed Speed tips
Stoat DNA Datastoat.model.EX stoat.model.HN stoatCH stoatDNA
Colour Strip Legendstrip.legend
Subset or Split capthist Objectsplit.capthist subset.capthist
Subset, Split or Combine Mask Objectsrbind.mask split.mask subset.mask
Subset popn Objectsubset.popn
Subset traps Objectsplit.traps subset.traps
Mask Buffer Widthbias.D suggest.buffer
Summarise Detectionscounts print.summary.capthist summary.capthist
Summarise Habitat Maskprint.summary.mask summary.mask
Summarise Simulated Populationprint.summary.popn summary.popn
Summarise Detector Arrayprint.summary.traps summary.traps
Time-varying Covariatestimevaryingcov timevaryingcov<-
Transform Point Arrayflip flip.popn flip.traps rotate rotate.popn rotate.traps shift shift.mask shift.popn shift.traps transformations
Complex Detector Layoutscluster.centres cluster.counts mash trap.builder
Detector Arraytraps traps object traps<-
Detector AttributespolyID polyID<- searcharea transectID transectID<- transectlength
Density TrendpredictDlambda
Drop Unwanted List Componentstrim trim.default trim.secr trim.secrlist
Problems in Fitting SECR ModelsTroubleshooting
Specifying a Dynamic Populationturnover
Update Old capthist FormatupdateCH
Detector Usageeffort usage usage.traps usage<-
Plot usage, detections or sightings.sightingPlot usagePlot
Non-Euclidean Distancesnoneuc userdist
Utility Functionsedist getMeanSD maskarea masklength masksize nedist rlnormCV
Variance - Covariance Matrix of SECR Parametersvcov.secr
Check SECR Dataverify verify.capthist verify.default verify.mask verify.traps
Write Data to Text Filewrite.captures write.mask write.traps
Upload to GPSwriteGPS