When Spatial Variation Matters

Field trials often contain spatial patterns that are not fully captured by the experimental design. These patterns can affect the comparisons between varieties or treatments. Mixed models provide a flexible way to represent that spatial structure, assess the model and refine it where needed.

A field trial is designed to answer a question. Which varieties perform best? Which treatments differ? Which lines are worth taking forward?

Yet every observation used to answer that question also has a physical position in the field.

Conditions can vary across an experimental area. Plots close to one another can behave more similarly than plots further apart, and patterns can run along rows, columns or across larger areas of a field.

Environmental variation is inevitable in field trials. What matters is whether it has spatial structure that should be represented in the statistical model. If residual variation follows a spatial pattern, assuming that every plot has an independent residual error may not adequately represent the data.

This is where spatial mixed models become very useful.

When neighbouring plots aren’t statistically independent

Many statistical models assume residual errors are independent.

Even if varieties, treatments and other experimental terms are accounted for, plots that are close together may still have correlated residuals. 

Mixed models provide a way to model this residual correlation.

One commonly used approach in field-trial analysis is a first-order autoregressive, or AR1, correlation structure. In simple terms, it allows correlation to be strongest between neighbouring observations and to decrease as the observations become further apart.

For a trial laid out as a rectangular grid, that principle extends to two dimensions. An AR1 × AR1 structure can represent residual correlation along both rows and columns.

But that doesn’t mean AR1 × AR1 is the right model for every field trial.

Spatial correlation can extend across rows and columns, with plots closer together tending to be more strongly correlated than those further apart.
Spatial correlation can extend across rows and columns, with plots closer together tending to be more strongly correlated than those further apart.

Different experiments may have different spatial patterns, which can call for different spatial correlation structures. And even when a model captures one important pattern, the residuals may reveal another that has not yet been adequately represented.

That is where statistical judgement comes in.

Spatial analysis is not a one-model solution

Treating spatial analysis as a standard correction can make it sound deceptively simple: identify spatial variation, add a spatial model and move on.

In practice, the model needs to be assessed in the context of the experiment and the patterns observed in the data. That can mean fitting plausible spatial structures, comparing alternative models and examining the residuals for patterns that remain unexplained.

Fit → diagnose → compare → refine.

Not because a more complicated model is necessarily better, but because the first plausible model is not necessarily the final one.

A large wheat trial provides a good example of this concept in action.

525 test lines in a field that isn’t uniform

In an early‐generation wheat trial at Tullibigeal in south‐western New South Wales, 525 test lines were evaluated.

Lines were randomly allocated to plots in a 67-row × 10-column grid. A check line was included at regular intervals throughout the field, and a further six commercial varieties were replicated between three and five times.

The purpose was practical. Trials such as this were used to identify and retain about the top 20% of lines for further testing.

So the analysis has to do a job. Hundreds of candidate lines need to be evaluated, most of them unreplicated, with plots occupying different positions across the field. 

The spatial analysis began with an AR1 model in one direction: residuals from plots in neighbouring rows within each column were assumed to be correlated, with the correlation decreasing as plots became further apart. The fitted model indicated substantial spatial correlation in this direction. 

The analysis was then extended to include AR1 correlation in the other field direction, across columns. Including this second spatial component improved the fit of the model. The change in REML log-likelihood was significant (χ² = 12.46, P < 0.001), providing evidence that residual correlation across columns was also important in this trial.

Importantly, the second spatial dimension was not included simply because a more complex model could be fitted but because the comparison between the models provided evidence that it was needed.

And the data still had more to reveal.

Fitting the spatial model isn’t the end

A variogram looks at residual variation in relation to the spatial separation between observations. It can help identify spatial patterns that haven’t been adequately represented by the fitted model and inform further model development.

In the wheat trial, it did exactly that.

Despite modelling autoregressive correlation across rows and columns, the variogram indicated a linear trend from column 1 to column 10.

Tullibigeal wheat trial: variograms before (left) and after (right) adding a linear column effect.
Tullibigeal wheat trial: variograms before (left) and after (right) adding a linear column effect.

The model was then refined by including a linear effect of column number to account for this trend. This linear effect was significant (p = 0.0047), and the subsequent variogram was more satisfactory. 

Further model development also considered whether an additional “nugget” effect was needed to represent residual variation that was not spatially correlated.

The exact sequence of models isn’t the important part. This isn’t a recipe to apply to the next field trial.

What matters is the process. One spatial structure accounted for part of the variation. Model comparison supported extending it, and residual diagnostics then indicated another feature that needed to be considered.

Spatial analysis therefore requires enough modelling flexibility to respond to the structure evident in the experiment and the data.

The goal isn’t the most complex model

A more complex model doesn’t necessarily mean a better analysis.

Spatial modelling should be informed by the experimental design, biological and agronomic understanding, model comparison and diagnostics. An unnecessarily complicated variance structure is no more desirable than an overly simple model that fails to represent important structure in the data.

The aim is to represent the important features of the experiment appropriately.

And spatial variation may be only one part of the structure that needs to be modelled.

Mixed models can bring variety or treatment effects together with design terms, covariates and appropriate variance and correlation structures. In the Tullibigeal analysis, for example, variety was fitted as a random effect and weed as a covariate while the residual spatial model was developed.

This ability to model different parts of the experimental structure together is important for complex field trials. The analysis shouldn’t have to be simplified because of limitations of the software.

What happens when the first model isn’t enough?

That is an important consideration when choosing software for field-trial analysis.

Can it represent residual correlation in different directions? Can you fit and compare alternative variance and correlation structures? Can you incorporate trends and other experimental terms? Can you examine the residuals and refine the model when the evidence suggests that something remains unexplained?

These capabilities are central to spatial analysis. They provide the flexibility needed to develop a model that appropriately represents the experiment and the structure in the data, so that comparisons between varieties or treatments are as reliable and informative as possible.

This is exactly the kind of modelling problem ASReml was designed to address.

Field-trial analysis may require residual correlation in different directions, alternative variance and correlation structures, trends, other experimental terms, diagnostics and prediction.

ASReml has a long history of mixed-model analysis in biological, agricultural and genetic research. Its value for field-trial analysis goes beyond being able to fit an AR1 × AR1 model. The broader mixed-model framework allows spatial correlation structures to be fitted alongside treatment or variety effects, design terms, covariates and other sources of variation.

Bringing ASReml into Python

ASReml-Python takes that proven and trusted mixed model capability directly into Python.

You can specify spatial variance and correlation structures, fit mixed models using REML, examine diagnostics such as sample variograms and generate predictions from the fitted model.

The two-dimensional autoregressive residual structure used in the Tullibigeal analysis, for example, can be specified as:

residual = “ar1v(Row):ar1(Column)”

The interesting part here is not that this can be written in one relatively concise line of Python. It’s the modelling capability behind it.

If you already work in Python, specialist mixed-model analysis can sit within the same wider environment you use to prepare, explore and visualise your research data.

If you already use ASReml, ASReml-Python provides another way to bring that methodology into wider analytical workflows.

As research organisations adopt Python more widely, ASReml-Python allows them to work within the broader Python ecosystem while retaining the modelling flexibility needed for complex biological data.

Modelling the field as well as the treatments

The Tullibigeal example illustrates why spatial modelling matters in practice. The aim is not simply to account for variation across the field, but to do so in a way that improves the analysis of the varieties or treatments the trial was designed to compare.

ASReml-Python brings ASReml’s mixed-model methodology into Python, providing the modelling flexibility needed for complex field-trial data within a wider Python workflow.

Explore spatial modelling with ASReml-Python:

Picture of The VSNi Team
The VSNi Team

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Related articles

A genotype that leads one trial can lose its advantage in the next, even when trials sit within...
Experimental and observational studies can both provide valuable insights, but they answer different kinds of questions. This article...
Spatial variation can affect comparisons between varieties or treatments in field trials, but there is no single model...