Description Usage Arguments Details Note Author(s) See Also Examples
Draws screeplots of performance statistics for models of varying complexity.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## S3 method for class 'mat'
screeplot(x, k, restrict = 20,
display = c("rmsep", "avg.bias",
"max.bias", "r.squared"),
weighted = FALSE, col = "red", xlab = NULL,
ylab = NULL, main = NULL, sub = NULL, ...)
## S3 method for class 'bootstrap.mat'
screeplot(x, k, restrict = 20,
display = c("rmsep","avg.bias","max.bias",
"r.squared"),
legend = TRUE, loc.legend = "topright",
col = c("red", "blue"),
xlab = NULL, ylab = NULL,
main = NULL, sub = NULL,
...,
lty = c("solid","dashed"))
|
x |
object of class |
k |
number of analogues to use. If missing 'k' is chosen automatically as the 'k' that achieves lowest RMSE. |
restrict |
logical; restrict comparison of k-closest model to k
<= |
display |
which aspect of |
weighted |
logical; should the analysis use weighted mean of env data of analogues as fitted/estimated values? |
xlab, ylab |
x- and y-axis labels respectively. |
main, sub |
main and subtitle for the plot. |
legend |
logical; should a legend be displayed on the figure? |
loc.legend |
character; a keyword for the location of the
legend. See |
col |
Colours for lines drawn on the screeplot. Method for class
|
lty |
vector detailing the line type to use in drawing the
screeplot of the apparent and bootstrap statistics,
respectively. Code currently assumes that |
... |
arguments passed to other graphics functions. |
Screeplots are often used to graphically show the results of cross-validation or other estimate of model performance across a range of model complexity.
Four measures of model performance are currently available: i) root mean square error of prediction (RMSEP); ii) average bias — the mean of the model residuals; iii) maximum bias — the maximum average bias calculated for each of n sections of the gradient of the environmental variable; and v) model R^2.
For the maximum bias statistic, the response (environmental) gradient is split into n = 10 sections.
For the bootstrap
method, apparent and bootstrap
versions of these statistics are available and plotted.
Currently only models of class mat
and
bootstrap.mat
are supported.
Gavin Simpson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## 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
## fit the MAT model using the chord distance measure
(ik.mat <- mat(ImbrieKipp, SumSST, method = "chord"))
screeplot(ik.mat)
|
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
analogue version 0.17-1
Summary:
Rows Cols
Data set 1: 61 27
Data set 2: 110 30
Merged: 171 30
Modern Analogue Technique
Call:
mat(x = ImbrieKipp, y = SumSST, method = "chord")
Percentiles of the dissimilarities for the training set:
1% 2% 5% 10% 20%
0.220 0.280 0.341 0.414 0.501
Inferences based on the mean of k-closest analogues:
k RMSEP R2 Avg Bias Max Bias
1 2.501 0.880 0.321 9.000
2 1.875 0.931 0.284 6.000
3 1.713 0.941 0.133 5.167
4 1.796 0.935 0.177 5.125
5 1.748 0.939 0.209 5.100
6 1.716 0.943 0.284 5.667
7 1.763 0.943 0.381 6.429
8 1.831 0.941 0.390 6.625
9 1.913 0.940 0.449 7.222
10 2.040 0.935 0.577 7.500
Inferences based on the weighted mean of k-closest analogues:
k RMSEP R2 Avg Bias Max Bias
1 2.501 0.880 0.321 9.000
2 1.894 0.929 0.263 6.183
3 1.733 0.940 0.138 5.470
4 1.773 0.937 0.173 5.384
5 1.750 0.939 0.187 5.366
6 1.709 0.942 0.218 5.493
7 1.712 0.942 0.254 5.635
8 1.758 0.940 0.253 5.693
9 1.777 0.939 0.274 5.838
10 1.857 0.935 0.362 5.927
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.