This archive contains Matlab functions and scripts for Bayesian estimation of Markov models for coral reef states, as described in Lowe et al. (unpublished). Empirical models of transitions between coral reef states: effects of regions, marine protected areas, and environmental change scenarios

REQUIREMENTS

Matlab, with the Statistics Toolbox.

Tested with Matlab Version 7.9.0.529 (R2009b)
Statistics Toolbox Version 7.2
Operating system Linux 2.6.26-2-686.

EXAMPLE

Start Matlab and run example_script.m to do the following:

-load a simulated data set. This is a comma-separated text file with columns reefid (a unique integer identifier for each reef), year (here, the years are integers starting at zero, and proportional cover of coral, algae, and others (everything else). These is based on the initial values and time series lengths for a real data set, but are generated using a stochastic version of the differential equation model described in Mumby et al (2007), Nature 450:98-101. See Zychaluk et al (unpublished), Modelling regional coral reef dynamics without mechanistic assumptions, for more details.

-produce a plot of coral and algal cover, with the boundaries between a set of reef states.

-count transitions between reef states, and obtain a Bayesian estimate of a discrete-time Markov model for these transitions.

-produce plots of the posterior distributions of transition probabilities, trajectories of coral and algal cover, and stationary distributions of state probabilities.

-perform a likelihood ratio test for homogeneity between two time periods (here, arbitrarily defined as times 0-2 and 3 or greater).

-look at the effects of changing transition probabilities along a scale from unfavourable to favourable to coral, using a multinomial logit model for transitions out of each state, and arbitrary coefficients.

LICENSE

 This file is part of coralMarkov.

    coralMarkov is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    coralMarkov is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with coralMarkov.  If not, see <http://www.gnu.org/licenses/>.

See gpl-3.0.txt for full information.


