VAST
Is an R package for implementing a spatial delta-generalized linear mixed model (delta-GLMM) for multiple categories (species, size, or age classes) when standardizing survey or fishery-dependent data.
Builds upon a previous R package SpatialDeltaGLMM
(public available here), and has unit-testing to automatically confirm that VAST
and SpatialDeltaGLMM
give identical results (to the 3rd decimal place for parameter estimates) for several varied real-world case-study examples
Has built in diagnostic functions and model-comparison tools
Is intended to improve analysis speed, replicability, peer-review, and interpretation of index standardization methods
Background This tool is designed to estimate spatial variation in density using spatially referenced data, with the goal of habitat associations (correlations among species and with habitat) and estimating total abundance for a target species in one or more years. The model builds upon spatio-temporal delta-generalized linear mixed modelling techniques (Thorson Shelton Ward Skaug 2015 ICESJMS), which separately models the proportion of tows that catch at least one individual ("encounter probability") and catch rates for tows with at least one individual ("positive catch rates"). Submodels for encounter probability and positive catch rates by default incorporate variation in density among years (as a fixed effect), and can incorporate variation among sampling vessels (as a random effect, Thorson and Ward 2014) which may be correlated among categories (Thorson Fonner Haltuch Ono Winker In press). Spatial and spatiotemporal variation are approximated as Gaussian Markov random fields (Thorson Skaug Kristensen Shelton Ward Harms Banante 2014 Ecology), which imply that correlations in spatial variation decay as a function of distance.
There are eleven main resources for learning about VAST:
VAST
?fit_model
or ?make_data
in the R-terminal after installing the package and loading it using library(VAST)
.If there are questions that arise after this, please look for a VAST Point-of-Contact at your institution and consider contacting them prior to posting an issue.
Regions available in the example script: and see FishViz.org for visualization of results for regions with a public API for their data.
This function depends on R version >=3.1.1 and a variety of other tools.
First, install the "devtools" package from CRAN
# Install and load devtools package
install.packages("devtools")
library("devtools")
Next, please install the VAST package from this GitHub repository using a function in the "devtools" package. This may require using the INSTALL_opts
option depending upon your version of R:
# Install package
install_github("james-thorson/VAST@main", INSTALL_opts="--no-staged-install")
# Load package
library(VAST)
If you are having problems with installation, please consider installing dependencies individually, e.g. using:
# Install TMB from CRAN
install.packages("TMB")
# Install INLA using currently recommended method
install.packages("INLA", repos=c(getOption("repos"), INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)
# Install FishStatsUtils from CRAN
install_github("james-thorson/FishStatsUtils@main", INSTALL_opts="--no-staged-install")
Finally, please confirm that VAST is installed by running a model, e.g., following the simple example here.
If using a NOAA laptop, sometimes the PATH for Rtools is not correctly specified during installation. In those cases, please follow instructions here
Some versions of R are having problems downloading dependencies from GitHub, see details here
People using R version 3.6.0 or MRAN 3.5.3 are having a problem with changing standards for package namespaces, see details here, which appears to be particularly a problem with loading INLA due to install issues with that package.
MacOS users have specific install issues and a discussion of potential fixes is here
MacOS users should be aware that significant speed-ups in model fitting can be accomplished by switching the library used for Basic Linear Algebra Subprograms (BLAS) from the default. There are a few BLAS alternatives available, though, the simplest seems to be using the vecLib library, part of Apple's Accelerate Framework and included in most recent R binaries. To switch the BLAS library, run the following lines in the terminal and then confirm the switch with a call to sessionInfo()
in R.
# Terminal commands to switch R BLAS library to increase speed
cd /Library/Frameworks/R.framework/Resources/lib
ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib libRblas.dylib
TMBhelper
(here), then ThorsonUtilities
(here), then FishStatsUtils
(here), then VAST
(here) to your harddrive in a local directory while recording the directory name (which I will reference as download_dir
), and then install these packages from each ZIP file in the same order. To install each package, please click "clone or download" -> "Download ZIP" -> devtools::install_local(path=download_dir, dependencies=FALSE)
=============
“The United States Department of Commerce (DOC) GitHub project code is provided on an ‘as is’ basis and the user assumes responsibility for its use. DOC has relinquished control of the information and no longer has responsibility to protect the integrity, confidentiality, or availability of the information. Any claims against the Department of Commerce stemming from the use of its GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.”
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.