Download presentation
Presentation is loading. Please wait.
Published byColeen Annabel Carr Modified over 9 years ago
1
Implementing the MAR-1 Algorithm A conceptual walkthrough
2
Steps for Implementing MAR-1 models Ecological decisions Data formatting Data transformations Model selection Estimated MAR-1 parameter given model Model fit metrics, model fit diagnostics Stability properties Bootstrap confidence intervals
3
Step 1: Make ecological decisions What interactions are you interested in? Do you have enough data?
4
Step 1: Make ecological decisions Insects Plants Birds Are you missing major players in your community?
5
Step 1: Make ecological decisions Variate Covariate Make apriori decisions to simplify the foodweb based on ecological knowledge about the system.
6
Step 1: Make ecological decisions rainfall temperature hunting pressure date years since last fire rabies prevalence storm frequency road density What are the important abiotic covariates?
7
Step 1: Complex system reduced to a smaller set of variates and covariates to address the interactions of interest
8
Step 2: Format the data No missing values One column for each variate and covariate One row for each time step
9
Step 3: Transform the data LN Counts for species should be transformed by the natural logarithm.
10
Step 3: Transform the data LN You may need to transform by z-scores also if the data are on very different scales. Z
11
Step 3: Specify the relationship between the co-variates and the rates of growth Spp covariates would be ln transformed to be consistent with the MAR framework The relationship for biotic covariates is system specific
12
Step 3: Transform the co-variates ? The transformation for the abiotic covariates is determined by the relationship between covariates and spp growth rates. The best transformation is not necessarily a natural logarithm.
13
Step 4: Choose the Model Selection Method Compare a specified set of candidate models testing a set of particular hypotheses want to use a restricted set of prior models (over which the best is picked or over which models are averaged).
14
Step 4: Choose the Model Selection Method Compare a specified set of candidate models testing a set of particular hypotheses want to use a restricted set of prior models (over which the best is picked or over which models are averaged). Search over the set of all possible models constrain models by known interactions rank models by a model selection metric (such as AIC or BIC) select the best fit model or use a model average
15
Step 4: Choose a model comparison approach Compare a specified set of candidate models HawksFoxesLizardsSnakes Hawks Foxes Lizards Snakes 1 1 1 11 11 000 00 0 0 0 0 Rainfall Hawks Foxes Lizards Snakes 0 1 0 1 Mice 1 1 1 0 Insects 0 0 0 1 HawksFoxesLizardsSnakes Hawks Foxes Lizards Snakes 1 1 1 11 11 101 11 0 1 1 1 Rainfall Hawks Foxes Lizards Snakes 0 1 0 1 Mice 1 1 1 0 Insects 0 0 0 1 Sparse model Full model
16
Search over all models and choose the best Step 4: Choose a model comparison approach
17
A. Begin with a proposed model (randomly selected) 1 = included interaction 0 = excluded interaction Step 4: Choose a model comparison approach HawksFoxesLizardsSnakes Hawks Foxes Lizards Snakes 1 1 1 11 11 101 11 0 1 1 1 Rainfall Hawks Foxes Lizards Snakes 0 1 0 1 Mice 1 1 1 0 Insects 0 0 0 1
18
Step 5: Iterate through the possible models (CLS method) A. Begin with a proposed model (randomly selected) B. Perform a CLS regression on the proposed model to get values for the included interactions HawksFoxesLizardsSnakes Hawks Foxes Lizards Snakes 0.25 0.79 0.55 0.61-0.51 0.090.22 000 00 0 0 0 0 Rainfall Hawks Foxes Lizards Snakes 0 0.05 0 0.11 Mice 0.11 0.05 0.21 0 Insects -0.15 0.27 0 0.55
19
Step 5: Iterate through the possible models (CLS method) C. Use this model to compute the Akaike or Bayesian Information Criterion for that model (AIC or BIC) A. Begin with a proposed model (randomly selected) B. Perform a CLS regression on the proposed model to get values for the included interactions
20
Step 5: Iterate through the possible models (CLS method) D. Randomly change one matrix element to its opposite HawksFoxesLizardsSnakes Hawks Foxes Lizards Snakes 1 1 1 11 11 000 00 0 0 0 0 Rainfall Hawks Foxes Lizards Snakes 0 1 0 1 Mice 1 1 1 0 Insects 1 1 0 1 HawksFoxesLizardsSnakes Hawks Foxes Lizards Snakes 1 1 1 11 11 000 00 0 0 1 0 Rainfall Hawks Foxes Lizards Snakes 0 1 0 1 Mice 1 1 1 0 Insects 1 1 0 1
21
Step 5: Iterate through the possible models (CLS method) D. Randomly change one matrix element to its opposite E. Re-run the CLS regression, find the AIC or BIC, and compare
22
Step 5: Iterate through the possible models (CLS method) G. If the new model has a lower AIC/BIC, keep it. Otherwise, keep the old one. D. Randomly change one matrix element to its opposite E. Re-run the CLS regression, find the AIC or BIC, and compare
23
Step 5: Iterate through the possible models (CLS method) G. If the new model has a lower AIC/BIC, keep it. Otherwise, keep the old one. D. Randomly change one matrix element to its opposite E. Re-run the CLS regression, find the AIC or BIC, and compare H. Repeat hundreds of times, until you have the model that generates the lowest possible AIC
24
Step 5: Iterate through the possible models (CLS method) I.The search procedure finds the model that best explains the data with the lowest AIC or BIC HawksFoxesLizardsSnakes Hawks Foxes Lizards Snakes 0.89 0.54 0.15 0.39-0.51 00.27 000 0-0.28 0 0.14 0 0 Rainfall Hawks Foxes Lizards Snakes 0 -0.04 0 0.11 Mice 0.54 0.15 0.21 0 Insects -0.11 0.18 0 0.56
25
Step 6: Compute stability properties Once you know the interaction matrix, and the covariance matrix, you can compute the stability properties of the stationary distribution X
26
Step 6: Compute stability properties Variance of the stationary distribution eigenvalues det(B) 2/p
27
Step 6: Compute stability properties Variance of the stationary distribution eigenvalues det(B) 2/p Return time to the stationary distribution max( B ) max( B B )
28
Step 6: Compute stability properties Variance of the stationary distribution eigenvalues det(B) 2/p Return time to the stationary distribution max( B ) max( B B ) Reactivity of the stationary distribution max( BB )-1 -tr( )/tr(V )
29
Step 7: Bootstrap re-sampling To obtain CIs on the parameter estimates, one can perform bootstrap re-sampling.
30
Step 7: Bootstrap re-sampling To obtain CIs on the parameter estimates, one can perform bootstrap re-sampling Basically, you scramble up the E t matrices To create a bootstrapped E time series From which you create a bootstrapped X time series X t = A + B X t -1 + C U t-1 + E t
31
Step 7: Bootstrap re-sampling To obtain CIs on the parameter estimates, one can perform bootstrap re-sampling Repeat thousands of times to create thousands of bootstrapped data sets From each bootstrapped data set, one re- estimates the A, B, and C matrices to get bootstrapped confidence intervals X t = A + B X t -1 + C U t-1 + E t
32
Step 7: Bootstrap estimates example HawksFoxesLizardsSnakes Hawks Foxes Lizards Snakes 0.25 (0.20,0.30) 0.79 (0.59, 0.99) 0.55 (0.43, 0.67) 0.61 (0.54, 0.68)-0.51 (-0.62, -0.40) 0.09 (0.07, 0.11)0.22 (0.16, 0.28) 000 0.07 (-0.03, 0.17)0 0.05 (0.01, 0.09) 0 0 0 Means with 95% CI ranges (made up example) Can obtain CIs on A and C matrices and on all the stability metrics also in the same way.
33
DataTransformations Type of model selection Manually specify model Search over all model possibilities Estimate A, B, & C matrices Estimate stability metrics, model fit diagnostics, and model selection metrics Bootstrap to obtain bootstrapped CIs Use simulation to test robustness of assumptions
34
That’s a lot of work. It would be nice if there was a computer program that could do it all for you….
35
There is! (We will show it to you after lunch and use it in the hands-on section.)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.