Many species live in landscapes made up of discrete habitat patches. Local populations may go extinct due to stochastic or deterministic events, but the species can persist at the regional level if colonisation of empty patches occurs frequently enough.
In 1969, Richard Levins proposed a simple and elegant model to capture these dynamics. His metapopulation model assumes that there are an infinite number of patches and that each patch is either:
The change in the proportion of occupied patches over time is given by the differential equation:
\[ \frac{dp}{dt} = c \cdot p \cdot (1 - p) - e \cdot p \]
Where:
The model reaches equilibrium when:
\[ p^* = 1 - \frac{e}{c} \]
This exercise explores this model using R, helping you understand:
We will use the following R function to simulate the model. Copy and paste it into R to make it available.
levins_model <- function(p0, c, e, t_max, dt = 0.01) {
times <- seq(0, t_max, by = dt)
p <- numeric(length(times))
p[1] <- p0
for (i in 2:length(times)) {
dp <- c * p[i - 1] * (1 - p[i - 1]) - e * p[i - 1]
p[i] <- p[i - 1] + dp * dt
}
data.frame(time = times, occupancy = p)
}
To simulate the model, choose values for the initial occupancy
(p0), colonisation rate (c), extinction rate
(e), and total simulation time (t_max). The
function will return a time series of patch occupancy. You can then plot
this to observe how the metapopulation changes over time.
# Define parameters
p0 <- 0.2 # initial proportion of occupied patches
c <- 0.3 # colonisation rate
e <- 0.2 # extinction rate
t_max <- 50 # total time to simulate
# Run the model
result <- levins_model(p0, c, e, t_max)
# Plot the results
plot(result$time, result$occupancy, type = 'l', col = 'blue', lwd = 2,
xlab = "Time", ylab = "Proportion of Occupied Patches",
main = paste("Levins Model: c =", c, ", e =", e))
# Add theoretical equilibrium line
abline(h = 1 - e / c, col = 'red', lty = 2)
This will give you a curve showing how the proportion of occupied patches changes over time, along with a dashed line indicating the expected equilibrium.
When that is working, try running the model using different combinations of colonisation and extinction rates. Predict what will happen to occupancy over time. Then run the model and check your predictions.
For example:
| Scenario | Colonisation Rate (c) | Extinction Rate (e) | Expected Equilibrium \(p^* = 1 - \frac{e}{c}\) |
|---|---|---|---|
| A | 0.1 | 0.2 | Extinction (c < e) |
| B | 0.3 | 0.3 | 0.00 (extinction) |
| C | 0.6 | 0.2 | 0.67 |
Try some others…
Reflection:
How does the starting occupancy affect the long-term dynamics?
Use the same code. This time, try setting colonisation rate
(c) and extinction rate (e) to be 0.5 and 0.2
respectively. Then run the model with different starting values (‘p0’)
(these can vary between just above 0 and 1).
Reflection:
This exercise focuses on one of the theoretical predictions of the Levins model:
\[ p^* = 1 - \frac{e}{c} \]
You’ll explore how equilibrium occupancy changes as the colonisation rate \(c\) varies, while the extinction rate \(e\) stays fixed.
e <- 0.2
c_vals <- seq(0.05, 1, by = 0.01)
p_eq <- 1 - e / c_vals
p_eq <- ifelse(p_eq < 0, 0 ,p_eq)
plot(c_vals, p_eq, type = "l", col = "blue", lwd = 2,
xlab = "Colonisation rate (c)", ylab = "Equilibrium occupancy (p*)",
main = "Theoretical Equilibrium Occupancy")
abline(v = e, col = "red", lty = 2) # extinction threshold line
eBy now, you should understand:
This simple model offers a foundation for more complex spatial and stochastic models in conservation biology.