Lecture 17: Multi-stage models with MARSS, etc. Multivariate time series with MARSS We’ve largely worked with: 1. Different time series of the same species.

Slides:



Advertisements
Similar presentations
Population Ecology & Demography; Leslie Matrices and Population Projection Methods Introduction to linking demography, population growth and extinction.
Advertisements

Demography of southern leatherside chub in the presence and absence of an introduced predator Mark C. Belk, Eric Billman, Josh Rasmussen, Karen Mock, Jerald.
Covariation in Productivity of Mid-Columbia Steelhead Populations S.P. Cramer & Associates, Inc. 600 N.W. Fariss Road Gresham, OR
Modeling fisheries and stocks spatially for Pacific Northwest Chinook salmon Rishi Sharma, CRITFC Henry Yuen, USFWS Mark Maunder, IATTC.
Biodiversity of Fishes Death in the Sea Understanding Natural Mortality Rainer Froese GEOMAR
From last time….. Basic Biostats Topics Summary Statistics –mean, median, mode –standard deviation, standard error Confidence Intervals Hypothesis Tests.
Eigenvalues and eigenvectors
458 Generation-Generation Models (Stock-Recruitment Models) Fish 458, Lecture 20.
458 Stage- / Size-Structured Models Fish 458, Lecture 16.
458 More on Model Building and Selection (Observation and process error; simulation testing and diagnostics) Fish 458, Lecture 15.
Econ 140 Lecture 131 Multiple Regression Models Lecture 13.
458 Fitting models to data – II (The Basics of Maximum Likelihood Estimation) Fish 458, Lecture 9.
Age and Stage Structure
Multiple Regression Models
By Rob Day, David Bardos, Fabrice Vinatier and Julien Sagiotto
458 Age-structured models Fish 458, Lecture Why age-structured models? Advantages: Populations have age-structure! More realistic - many basic.
Linear and generalised linear models
458 Estimating Extinction Risk (Population Viability Analysis) Fish 458; Lecture 25.
Hui-Hua Lee 1, Kevin R. Piner 1, Mark N. Maunder 2 Evaluation of traditional versus conditional fitting of von Bertalanffy growth functions 1 NOAA Fisheries,
458 Age-structured models (continued) Fish 458, Lecture 5.
458 Fitting models to data – III (More on Maximum Likelihood Estimation) Fish 458, Lecture 10.
Linear and generalised linear models
Age-structured assessment of three Aleutian fish stocks with predator-prey interactions Doug Kinzey School of Aquatic and Fishery Sciences University of.
Hierarchical Bayesian Analysis of the Spiny Lobster Fishery in California Brian Kinlan, Steve Gaines, Deborah McArdle, Katherine Emery UCSB.
Stat 112: Lecture 16 Notes Finish Chapter 6: –Influential Points for Multiple Regression (Section 6.7) –Assessing the Independence Assumptions and Remedies.
The first law of populations:
Megan Stachura and Nathan Mantua University of Washington School of Aquatic and Fishery Sciences September 8, 2012.
Chapter 52 Population Ecology. Population ecology is the study of the fluctuations in population size and composition and their ecological causes A population.
STRUCTURED POPULATION MODELS
Embedding population dynamics models in inference S.T. Buckland, K.B. Newman, L. Thomas and J Harwood (University of St Andrews) Carmen Fernández (Oceanographic.
CJT 765: Structural Equation Modeling Class 7: fitting a model, fit indices, comparingmodels, statistical power.
Population Viability Analysis. Critically Endangered Threatened Endangered Criterion Reduction in population size 10 yrs 3 generations >80% >50% >30%
Surplus-Production Models
Ecology 8310 Population (and Community) Ecology. Context.
Kevin Kappenman Rishi Sharma Shawn Narum Benefit-Risk Analysis of White Sturgeon in the Lower Snake River Molly Webb Selina Heppell.
Photo by John McMillan Spawning habitat Winter rearing Summer rearing Smolt Carrying Capacity.
Oct. 6, Lecture 9 Population Ecology. Oct. 6, Today’s topics What is population ecology? Population change and regulation – Density independence.
Limited Dependent Variables Ciaran S. Phibbs May 30, 2012.
GG 313 Geological Data Analysis Lecture 13 Solution of Simultaneous Equations October 4, 2005.
Integral projection models
The influence of variable marine survival on fishery management objectives for wild steelhead Dan Rawding & Charlie Cochran.
Sources of Fish Decline Habitat disruption Breeding areas Larval development areas Bottom structure.
Business Statistics for Managerial Decision Farideh Dehkordi-Vakil.
June 30, 2008Stat Lecture 16 - Regression1 Inference for relationships between variables Statistics Lecture 16.
Ecology 8310 Population (and Community) Ecology
Population Ecology. What is a Population? Population - A group of individuals of the same species that live together and interbreed Populations: o Share.
Solving Equations. What are we going to do if we have non-zero values for a, b and c but can't factor the left hand side? This will not factor so we will.
Using distributions of likelihoods to diagnose parameter misspecification of integrated stock assessment models Jiangfeng Zhu * Shanghai Ocean University,
A general covariate based approach for modeling the population dynamics of protected species: application to black footed albatross (Phoebastria nigripes)
1 Climate Change and Implications for Management of North Sea Cod (Gadus morhua) L.T. Kell, G.M. Pilling and C.M. O’Brien CEFAS, Lowestoft.
Pollock’s Robust Design: Extensions II. Quick overview 1.Separation of Recruitment Components in a single patch context (Source-Sink) 2.Separation of.
UALG Statistical catch at age models Einar Hjörleifsson.
S3-1 ADM703, Section 3, August 2005 Copyright  2005 MSC.Software Corporation SECTION 3 SUSPENSION SYSTEM.
Stock-Recruitment Natural Mortality Fishing Mortality ImmigrationEmigration Population Numbers Recruitment.
Continuous logistic model Source: Mangel M (2006) The theoretical ecologist's toolbox, Cambridge University Press, Cambridge This equation is quite different.
Analyses of intervention effects Mark Scheuerell & Eli Holmes FISH 507 – Applied Time Series Analysis 5 March 2015.
LECTURE 13: LINEAR MODEL SELECTION PT. 3 March 9, 2016 SDS 293 Machine Learning.
Delay-difference models. Readings Ecological Detective, p. 244–246 Hilborn and Walters Chapter 9.
Matrix modeling of age- and stage- structured populations in R
Stockholm, Sweden24-28 March 2014 Introduction to MAR(1) models for estimating community interactions This lecture follows largely from: Ives AR, Dennis.
Hierarchical models. Hierarchical with respect to Response being modeled – Outliers – Zeros Parameters in the model – Trends (Us) – Interactions (Bs)
Deterministic elasticity patterns of age-structured animals: A Review Henry F. Mollet Moss Landing Marine Labs and Monterey Bay Aquarium.
X X Population size or Density Births
An introduction to Dynamic Factor Analysis
FW364 Ecological Problem Solving Class 15: Stage Structure
An introduction to Dynamic Linear Models
FISH 507 – Applied Time Series Analysis
Mark Recapture.
Multistate models Lecture 10.
Models used for stock recruits and parent stock
Presentation transcript:

Lecture 17: Multi-stage models with MARSS, etc

Multivariate time series with MARSS We’ve largely worked with: 1. Different time series of the same species 2. Different species from the same community 3. We can also have time series of different age classes from same species

Equations Order of events is important Age or stage structured data? For juvenile / adult dynamics, does survival or reproduction happen first

Mortality first, then reproduction Or modify to include ‘plus group’

Mortality first, then reproduction Survey happens before birth pulse Or modify to include ‘plus group’

Reproduction, then mortality Survey after birth pulse Or modify to include ‘plus group’

Before pulse After pulse

Linear equations -> Leslie matrix models We’ll assume survey after births Transition matrix:

Linear equations -> Leslie matrix models We’ll assume survey after births (and + group) Transition matrix used to project population: This should look very familiar! Similar to

Including multiplicative process error Leslie matrix models generally of the form

We can try to approximate this with MARSS, but several issues arise 1. Errors multiplicative In MARSS they are additive

We can’t just log observed data Taking natural log of both sides doesn’t work

The only option left… Additive error (pop can go negative) In MARSS notation

Constraining B matrix Enter B as list matrix For model without plus group, B=matrix(list(0,"s1","f2",0),2,2)

Example: wolf count data wolf.adults = c(21,12,13,18,25,28,48,46,60,52,46,36,57,48) wolf.pups = c(0,8,19,24,10,37,22,32,38,32,8,39,37,8)

Fitting the model with MARSS dat = rbind(wolf.adults,wolf.pups) leslie = MARSS(dat, model = list(x0=matrix(c(21, 0), nrow=2), Q = "diagonal and unequal", U = "zero", Z = "identity", R = "zero", B=matrix(list(0,"s1","f2",0),2,2)), control=list(allow.degen=FALSE)) Bout =matrix(c(0,leslie$par$B[1,1],leslie$par$B[2,1],0),2,2)

Because the model is not exactly what we want, let’s use JAGS model = cat(" model { # fit the multiplicative leslie matrix model to the wolf data s1 ~ dunif(0,1); # constrain to be 0-1 f1 ~ dnorm(0,1)T(0,); # constrain to be positive q[1] ~ dgamma(0.001,0.001); q[2] ~ dgamma(0.001,0.001); for(t in 2:N) { # this model is written out in the long form predAdults[t] <- wolf.pups[t-1] * s1; predPups[t] <- wolf.adults[t-1] * f1; wolf.adults[t] ~ dnorm(predAdults[t],q[1]); wolf.pups[t] ~ dnorm(predPups[t],q[2]); } ", file = "model.txt") jags.data = list("wolf.adults"=wolf.adults,"wolf.pups"=wolf.pups,"N" = length(wolf.adults)) jags.params=c("s1","f1") model.loc=("model.txt") jags.model = jags(jags.data, inits = NULL, parameters.to.save= jags.params, model.file=model.loc, n.chains = mcmc.chains, n.burnin = mcmc.burn, n.thin = mcmc.thin, n.iter = mcmc.chainLength, DIC = TRUE) attach.jags(jags.model)

Turning these into population growth Calculating eigenvalues g = 0 for(i in 1:length(f1)) { g[i] = max(abs(eigen(matrix(c(0,s1[i],f1[i],0),2,2))$values)) }

Adding multiplicative error model = cat(" model { # fit the multiplicative leslie matrix model to the wolf data s1 ~ dunif(0,1); # constrain to be 0-1 f1 ~ dnorm(0,1)T(0,); # constrain to be positive q[1] ~ dgamma(0.001,0.001); q[2] ~ dgamma(0.001,0.001); for(t in 2:N) { # this model is written out in the long form predAdults[t] <- wolf.pups[t-1] * s1; predPups[t] <- wolf.adults[t-1] * f1; wolf.adults[t] ~ dlnorm(log(max(predAdults[t],0.001))-(1/q[1])/2,q[1]); wolf.pups[t] ~ dlnorm(log(max(predPups[t],0.001))-(1/q[2])/2,q[2]); } } ", file = "model1.txt") jags.data = list("wolf.adults"=wolf.adults,"wolf.pups"=wolf.pups,"N" = length(wolf.adults)) jags.params=c("s1","f1") model.loc=("model.txt") jags.model1 = jags(jags.data, inits = NULL, parameters.to.save= jags.params, model.file=model.loc, n.chains = mcmc.chains, n.burnin = mcmc.burn, n.thin = mcmc.thin, n.iter = mcmc.chainLength, DIC = TRUE) attach.jags(jags.model1)

Adding complexity: multiplicative process error

Adding observation error component model = cat(" model { # fit the multiplicative leslie matrix model to the wolf data s1 ~ dunif(0,1); # constrain to be 0-1 f1 ~ dnorm(0,1)T(0,); # constrain to be positive q[1] ~ dgamma(0.001,0.001); q[2] ~ dgamma(0.001,0.001); true.pups[1] ~ dnorm(0,0.01)T(0,); true.adults[1] ~ dnorm(0,0.01)T(0,); for(t in 2:N) { # this model is written out in the long form predAdults[t] <- true.pups[t-1] * s1; predPups[t] <- true.adults[t-1] * f1; true.adults[t] ~ dlnorm(log(max(predAdults[t],0.001))-(1/q[1])/2,q[1]); true.pups[t] ~ dlnorm(log(max(predAdults[t],0.001))-(1/q[1])/2,q[1]); } tauR ~ dgamma(0.001,0.001); for(t in 2:N) { wolf.adults[t] ~ dlnorm(log(max(true.adults[t],0.001)), tauR); wolf.pups[t] ~ dlnorm(log(max(true.pups[t],0.001)), tauR); } ", file = "model2.txt")

Results now different

Final modification: adding plus group Represents survival of adults -> adults Adds additional parameter to B matrix Useful for species that have age structured data, but we’re fitting stage-structured model to – Wolves live longer than 2 years – Many fish spp very similar (Fish 507, etc)

Adding this to the multiplicative error model model = cat(" model { # fit the multiplicative leslie matrix model to the wolf data s1 ~ dunif(0,1); # constrain to be 0-1 f1 ~ dnorm(0,1)T(0,); # constrain to be positive s2 ~ dunif(0,1); q[1] ~ dgamma(0.001,0.001); q[2] ~ dgamma(0.001,0.001); for(t in 2:N) { # this model is written out in the long form predAdults[t] <- wolf.pups[t-1] * s1 + wolf.adults[t-1] * s2; predPups[t] <- wolf.adults[t-1] * f1; wolf.adults[t] ~ dlnorm(log(max(predAdults[t],0.001))-(1/q[1])/2,q[1]); wolf.pups[t] ~ dlnorm(log(max(predPups[t],0.001))-(1/q[2])/2,q[2]); } } ", file = "model4.txt") jags.data = list("wolf.adults"=wolf.adults,"wolf.pups"=wolf.pups,"N" = length(wolf.adults)) jags.params=c("s1","f1","s2") model.loc=("model4.txt") jags.model4 = jags(jags.data, inits = NULL, parameters.to.save= jags.params, model.file=model.loc, n.chains = mcmc.chains, n.burnin = mcmc.burn, n.thin = mcmc.thin, n.iter = mcmc.chainLength, DIC = TRUE) attach.jags(jags.model4)

Very different inference about population growth

Is population declining? Looks like growing population whose births have fallen as population size increased

Wolf dataset was ideal Estimates of s1 and s2 converged, but there are sometimes convergence issues

Solutions Use informative prior on survival rates from other studies Validate model output from other studies to constrain possible range of parameters

Examples of priors / other studies Include mark-recapture data alongside time series of stage-structured counts Integrated population models

Abadi et al. 2010

Overview Western SSLs have declined Affected by many potential risks: – Changing age structure? – Climate? – Fishing? – Predation? Challenge: no data on time series of vital rates, just time series on animal abundance

Stage structured time series data limited Adult counts – Breeding sites (rookeries) – Non-breeding sites (haul outs) Pup counts – Fewer aerial surveys compared to adults

Leveraging other data Holmes et al also measured 10000s of sea lions to calculate % juvenile Not included as part of statistical model, but used as validation with other data – Pregnancy surveys – Mark-recapture estimates

Non-linear age-structured models In fisheries, maybe the most common form = stock-recruit curves Ricker, Beverton-Holt, Pella-Tomlinson, etc. We’ve used Ricker with MARSS because it is linear – Mark’s DLM lab + homework

Ricker formulation is also a bit odd Spawners appear as both covariate and observed data As an alternative, let’s say we had age structured data on recruits + adults

Chinook spawner-recruit data

We need two models Spawners -> Recruitment – We’ll choose Beverton Holt because it’s nonlinear Recruitment -> Spawners – We’ll assume constant mortality – 3 year lag (overly simplistic)

Implementing the model in JAGS model = cat(" model { # fit the multiplicative leslie matrix model to the wolf data a ~ dnorm(0,1); b ~ dnorm(0,1); M ~ dunif(0,10); q[1] ~ dgamma(0.001,0.001); q[2] ~ dgamma(0.001,0.001); for(t in 1:4) { predS[t]<-0; # first 4 years discarded predR[t]<-0; } for(t in 5:N) { # this model is written out in the long form predR[t] <- Y.S[t-1] * a / (b + Y.S[t-1]); predS[t] <- Y.R[t-1 - 3] * exp(-M); Y.S[t] ~ dlnorm(log(max(predS[t],0.001))-(1/q[1])/2,q[1]); Y.R[t] ~ dlnorm(log(max(predR[t],0.001))-(1/q[2])/2,q[2]); } ", file = "skagitModel.txt") jags.data = list("Y.S"=Y.S,"Y.R"=Y.R,"N" = length(Y.S)) jags.params=c("a","b","M","predS","predR") model.loc=("skagitModel.txt") skagit.model = jags(jags.data, inits = NULL, parameters.to.save= jags.params, model.file=model.loc, n.chains = mcmc.chains, n.burnin = mcmc.burn, n.thin = mcmc.thin, n.iter = mcmc.chainLength, DIC = TRUE) attach.jags(skagit.model) jags.data = list("Y.S"=Y.S,"Y.R"=Y.R,"N" = length(Y.S)) jags.params=c("a","b","M","predS","predR") model.loc=("skagitModel.txt") skagit.model = jags(jags.data, inits = NULL, parameters.to.save= jags.params, model.file=model.loc, n.chains = mcmc.chains, n.burnin = mcmc.burn, n.thin = mcmc.thin, n.iter = mcmc.chainLength, DIC = TRUE) attach.jags(skagit.model)

Fits to spawner data

Diagnostics Fits suggest B ~ 0 = recruitment constant (=a)

Does including observation error improve things?

Summary Can’t overcome bad models Improved / more robust estimates with additional data MARSS package isn’t ideal for dealing with these types of problems