Tools to fit Bayesian state-space models to animal tracking data. Models are provided for location filtering, location filtering and behavioural state estimation, and their hierarchical versions. The models are primarily intended for fitting to ARGOS satellite tracking data but options exist to fit to other tracking data types. For Global Positioning System data, consider the 'moveHMM' package. Simplified Markov Chain Monte Carlo convergence diagnostic plotting is provided but users are encouraged to explore tools available in packages such as 'coda' and 'boa'.
bsam - Bayesian State-space models for Animal Movement.
bsam is an R package that fits Bayesian state-space models via JAGS to Argos satellite tracking data. The models filter error-prone Argos locations and estimate behavioural states associated with two fundamentally different movement patterns (directed, fast movements and relatively undirected, slow movements). The models can be fit to individual animal tracks or simultaneously to a group of individuals. Plotting functions are provided to help assess lack of MCMC convergence, map estimated tracks and visualise fit to the observations.
?bsam for more details on functionality and
?fit_ssm for details and examples of how to use the package.
First ensure that you have a working copy of JAGS (>= 4.2.0) for the rjags package, see instructions below.
Get the released version of bsam from CRAN:
Or download the current development version from GitHub:
Install JAGS: http://mcmc-jags.sourceforge.net/
get_summaryfunction to extract summary
fit_ssmoutput objects. The
data_framecan optionally be written to a .csv file
rworldxtraback to Imports list in DESCRIPTION. Ensures all required packages are installed, otherwise
map_ssmwill return an error when attempting to load
rworldxtraare not installed
removed sp and rworldxtra from Imports
added BugReports URL to DESCRIPTION
Simplified movement models by removing the mean turn angle parameter. This tends to improve convergence for the behavioural switching models
Simplified the regularisation / interpolation in the observation models
Simplified data preparation code
Diagnostic plots (renamed from
diag_ssm) now include the Gelman-Rubin-Brooks shrink factor plots for each parameter
New mapping function (
map_ssm) uses coastline data from
ggplot2 for core plotting functions
New plot function (
plot_fit) to inspect fit to location data
Renamed core function
Improved selection of random initial values for MCMC sampling
Initial values for location states are now based on a loess smooth through the observed locations. Users can control the degree of smoothing via the
span argument to
ported from source 2016-05-27 [email protected]
converted to use roxygen2
NEWS.md file to track changes to the package.
f <- ""download.file(f, basename(f), mode = "wb")system(sprintf("tar zxvf %s", basename(f)))Rd2roxygen::Rd2roxygen("bsam")