plot.mat {analogue}  R Documentation 
Plot diagnostics for a mat object
Description
Five plots (selectable by which
) are currently available: a
plot of estimated against observed values, a plot of residuals against
estimated values, and screeplots of the apparent RMSE, average bias
and maximum bias for MAT models of size k
, where k = 1,
\dots, n
. By default, the first three and ‘5’ are provided.
Usage
## S3 method for class 'mat'
plot(x,
which = c(1:3, 5),
weighted = FALSE,
k,
caption = c("Inferred vs Observed", "Residuals vs Fitted",
"Leaveoneout errors", "Average bias",
"Maximum bias"),
max.bias = TRUE,
n.bias = 10,
restrict = 20,
sub.caption = NULL,
main = "",
ask = prod(par("mfcol")) < length(which) &&
dev.interactive(),
...,
panel = if (add.smooth) panel.smooth else points,
add.smooth = getOption("add.smooth"))
Arguments
x 
an object of class 
which 
which aspects of the 
weighted 
logical; should the analysis use weighted mean of env data of analogues as fitted/estimated values? 
k 
numeric; the number of analogues to use. If missing 
caption 
captions to appear above the plots. 
max.bias 
logical, should max bias lines be added to residuals. 
n.bias 
numeric, number of sections to calculate maximum bias for. 
restrict 
logical; restrict comparison of kclosest model to

sub.caption 
common titleabove figures if there are multiple;
used as ‘sub’ (s.‘title’) otherwise. If 
main 
title to each plotin addition to the above

ask 
logical; if 
... 
graphical arguments passed to other graphics functions. 
panel 
panel function. The useful alternative to

add.smooth 
logical indicating if a smoother should be added to
fitted \& residuals plots; see also 
Details
This plotting function is modelled closely on plot.lm
and many of the conventions and defaults for that function are
replicated here.
sub.caption
 by default the function call  is shown as a
subtitle (under the xaxis title) on each plot when plots are on
separate pages, or as a subtitle in the outer margin (if any) when
there are multiple plots per page.
Value
One or more plots, drawn on the current device.
Author(s)
Gavin L. Simpson. Code borrows heavily from plot.lm
.
See Also
Examples
## Imbrie and Kipp example
## load the example data
data(ImbrieKipp)
data(SumSST)
data(V12.122)
## merge training and test set on columns
dat < join(ImbrieKipp, V12.122, verbose = TRUE)
## extract the merged data sets and convert to proportions
ImbrieKipp < dat[[1]] / 100
V12.122 < dat[[2]] / 100
## MAT
ik.mat < mat(ImbrieKipp, SumSST, method = "chord")
## summary plot of MAT model
layout(matrix(1:4, ncol = 2, byrow = TRUE))
plot(ik.mat)
layout(1)