plot.geodata {geoR} | R Documentation

## Exploratory Geostatistical Plots

### Description

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

### Usage

    ## S3 method for class 'geodata':
    plot(x, coords=x$coords, data = x$data,
                 borders = NULL, trend="cte", lambda = 1, col.data = 1,
                 weights.divide = NULL, lowess = FALSE, scatter3d = FALSE,
                 qt.col, ...)

### Arguments

`x` | 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`.
`borders` | If an nx2 matrix or data-frame with the borders of the area is provided, the borders are included in the first plot.
`trend` | specifies the mean part of the model. The options are: `"cte"` (constant mean - default option), `"1st"` (a first order polynomial on the coordinates), `"2nd"` (a second order 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 column number for 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`.
`lowess` | logical. Indicates whether the function `lowess` should be used in the plots of the data against the coordinates.
`scatter3d` | logical. If `TRUE` the last plot is produced by `scatterplot3d` showing a 3d plot with data locations and corresponding values.
`qt.col` | colors for the quartiles in the first plot. If missing defaults to blue, green, yellow and red.
`...` | further arguments to be passed to the function `hist` or `scatterplot3d`.

### 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 on the package geoR can be found at:
http://www.est.ufpr.br/geoR.

### See Also

`points.geodata`, `scatterplot3d`.

### Examples

    require(geoR)
    data(s100)
    plot(s100)
    plot(s100, scatter3d=TRUE)
    plot(s100, qt.col=1)

    data(ca20)
    plot(ca20, bor=borders)          # original data
    plot(ca20, trend=~altitude+area) # residuals from an external trend
    plot(ca20, trend='1st')          # residuals from a polynomial trend

    data(SIC)
    plot(sic.100, bor=sic.borders)           # original data
    plot(sic.100, bor=sic.borders, lambda=0) # logarithm of the data

[Package geoR version 1.5-7 Index]