geoR (version 1.8-1)

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 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.

Details

The number of plots to be produced will depend on the input options. If the graphics device is set to just one plot (something equivalent to par(mfcol=c(1,1))) after each graphic being displayed the user will be prompt to press <return> to see the next graphic.

Alternativaly the user can set the graphical parameter to have several plots in one page. With default options for the arguments the maximum number of plots (10) is produced and setting par(mfcol=c(5,2))) will display them in the same page.

The “errors” for the plots are defined as $$error = data - predicted$$ and the plots uses the color blue to indicate positive errors and red to indicate negative erros.

See Also

xvalid for the cross-validation computations.

Examples

Run this code
# NOT RUN {
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 DataCamp Workspace