plot.SpATS: Default SpATS plotting

View source: R/plot.SpATS.R

plot.SpATSR Documentation

Default SpATS plotting

Description

Takes a fitted SpATS object produced by SpATS() and plots six different graphics (see Details).

Usage

## S3 method for class 'SpATS'
plot(x, all.in.one = TRUE, main = NULL, annotated = FALSE, 
	depict.missing = FALSE, spaTrend = c("raw", "percentage"), ...)

Arguments

x

an object of class SpATS as produced by SpATS().

all.in.one

logical. If TRUE, the four plots are depicted in one window. Default is TRUE

main

character string specifying the main title to appear on the plot. By default (i.e. when main = NULL), the variable under study is incorporated in the title of the plot.

annotated

logical. If TRUE, the variable under study and the models used is added to the plot. Only applied when argument all.in.one is TRUE.

depict.missing

logical. If TRUE, the estimated spatial trend is depicted for all plots in the field, even for those with missing values.

spaTrend

a character string indicating how the spatial trend should be displayed. Either "raw" (original scale), or "percentage". If 'percentage', the estimated spatial trend is scaled (i.e., divided by the average of the observed response variable of interest across the field) and results are shown as a percentage.

...

further arguments passed to or from other methods. Not yet implemented.

Details

The following graphics are depicted: the raw data, the fitted data (on the response scale), the (deviance) residuals, the (original scaler or in percentage) estimated spatial trend (excluding the intercept), the genotypic BLUEs (or BLUPs) and their histogram. Except for the histogram, the plots are depicted in terms of the spatial coordinates (e.g., the rows and columns of the field).

References

Rodriguez-Alvarez, M.X, Boer, M.P., van Eeuwijk, F.A., and Eilers, P.H.C. (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

SpATS

Examples

library(SpATS)
data(wheatdata)
wheatdata$R <- as.factor(wheatdata$row)
wheatdata$C <- as.factor(wheatdata$col)

m0 <- SpATS(response = "yield", spatial = ~ SAP(col, row, nseg = c(10,20), degree = 3, pord = 2), 
 genotype = "geno", fixed = ~ colcode + rowcode, random = ~ R + C, data = wheatdata, 
 control =  list(tolerance = 1e-03))

# Default plotting
plot(m0)
# Annotated
plot(m0, annotated = TRUE, main = "Wheat data (Gilmour et al., 1997)")

SpATS documentation built on Nov. 10, 2022, 5:58 p.m.