Final thoughts
Spatial analysis can be challenging, but I think it is worth the effort to learn and implement in analysis of field trials. Incorporating spatial statistics into analysis of feel trials can be overwhelming at time. However, investigating spatial correlation in a field trial and controlling for it if necessary using any of the methods developed for this is recommended over doing nothing.
There is no denying that work is needed to develop scripts that automate this process so researchers can routinely incorporate spatial covariance into field trial analysis. Many current R tools are unwieldy to use and have insufficient options to support variety trial analysis.
Until this situation is improved, it is probably wisest to focus on using spatial models that are well-supported at this time. Any of the options implemented in the nlme package (or that work with that package) are decent choices with excellent support for extracting least-squares means, running ANOVA, and standard model diagnostics. Furthermore, nlme supports generalized linear models. INLA is established is supported by a large and growing user base, and breedR is likewise well established.
Other resources
Incorporating Spatial Analysis into Agricultural Field Experiments, a more comprehensive version of this tutorial
CRAN task view on analysis of spatial data
Other R packages
package | usage |
---|---|
breedR | mixed modelling with AR1xAR1 estimation |
inla | Bayesian modelling with options for spatial covariance structure |
Mcspatial | nonparametric spatial analysis, (no longer on CRAN) |
ngspatial | spatial models with a focus on generalized linear models |
sommer | mixed models, including an AR1xAr1 model |
spamm | Matérn covariance structure |
spANOVA | spatial lag models for field trials |
spatialreg | spatial functions for areal data |
The package sommer implements a version of the AR1xAR1 covariance structure. However, it does not estimate the parameter $\rho$. The user must specify the $\rho$ and that value is not optimized in the restricted maximum likelihood estimation. Both BreedR and inla implement an AR1xAR1 covariance structure. Additional, SAS and the proprietary software asreml can implement a mixed model with this covariance structure.
Books for the deep dive
Applied Spatial Data Analysis with R, available for free
Spatio-Temporal Statistics With R (also free)