Learn R Programming

geoR (version 1.0-8)

plot.xvalid: Plot Cross-Validation Results

Description

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

Usage

plot.xvalid(obj, valid.obj, coords = valid.obj$coords,
            error.plots = TRUE, std.error.plots = TRUE,
            borders = NULL, ask = TRUE)

Arguments

obj
an object of the class "xvalid", typically an output from the function xvalid.
valid.obj
a list containing at least the element coords as described next. Typically an object of the class "geodata" - a geoR data-set. The argument coords can be provided instead.
coords
an $n \times 2$ matrix containing coordinates of the (cross-)validation locations in each row. Defaults to valid.obj$coords, if provided.
error.plots
logical. Defines whether the plots for the errors ($error = data - predicted$) will be produced.
error.plots
logical. Defines whether the plots for the standardised errors will be produced.
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.

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, s100, error = FALSE, ask = FALSE)
plot(xvl, s100, std.err = FALSE, ask = FALSE)
par(op)

Run the code above in your browser using DataLab