Models spatial trends in a field trial using a two-dimensional spline model (D.B. Baird & E.R. Williams).
Options
PRINT = string tokens |
What to print (description, model, components, means, effects, vcovariance, deviance, waldtests, aic, bic, sic, predictions, monitoring); default desc, mode, comp, wald, aic, bic |
PLOT = string tokens |
What to plot (contour, residuals, shade, surface); default * i.e. nothing |
FIXED = formula |
Fixed model terms; default * i.e. none |
RANDOM = formula |
How to treat the constant term (estimate, omit); default esti |
FACTORAL = scalar |
Limit on the number of factors or covariates in each fixed term; default 3 |
REPLICATES = factor |
Replicate factor, if relevant |
ROWS = factor |
Row factor; default * i.e. must be specified |
COLUMNS = factor |
Column factor; default * i.e. must be specified |
PTERMS = formula |
Terms (fixed or random) for which effects or means are to be printed; default * implies all the fixed terms |
PSE = string token |
Standard errors to be printed with tables of effects and means (differences, estimates, alldifferences, allestimates, none); default diff |
MVINCLUDE = string tokens |
Whether to include units with missing values in the explanatory factors and variates and/or the y-variates (explanatory, yvariate); default * i.e. omit units with missing values in either explanatory factors or variates or y-variates |
MAXCYCLE = scalar |
Limit on number of iterations; default 200 |
VCONSTRAINTS = string token |
Whether to constrain variance components to be positive (none, positive); default posi |
BASIS = string token |
Spline basis to use (thinplate, pspline); default pspl |
KNOTS = scalar, variate or pointer |
Knots to be fitted in spline model, if a scalar, this is the total number of knots to be fitted; if a variate of length 2, this is the number of knots in the ROWS and COLUMNS directions; and if a pointer to 2 variates, these are the values for knots in the ROWS and COLUMNS directions; default – all distinct values of ROWS and COLUMNS |
PENALTYMETHOD = string token |
Which tensor spline penalty to use (isotropic, semiconstrained, unconstrained); default unco |
DEGREE = scalar |
Degree of polynomial used to form the underlying spline; default 3 |
DIFFORDER = scalar |
Differencing order for p-spline penalty; default 1 |
LINEARPLANE = string token |
Whether to include a linear row × column plane in the fixed model when DIFFORDER is one (include, omit); default omit |
PMETHOD = string tokens |
Method of returning predictions (grid, list); default grid |
COLOURS = text or variate |
Colours for the plots; default !t (darkgreen,yellow) |
Parameters
Y = variates |
Y-variate to which the spline surface will be fitted |
PREDICTIONS = pointers or matrices |
Predictions of the spline surface for all combinations of and predictions |
STATISTICS = pointers |
Statistics (deviance, aic, bic, fixed and random degrees of freedom) from the model fit |
TITLE = texts |
Title to use for graphs; default automatically made from the variate identifiers used for Y, ROWS and COLUMNS. |
WINDOW = scalar |
Window number for the graphs; default 3 |
SCREEN = string tokens |
Whether to clear the screen before plotting or to continue plotting on the old screen (clear, keep); default clea |
EXIT = scalars |
Exit code from the REML fit |
SAVE = REML save structures |
Saves the details of each analysis for use in subsequent VDISPLAY and VKEEP directives |
Description
V2DSPLINE
models the trend in a field trial arranged in a row-and-column design using a two-dimensional spline model. The data to be modelled are given in the Y
variate. A row-and-column design is a design where the plots are set out in a rectangular grid. The row and column factors are specified by the ROWS
and COLUMNS
options respectively. Often this is a regular grid, where the rows and columns are equally spaced and there are no gaps, but irregular arrangements can be handled too. Some designs are resolvable. The field can then be divided into sections in which each treatment is replicated once. These replicates can be useful while the experiment is taking place. For example, if several operators are needed to make observations of the plots, it is usual to get each one to observe the plots of a complete replicate. Then any operator differences will be included in the between-replicate variation, and will not add to the variability of the treatment estimates. Of course it can be useful to include a replicate factor even if the “replicates” are not exact, e.g. if some of the treatments do not occur at every level of the replicate factor. The replicate factor, if available, is specified by the REPLICATES
option.
The BASIS
option specifies whether to use p-splines (the default), or thin-plate splines to construct the basis. P-splines are tensor splines formed with the TENSORPLINE
procedure. Thin-plate splines are 2-dimensional cubic smoothing splines, formed using the THINPLATE
procedure.
The positions of the knots used in the basis functions are specified by the KNOTS
parameter. If KNOTS
is not set (the default), all distinct values in ROWS
and COLUMNS
are used as the knot points. Otherwise KNOTS
can be if a scalar, specifying the total number of knots to be fitted; the procedure then uses equi-spaced knots divided proportionally to the number of distinct points in the two directions. Alternatively, KNOTS can be a variate of length 2 specifying the number of equi-spaced of knots in the ROWS
and COLUMNS
directions. Finally, it can be a pointer to 2 variates whose values are used for knots in the ROWS
and COLUMNS
directions.
The degree of polynomial used to form the underlying tensor spline basis functions is specified by the DEGREE
option; default 3. The DIFFORDER
option specifies the differencing order to be used with p-spline models. This determines the strength of the penalty (for a given smoothness parameter). The default is to use first-order differencing. For a p-spline model, the underlying fixed polynomial in each dimension has degree d equal to DIFFORDER
minus 1. If DIFFORDER
=1, there will be no fixed model, but one a fixed polynomial of order 1 can be added using LINEARPLANE
=include. This will model any linear trends over rows or columns.
The tensor-spline basis is constructed via interactions of the one-dimensional spline bases, as detailed in the TENSORSPLINE
procedure. The PENALTYMETHOD
option controls the interaction between the one-dimensional spline bases. An unconstrained penalty (the default) allows a separate smoothing parameter for each term. In this case, the basis pointer has 2d+3 matrices, one for each term. With the semiconstrained penalty, the same smoothing parameter is imposed across the interaction of polynomials in the first dimension with random terms in the second, and for the interaction of random terms in the first dimension with polynomials in the second dimension. An isotropic penalty uses a single common penalty, and the terms are combined into a single matrix.
The FIXED
option specifies the fixed terms to be fitted in the analysis. Commonly this will be a treatment factor giving the genotypes or varieties on each plot. The default fixed model consists of just the constant term, which then becomes the grand mean. The constant term can be omitted by setting option CONSTANT
=omit, provided a fixed model has been specified. The FACTORAL
option sets a limit on the number of factors and variates allowed in each fixed term (default 3); any term containing more than that number is deleted from the model.
The RANDOM
option allows you to specify any extra random terms to include, e.g., if you wished to set the treatment factor, genotype, as random effect, you would use RANDOM
= genotype. The VCONSTRAINTS
option allows you to constrain the variance components to be positive (the default); or have no constraints (none). The model fitting is less likely to be successful if there are no constraints.
The PRINT
option selects the output to be displayed:
description | description of the data and spline basis to be fitted, |
model | description of model fitted, |
components | estimates of variance components and estimated parameters of covariance models, |
means | predicted means, |
effects | estimates of the fixed and random effects, |
vcovariance | variance-covariance matrix of the estimated components, |
deviance | deviance of the fitted model (−2 × log-likelihood RL), |
waldtests | Wald tests for fixed terms, |
missingvalues | estimates of missing values, |
aic | the Akaike information coefficient, |
bic or sic (synonyms) | the Schwarz (Bayesian) information coefficient, |
predictions | the estimated values of the two-dimensional spline surface, and |
monitoring | monitoring information from the REML analysis |
The EXIT
parameter saves a scalar containing a non-zero exit code from REML
if the fit failed (−2, −1 or 1…8) and zero otherwise.
The SAVE
parameter can be used to name the REML
save structure for use with later VKEEP
, VDISPLAY
and VPREDICT
directives, or VCHECK
, VGRAPH
, VLSD
and VPLOT
procedures.
The PREDICTIONS
parameter can save predictions and fitted values from the fitted spline model. If option PMETHOD
=list, PREDICTIONS
returns three columns giving the rows, columns and estimated values, while if PMETHOD
=grid the estimated values are returned in a matrix (which may have missing values for row and column combinations that do not occur). The STATISTICS
parameter can supply a pointer to save the deviance, aic, bic, fixed and random degrees of freedom in scalars from the analysis. The pointer has labels ‘Deviance’, ‘AIC’, ‘BIC’, ‘FixedDF’ and ‘RandomDF’.
The PLOT
option specifies which plots to display, with settings:
contour | for a contour plot, |
residuals | for the residuals as a shade plot in field layout, |
shade | for a shade plot, and |
surface | for a surface plot. |
By default nothing is plotted. The COLOURS
option specifies a text or variate to define the colours to use. (This is used as the setting of the PENFILL
parameter of DCONTOUR
and DSURFACE
or the PEN
parameter of DSHADE
.) The default is a text containing the values ‘darkgreen’ and ‘yellow’. The TITLE
, WINDOW
and SCREEN
parameters control the title, window and whether a new plot is started in similar manner to those used in DCONTOUR
, DSHADE
and DSURFACE
. Note that if more than one plot is produced, SCREEN
=keep will cause these to over-plot each other in the same window. Also, if there are missing values in PREDICTION
, only a shade plot can be produced.
Options: PRINT
, PLOT
,FIXED
, RANDOM
, CONSTANT
, FACTORIAL
, REPLICATES
, ROWS
, COLUMNS
, PTERMS
, PSE
, MVINCLUDE
, MAXCYCLE
,VCONSTRAINTS
,BASES
, KNOTS
, PENALTYMETHOD
, DEGREE
, DIFFORDER
, LINEARPLANE
, PREDICTIONS
, PMETHOD
, COLOURS
Parameters: Y
, PREDICTIONS
, STATISTICS
, TITLE
, WINDOW
,SCREEN
,EXIT
, SAVE
Method
V2DSPLINE
forms the spline basis functions using the THINPLATE
or TENSORSPLINE
procedures, and fits these using REML
.
Action with RESTRICT
There must be no restrictions on Y
, REPLICATES
, ROWS
and COLUMNS
, or on the factors or variates in the FIXED
and RANDOM
models.
Reference
Durbán, M., Hackett, C.A., NcNicol, J.W., Thomas, T.B. & Currie, I.D. (2003). The practical use of semiparametric models in field trials. Journal of Agricultural, Biological and Environmental Statistics, 8, 48–66. https://doi.org/10.1198/1085711031265
Piepho, H.P., Boer, M.P. & Williams, E.R. (2022). Two-dimensional P-spline smoothing for spatial analysis of plant breeding trials. Biometrical Journal, 1–23.
https://doi.org/10.1002/bimj.202100212
Rodríguez-Álvarez, M.X., Boer, M.P., van Eeuwijk, F.A. & Eilers, P.H. (2018). Correcting for spatial heterogeneity in plant breeding experiments with P-splines. Spatial Statistics, 23, 52–71.
https://doi.org/10.1016/j.spasta.2017.10.003
See also
Directives: REML
Procedures: VAROWCOLUMNDESIGN
, VSURFACE
, THINPLATE
,TENSORSPLINE
,
GenStat Reference Manual 1 Summary section on: REML analysis of linear mixed modelsRegression analysis.
Example
CAPTION 'V2SPLINE examples'; STYLE=meta198)',\ SPLOAD '%Data%/Wheat22x15.gsh'; ISAVE=pData V2DSPLINE [PLOT=contour,res; REPLICATES=Rep; ROWS=Row; COLUMNS=Column; \ FIXED=RowGrp + ColGrp + Genotype; PTERMS=Genotype] Yield; \ TITLE='Wheat 22 x 15 trial (LVIS model: difforder=1, degree=1)' V2DSPLINE [PLOT=contour,res; REPLICATES=Rep; ROWS=Row; COLUMNS=Column; \ FIXED=RowGrp + ColGrp + Genotype; DIFFORDER=2; DEGREE=3] Yield; \ TITLE='Wheat 22 x 15 trial (SpATS model: difforder=2, degree=3)' CAPTION 'Barley trial in 16 x 34 grid'; STYLE=major SPLOAD '%Data%/DurbanBarley.gsh'; ISAVE=pData V2DSPLINE [REPLICATES=Rep; ROWS=Row; COLUMNS=Column; FIXED=Genotype] Yield CAPTION 'Alliance wheat trial in 11 x 22 grid'; STYLE=major SPLOAD '%Data%/AllianceWheat.gsh'; ISAVE=pData V2DSPLINE [PLOT=shade; ROWS=Row; COLUMNS=Column; RANDOM=Genotype] Yield; \ TITLE='Alliance wheat trial (genotypes random)' V2DSPLINE [PLOT=shade; ROWS=Row; COLUMNS=Column; RANDOM=Genotype; \ BASIS=thinplate] Yield; TITLE='Alliance wheat trial (thin-plate spline)'