Ecological time series in R
Ecological time series are short. Thirty annual counts is a long record, sixty is a luxury, and almost every method on this page was developed in a field where ten thousand points is a small data set. That mismatch is not a detail. It is the reason a technique that behaves impeccably in a textbook can return a confident, meaningless answer on a monitoring series, and it is why every tutorial here comes with a measured limit rather than a recipe.
This page collects every time series tutorial on this site, from the dependence that breaks ordinary regression to the methods that try to read dynamics out of a single run of numbers.
Dependence is not a nuisance parameter
The first thing autocorrelation does is destroy your sample size. Fifty correlated points carry the information of far fewer independent ones, so a confidence interval computed as though they were independent is too narrow, and a test between two series rejects far too often. Two entirely unrelated series, each with its own memory, will correlate. That is not a rare pathology, it is the default, and it is the single most common way an ecological time series analysis goes wrong.
Every diagnostic here falsifies, none confirms
This is the theme that ties the page together. Different processes can produce identical second-order structure: the autocorrelation function cannot tell a cycle from red noise, a spectral peak can appear in a system with no cycle at all, and passing every residual check means only that this particular fault was not found. A time series diagnostic can rule a model out. It never rules one in, and the honest report says which alternatives were tested rather than which checks were passed.
That has a practical shape. A periodogram peak means nothing against a white noise null, because ecological series are red: the correct null is an autoregressive process, and against that null most peaks stop being remarkable. A wavelet map is thousands of tests at once, so a large significant patch is what the null model produces on average. And an early warning indicator that rises before a collapse is a hypothesis about the future, not a forecast of it.
When the answer is nonlinear
If the dynamics are nonlinear, fitting a linear model and reading its coefficients answers a question you did not ask. Empirical dynamic modelling takes the other route: reconstruct the attractor from the series itself and forecast by analogy, with no equation. It can separate deterministic dynamics from noise with the same autocorrelation, and it can point at causality using convergence rather than correlation. It also demands more data than most ecological records contain, which is exactly the tension this page keeps returning to.
More than one species
A community time series can be fitted as one linear autoregressive model, and its interaction matrix converts into stability metrics: return rate, reactivity, variance ratios. The arithmetic is short. The problem is that every one of those metrics inherits every error in the fit, and observation error in particular drags them all towards calm, while the residual diagnostics stay perfectly quiet about it.
The tutorials
Dependence comes first
- Temporal autocorrelation and effective sample size - what dependence does to your n, and the spurious regression it invites.
- Fitting ARIMA models - order selection, forecasting, and the cost of over-differencing.
- Checking a time series model - residual whitening, prewhitening a cross-correlation, and why every check only falsifies.
Counts as a process
- Detecting density dependence - the regulation question, and why the naive test over-rejects.
- Gompertz state-space model - separating process noise from observation error with a hand-coded Kalman filter.
- Estimating population trends - one linear rate can hide a crash and a recovery.
- The theta-logistic model - the shape of density dependence, and how little one series identifies it.
Cycles: are they there, and when
- Spectral analysis of population cycles - the periodogram, smoothing, aliasing, and the red-noise null.
- Wavelet analysis of population cycles - the Morlet transform by hand, for cycles that come and go.
- Wavelet significance and the red noise null - a map of thousands of tests, and why you test patches rather than pixels.
- Wavelet coherence and phase - do two series cycle together, and which one leads.
- Checking a wavelet analysis - the scale bias, an event posing as a cycle, and the resolution knob.
Nonlinear dynamics without a model
- Simplex projection and delay embedding - rebuilding the attractor from one series, and separating chaos from red noise.
- The S-map and state dependence - a nonlinearity test with one knob, and the interaction coefficients it returns.
- Convergent cross mapping - causality read from the driven series, and why convergence is the evidence.
- Checking an empirical dynamic model - series length, shared drivers, and the synchrony that defeats the test.
A whole community at once
- Fitting a MAR(1) model - a multivariate autoregression for a community, and what the single-species shortcut answers instead.
- Interaction strengths from time series - what a coefficient means, and what a shared environment does to it.
- Community stability from a MAR(1) model - return rate, reactivity and variance ratios by hand.
- Checking a MAR(1) model - observation error makes a community look stable, and the residuals stay silent.
Tipping points
- Early warning signals and critical slowing - rising autocorrelation and variance before a fold bifurcation.
- Detrending and bandwidth - the same series, defensible choices, and an indicator that flips sign.
- Spatial early warning signals - variance and Moran’s I in space, and the other causes of the same pattern.
- Checking early warning signals - a surrogate null, and the false alarms of the naive trend test.
Where this connects
- Bootstrapping dependent data resamples blocks rather than points, which is what dependence forces.
- Repeated measures and temporal correlation is the same dependence inside a mixed model.
- Generalised least squares for spatial data is the spatial twin of the same correction.
- Block maxima and the GEV asks about the extremes of a series rather than its average behaviour.
- Population models in R reads the same populations through the life cycle instead.
- Causal inference in ecology with R asks the same causal question from a design rather than from dynamics.