James-Thorson / spatial_DFA

Spatial dynamic factor analysis, for estimating spatiotemporal density dependence in community dynamics
7 stars 4 forks source link

Description

SpatialDFA is an R package for implementing spatial dynamic factor analysis, a model for estimating spatiotemporal density dependence in community dynamics.

Usage

Please contact James Thorson if you're planning to use this package

Installation Instructions

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")

Second, please install the following:

Note: at the moment, TMB and INLA can be installed using these commands:

# devtools command to get TMB from GitHub
install_github("kaskr/adcomp/TMB") 
# source script to get INLA from the web
source("http://www.math.ntnu.no/inla/givemeINLA.R")  

Next, please install the SpatialDFA from this GitHub repository using a function in the "devtools" package:

# Install package
install_github("james-thorson/spatial_DFA") 
# Load package
library(spatial_DFA)

Works to read and cite if using the software

Further information