Learn R Programming

geoR (version 1.2-5)

plot.xvalid: Plot Cross-Validation Results

Description

This function produces ten plots with the results produced by the cross-validation function xvalid.

Usage

## S3 method for class 'xvalid':
plot(x, coords, borders = NULL, ask = TRUE,
            error = TRUE, std.error = TRUE, data.predicted = TRUE,
            pp = TRUE, map = TRUE, histogram = TRUE,
            error.predicted = TRUE, error.data = TRUE, ...)

Arguments

x
an object of the class "xvalid", typically an output from the function xvalid.
coords
an $n \times 2$ object containing coordinates of the (cross-)validation locations.
borders
optional. Takes a two column matrix or data-frame with coordinates of the borders. If provided the borders are included in the errors maps.
ask
logical. Defines whether or not the user is prompted before each plot is produced.
error
logical. Defines whether the plots for the errors ($error = data - predicted$) will be produced.
std.error
logical. Defines whether the plots for the standardised errors will be produced.
data.predicted
logical defining whether a plot of data versus predicted should be displayed. Defaults to TRUE.
pp
logical defining whether a pp plot should be displayed. Defaults to TRUE.
map
logical defining whether a map of the errors should be displayed. Defaults to TRUE.
histogram
logical defining whether a histogram of the errors should be displayed. Defaults to TRUE.
error.predicted
logical defining whether a plot of errors versus predicted should be displayed. Defaults to TRUE.
error.data
logical defining whether a plot of errors versus data should be displayed. Defaults to TRUE.
...
other arguments to be passed to the function plot.

Value

  • No value returned. Plots are produced on the current graphics device.

See Also

xvalid for the cross-validation computations.

Examples

Run this code
if(is.R()) data(s100)
wls <- variofit(variog(s100, max.dist = 1), ini = c(.5, .5), fix.n = TRUE)
xvl <- xvalid(s100, model = wls)
#
op <- par(no.readonly = TRUE)
par(mfcol = c(3,2))
par(mar = c(3,3,0,1))
par(mgp = c(2,1,0))
plot(xvl, error = FALSE, ask = FALSE)
plot(xvl, std.err = FALSE, ask = FALSE)
par(op)

Run the code above in your browser using DataLab