Wednesday, September 16, 2015

Sept 2015: International Training course on Fishery Stock Assessment and Ecosystem Modeling

Owen Hamel, Aaron Berger and Eli Holmes will be teaching the International Training course on "Fishery Stock Assessment and Ecosystem Modeling" during September 16 - 22, 2015, in Hyderabad, India.  Organized by International Training Centre for Operational Oceanography (ITCOocean) and ESSO-INCOIS, Hyderabad, India.  This is part on an ongoing technical cooperation between Ministry of Earth Sciences (MoES), India and NOAA to enhance predictive capabilities for fisheries in India.
http://www.incois.gov.in/portal/ITCOocean/fsaem.jsp

Saturday, January 10, 2015

Winter 2015 Online Course: Applied Time Series Analysis in Fisheries and Environmental Sciences

Fish 507: Applied Time Series Analysis in Fisheries and Environmental Sciences
Winter 2015
Fisheries Dept, University of Washington

Instructors: Eric Ward, Eli Holmes, Mark Scheuerell
email: eli.holmes@noaa.gov, mark.scheuerell@noaa.gov, eric.ward@noaa.gov

Reviews current applications of univariate and multivariate time series models for biological and environmental data, emphasizing the estimation, inference, and forecasting aspects of time-series models. Explores effects of covariates and anthropogenic drivers for species that are exploited and/or of conservation concern. We taught a similar course 2 years ago. This time we are emphasizing how to fit these models in a Bayesian context with JAGS along with a MLE context with MARSS. We are recording the lectures and you can follow along with the course at: https://catalyst.uw.edu/workspace/fish203/35553/243766

Friday, January 24, 2014

New paper on MAR modeling of community dynamics

Quantifying effects of abiotic and biotic drivers on community dynamics with multivariate autoregressive (MAR) models

Stephanie E. Hampton, Elizabeth E. Holmes, Lindsay P. Scheef, Mark D. Scheuerell, Stephen L. Katz, Daniel E. Pendleton, and Eric J. Ward

Long-term ecological data sets present opportunities for identifying drivers of community dynamics and quantifying their effects through time series analysis. Multivariate autoregressive (MAR) models are well known in many other disciplines, such as econometrics, but widespread adoption of MAR methods in ecology and natural resource management has been much slower despite some widely cited ecological examples. Here we review previous ecological applications of MAR models and highlight their ability to identify abiotic and biotic drivers of population dynamics, as well as community-level stability metrics, from long-term empirical observations. Thus far, MAR models have been used mainly with data from freshwater plankton communities; we examine the obstacles that may be hindering adoption in other systems and suggest practical modifications that will improve MAR models for broader application. Many of these modifications are already well known in other fields in which MAR models are common, although they are frequently described under different names. In an effort to make MAR models more accessible to ecologists, we include a worked example using recently developed R packages (MAR1 and MARSS), freely available and open-access software.

Read More: http://www.esajournals.org/doi/abs/10.1890/13-0996.1


Thursday, January 16, 2014

Time Series (MARSS) Course offered in March in Stockholm

Mark and Eli are teaching a week-long multivariate time-series analysis course in Stockholm in March.  Course Announcement

Friday, November 29, 2013

MARSS 3.6 up on CRAN. Significant speed increases for large models

MARSS 3.6 has been uploaded to CRAN.  I fixed some inefficiencies that were causing DFA models with many time-series (n>100) and R="diagonal and unequal" to be very, very slow.  My tests show 10x faster fits for n=100 and R="diagonal and unequal" for DFA models.

http://cran.r-project.org/web/packages/MARSS/index.html

Tuesday, October 8, 2013

New paper out by Jim and Eric on using Delta-GLMMs to analyze fisheries survey data

Thorson, J.T. and E.J. Ward. 2013. Accounting for space-time interactions in index
standardization models. Fisheries Research,147:426:433

Scientific survey data are used to estimate abundance trends for fish populations worldwide, and are frequently analyzed using delta-generalized linear mixed models (delta-GLMMs). Delta-GLMMs incorporate information about both the probability of catch being non-zero (catch probability) and the expected value for non-zero catches (catch rates). Delta-GLMMs generally incorporate year as a main effect, and frequently account for spatial strata and/or covariates. Many existing delta-GLMMs do not account for random or systematic differences in catch probability or rates in particular combinations of spatial strata and year (i.e., space–time interactions), and do not recognize potential correlation in random space–time interactions between catch probability and catch rates. We therefore develop a Bayesian delta-GLMM that estimates correlations between catch probability and rates, and compare it with either (a) ignoring year–strata interactions, (b) modeling year–strata interactions as fixed effects, or (c) estimating year–strata interactions in catch probability or rates as independent random effects. These four models are fitted to bottom trawl survey data for 28 species off the U.S. West Coast. The posterior median of the correlation is positive for the majority (18) of species, including all five for which the posterior distribution has little overlap with zero. However, estimating this correlation has little impact on resulting abundance indices or credible intervals. We therefore conclude that the correlated random model will have a little impact on index standardization of the West Coast bottom trawl dataset. However, we propose that the correlated model can quickly identify correlations between occupancy probability and density, and provide our code to allow researchers to quickly identify whether such a correlation is likely to be significantly different from zero for their chosen data set.

Friday, July 5, 2013

Building R packages with RStudio and embedding R in your documents and reports

Building R packages with RStudio plus Embedding R in documents short-course on-line:

http://www.iugo-cafe.org/chinook/view_node.php?id=2962

Topics:
  • how (and why) to make an R package using RStudio
  • installing packages from github, git or a url to your tar.gz file
  • Using Sweave and RStudio to do 'reproducible research/programming'.
  • Using OpenOffice + R to do the same, if you don't like LaTeX
  • Creating web-apps that run your R code (a few links to demos)

Tuesday, March 12, 2013

Week 10: Applied Time-Series Analysis for Fisheries and Environmental Data

Class material: webpage

Week 10: Dynamic linear models
This week, we give a brief introduction to an important class of MARSS models: dynamic linear models. These are multivariate linear regression models where the regression parameters (slope and intercepts) are treated as a AR process and thus are allowed to time evolve. We also review some of the diagnostics for MARSS models fits.

Lab 10 In the lab, you'll go through an simple example of a univariate dynamic linear model with time-varying slope and intercept.
Lecture 10 You can find the pdf of lecture on the class webpage along with the link to watch a recording of the lecture.

Tuesday, March 5, 2013

Week 9: Applied Time-Series Analysis for Fisheries and Environmental Data

Class material: webpage

Week 9: Bayesian hierarchical multivariate state-space models
This week, we discuss fitting non-linear MARSS models and MARSS models with non-Gaussian errors using Bayesian methods. This is a very brief introduction and many shows some examples of how one sets up a MARSS model in JAGS and shows you what the posteriors of some models look like.
* Posteriors for MARSS models
* Intro to JAGS (the Gibbs sampler we will be using)
* many examples of fitting non-linear and non-Gaussian MARSS models

Lab 9 The main lab is to go through the JAGS examples shown in the lecture.
Lecture 9 You can find the pdf of lecture on the class webpage along with the link to watch a recording of the lecture.

Tuesday, February 26, 2013

Week 8: Applied Time-Series Analysis for Fisheries and Environmental Data

Class material: webpage

Week 8: Estimating interactions (the B matrix)
This week, we discuss issues related to the estimation of the B matrix in the context of using it to represent species interactions in a community dynamics models.
* univariate discrete time Gompertz model
* multivariate discrete time Gompertz model
* including covariates
* spurious density dependence resulting from ignoring observation error
* uncertainty in B elements resulting from estimating observation variance
* different methods for estimating confidence intervals: bootstrapping, hessian approximation, profile likelihood
* diagnostics

Lab 8
The main lab is to go through case study 7 in the MARSS User Guide and the corresponding code.
Lecture 8
You can find the pdf of lecture on the class webpage.


Week 7: Applied Time-Series Analysis for Fisheries and Environmental Data


Class material: webpage

Week 7: Dynamic factor analysis

This week, we use MARSS to do dynamic factor analysis (DFA), which allows us to look for a set of common underlying trends among a relatively large set of time series (Harvey, 1989, sec. 8.5). This is conceptually different than what we have been doing in the previous weeks. Here we are trying to explain temporal variation in a set of n observed time series using linear combinations of a set of m hidden random walks, where m << n. You can think of this as PCA for time-series data. Zuur et al. (2003) show a number of examples of DFA applied to catch data and densities of zoobenthos.

Lab 7
The main lab is to go through the dynamic factor analysis chapter in the MARSS User Guide and the corresponding code.

Lecture 7
You can find the ppt of lecture on the class webpage. Technical difficulties prevented recording of the lecture.

Wednesday, February 13, 2013

Week 6: Applied Time-Series Analysis for Fisheries and Environmental Data


Class material: webpage

Week 6: Introduction to including covariates in multivariate time-series model
This week we introduce the inclusion of covariates using the framework of a multivariate autoregressive model written in state-space form.  You will understand the lecture better if you read the chapter on covariates in the MARSS User Guide first.  Much of the lecture is about how to include covariates in different mathematically equivalent ways.  You'll want to translate the R code in the lecture into the mathematical formulas (matrix form) to see how covariates are entering the mathematical model.


Lab topic:
The main lab is to go through the covariate chapter and examples in the MARSS User Guide.  Then we have some salmon data to play with to try different ways of including cycles (in this case driven by cohort strength) into an analysis.

Lecture 6
Click the big arrow to start.  You can also find the ppt of lecture t on the class webpage.



Wednesday, February 6, 2013

Week 5: Applied Time-Series Analysis for Fisheries and Environmental Data

Class material: webpage

Week 5: Introduction to multivariate autoregressive state-space models
Lecture topics:
  • Review of dealing with obs error with ARIMA (from last week)
  • Multivariate state space models
  • How these are expressed mathematically
  • Analysis of multi-site data using this framework
  • Parameter estimation: Kalman filter, Newton methods and EM algorithm
Lab topic:
The main lab is to go through case study 2 in the MARSS User Guide. I have a Fish 507 specific version of the case study code on the course website with questions to answer as you go through. Case study 3 and 8 are optional but going through them will help solidify your understanding of multivariate state-space models. Do go through the ARMA code as it discusses some important points about the effects of data transformation (in this case differences) on the time-series model that is appropriate for the data.

Lecture 5
Click the big arrow to start the show. You can also find just a pdf of lecture 5 on the class webpage.

Thursday, January 31, 2013

Week 4: Applied Time-Series Analysis for Fisheries and Environmental Data

Class material: webpage

Week 4: Introduction to univariate autoregressive state-space models
Topics:
  • State-space models
  • Process versus observation error
  • Model Selection


Lecture 4
Click the big arrow to start the show. You can also find just the ppt of lecture 3 on the class webpage.

Tuesday, January 22, 2013

Week 3: Applied Time-Series Analysis for Fisheries and Environmental Data

Class material: webpage

Week 3: Estimation, model selection, and forecasting for time series models
Topics:
  • Summarizing ARIMA models
  • Estimation
  • Model Selection
  • Prediction & forecasting
  • Evaluating forecasts
  • Functions: arima(), lm(), Arima()
Lecture 3
This is our second attempt at recording a lecture. Still much to be learned but we are getting better.  Click the big arrow to start the show. You can also find just the ppt of lecture 3 on the class webpage.

Tuesday, January 15, 2013

Week 2: Applied Time-Series Analysis for Fisheries and Environmental Data

Class material: webpage

Week 2: Correlation, stationarity & stationary time-series models
The lecture introduces the ACF, PACF, and basic properties of AR, MA and ARMA models. The computer code section shows R code to analyze simulated time-series data so that participants get a feel for ACF and PACF and get a feel for AR and MA processes. The participants then move to analyzing some real time-series data using the 30+ year time-series of Lake Washington plankton.

Lecture 2
This is our first attempt at recording a lecture. Ahem, there is clearly much to be learned to improve the process...Click the big arrow to start the show. You can also find just the ppt of lecture 2 on the class webpage.

Friday, November 30, 2012

Winter stats reading group starting up: Hierarchical Modeling and Analysis for Spatial Data

The NWFSC/SAFS stats reading group is reading "Hierarchical Modeling and Analysis for Spatial Data" by Banerjee et al. this quarter.  Fridays 3pm at SAFS 229 during Winter Qtr 2013.  Open to interested statistical ecologists.  Contact Eli.

Monday, November 12, 2012

New paper on spatial-temporal time series modeling

New paper just out by Eric Ward using Bayesian state-space time-series models.

"Applying time series models with spatial correlation to identify the scale of variation in habitat metrics related to threatened coho salmon (Oncorhynchus kisutch) in the Pacific Northwest"
Eric J. Ward, George R. Pess, Kara Anlauf-Dunn, and Chris E. Jordan
Canadian Journal of Fisheries and Aquatic Science (link to paper)

Abstract: Trend analyses are common in the analysis of fisheries data, yet the majority of them ignore either observation error or spatial correlation. In this analysis, we applied a novel hierarchical Bayesian state-space time series model with spatial correlation to a 12-year data set of habitat variables related to coho salmon (Oncorhynchus kisutch) in coastal Oregon, USA. This model allowed us to estimate the degree of spatial correlation separately for each habitat variable and the importance of observation error relative to environmental stochasticity. This framework allows us to identify variables that would benefit from additional sampling and variables where sampling could be reduced. Of the eight variables included in our analysis, we found three metrics related to habitat quality correlated at large spatial scales (gradient, fine sediment, shade cover). Variables with higher observation error (pools, active channel width, fine sediment) could be made more precise with more repeat visits. Our spatio-temporal model is flexible and extendable to virtually any spatially explicit monitoring data set, even with large amounts of missing data and no repeated observations. Potential extensions include fisheries catch data, abiotic indicators, invasive species, or species of conservation concern.

Wednesday, August 1, 2012

Time-series analysis course winter 2012

Fish 50X: Applied Time Series Analysis in Fisheries and Environmental Sciences
Winter 2012
Fisheries Dept, University of Washington

Instructors: Eric Ward, Eli Holmes, Mark Scheuerell
email: eli.holmes@noaa.gov, mark.scheuerell@noaa.gov, eric.ward@noaa.gov

Reviews current applications of univariate and multivariate time series models for biological and environmental data, emphasizing the estimation, inference, and forecasting aspects of time-series models. Explores effects of covariates and anthropogenic drivers for species that are exploited and/or of conservation concern. Recommended: FISH 552 or prior experience with R (e.g. FISH 560), QSCI 482 or basic statistics, and at least 1 course in population dynamics (FISH 454 or 458).

R Journal article on the MARSS package

Holmes, E. E., Ward, E. J. and K. Wills. 2012. MARSS: Multivariate autoregressive state-space models for analyzing time-series data. R Journal 4: 11-19.  http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Holmes~et~al.pdf