plot.georob {georob} | R Documentation |
Plot Methods for Class georob
Description
The plot
and lines
methods for class
georob
plot the variogram model, estimated by (robust) restricted
maximum likelihood.
plot.georob
computes and plots in addition the
sample variogram of the (robust) regression residuals and can be used to
generate residual diagnostics plots (Tukey-Anscombe plot, normal QQ plots
of residuals and random effects).
Usage
## S3 method for class 'georob'
plot(x, what = c( "variogram", "covariance", "correlation",
"ta", "sl", "qq.res", "qq.ranef" ), add = FALSE, lag.dist.def,
xy.angle.def = c(0, 180), xz.angle.def = c(0, 180), max.lag = Inf,
estimator = c("mad", "qn", "ch", "matheron"), mean.angle = TRUE,
level = what != "ta", smooth = what == "ta" || what == "sl",
id.n = 3, labels.id = names(residuals(x)), cex.id = 0.75,
label.pos = c(4,2), col, pch, xlab, ylab, main, lty = "solid", ...)
## S3 method for class 'georob'
lines(x, what = c("variogram", "covariance", "correlation"),
from = 1.e-6, to, n = 501, xy.angle = 90, xz.angle = 90,
col = 1:length(xy.angle), pch = 1:length(xz.angle), lty = "solid", ...)
Arguments
x |
an object of class |
what |
a character keyword for the quantity that should be displayed. Possible values are:
|
add |
a logical scalar controlling whether a new plot should be
generated ( |
lag.dist.def |
an optional numeric scalar defining a constant bin
width for grouping the lag distances or an optional numeric vector with
the upper bounds of a set of contiguous bins for computing the sample
variogram of the regression residuals, see
|
xy.angle.def |
an numeric vector defining angular classes in the
horizontal plane for computing directional variograms.
|
xz.angle.def |
an numeric vector defining angular classes in the
|
max.lag |
a positive numeric defining the largest lag distance for which semi-variances should be computed (default no restriction). |
estimator |
a character keyword defining the estimator for computing the sample variogram. Possible values are:
|
mean.angle |
a logical scalar controlling whether the mean lag
vector (per combination of lag distance and angular class) is computed
from the mean angles of all the lag vectors falling into a given class
( |
level |
an integer giving the level for extracting the residuals
from |
smooth |
a logical scalar controlling whether a
|
id.n |
a numeric with the number of points to be labelled in each
plot, starting with the most extreme (see
|
labels.id |
a vector of labels, from which the labels for extreme
points will be chosen (see |
cex.id |
a numeric with the magnification of point labels (see
|
label.pos |
a numeric for positioning of labels, for the left half
and right half of the graph respectively (see
|
from |
a numeric with the minimal lag distance for plotting variogram models. |
to |
a numeric with the maximum lag distance for plotting variogram models (default: largest lag distance of current plot). |
n |
a positive integer specifying the number of equally spaced lag
distances for which semi-variances are evaluated in plotting variogram
models (default |
xy.angle |
a numeric (vector) with azimuth angles (in degrees,
clockwise positive from north) in |
xz.angle |
a numeric (vector) with angles in |
col |
an optional vector with colours of points and curves to
distinguish items relating to different azimuth angles in
|
pch |
an optional vector with symbols for points and curves to
distinguish items relating to different azimuth angles in
|
lty |
line type for plotting variogram models. |
xlab , ylab , main |
plot annotation, see
|
... |
additional arguments passed to
|
Value
The method plot.georob
returns no value, it is called for its side
effects.
The method lines.georob
is called for its side effects and returns
the value NULL
invisibly.
Author(s)
Andreas Papritz papritz@retired.ethz.ch.
See Also
georobPackage
for a description of the model and a brief summary of the algorithms;
georob
for (robust) fitting of spatial linear models;
georobObject
for a description of the class georob
;
profilelogLik
for computing profiles of Gaussian likelihoods;
control.georob
for controlling the behaviour of georob
;
georobModelBuilding
for stepwise building models of class georob
;
cv.georob
for assessing the goodness of a fit by georob
;
georobMethods
for further methods for the class georob
;
predict.georob
for computing robust Kriging predictions;
lgnpp
for unbiased back-transformation of Kriging prediction
of log-transformed data;
georobSimulation
for simulating realizations of a Gaussian process
from model fitted by georob
; and finally
sample.variogram
and fit.variogram.model
for robust estimation and modelling of sample variograms.
Examples
################
## meuse data ##
################
data(meuse)
## Gaussian REML fit
r.logzn.reml <- georob(log(zinc) ~ sqrt(dist), data = meuse, locations = ~ x + y,
variogram.model = "RMexp",
param = c(variance = 0.15, nugget = 0.05, scale = 200),
tuning.psi = 1000)
summary(r.logzn.reml, correlation = TRUE)
plot(r.logzn.reml, lag.dist.def = seq(0, 2000, by = 100))
## robust REML fit
if(interactive()){
## example is run only in interactive session because cpu times exceeds 5 s
r.logzn.rob <- update(r.logzn.reml, tuning.psi = 1)
summary(r.logzn.rob, correlation = TRUE)
lines(r.logzn.rob, col = "red")
}