plot.geodata {geoR}R Documentation

Exploratory Geostatistical Plots

Description

This function produces a 2 x 2 graphics display with the following plots: the first indicates spatial locations, the second is a 3-D plot with spatial locations and associated data values (or a histogram of the data), and the last two shows data against the X and Y coordinates.

Usage

plot.geodata(geodata, coords=geodata$coords, data = geodata$data,
     trend="cte", lambda = 1, col.data = 1, weights.divide = FALSE,
     window.new = FALSE, ...)

Arguments

geodata a list containing elements coords and data described next. Typically an object of the class "geodata" - a geoR data-set. If not provided the arguments coords and data must be provided instead.
coords an n x 2 matrix containing in each row Euclidean coordinates of the n data locations. By default it takes the element coords of the argument geodata.
data a vector with data values. By default it takes the element data of the argument geodata.
trend specifies the mean part of the model. The options are: "cte" (constant mean - default option), "1st" (a first degree polynomial on the coordinates), "2nd" (a second degree polynomial on the coordinates), or a formula of the type ~X where X is a matrix with the covariates (external trend). If provided the trend is "removed" using the function lm and the residuals are plotted.
lambda value of the Box-Cox transformation parameter. Two particular cases are lambda = 1 which corresponds to no transformation and lambda = 0 corresponding to the log-transformation.
col.data indicates the number of the column of the data to be plotted. Only valid if more than one data-set is available i.e., if the argument data is a matrix.
weights.divide if a vector of weights with the same length as the data is provided each data is divided by the corresponding element in this vector. Defaults to NULL.
window.new logical. If TRUE a new graphic device is openned, otherwise the current one is used. Defaults to FALSE.
... further arguments to be passed to the function scatterplot3d.

Details

By default, this function requires the package scatterplot3d in order to produce a 3-D plot with data locations and coordinates. If this package is not available an histogram of the data replaces the 3-D plot.

Value

A plot is produced on the graphics device. No values are returned.

Author(s)

Paulo J. Ribeiro Jr. Paulo.Ribeiro@est.ufpr.br,
Peter J. Diggle p.diggle@lancaster.ac.uk.

References

Further information about geoR can be found at:
http://www.maths.lancs.ac.uk/~ribeiro/geoR.html.

See Also

points.geodata, scatterplot3d.

Examples

if(is.R()) data(s100)
plot(s100)