Explore Corrections For Geometric Anisotropy

DESCRIPTION:

Computes corrections for geometric anisotropy for two dimensional spatial data and plots variograms based on the corrections.

USAGE:

anisotropy.plot(formula=formula(data), data=sys.parent(),
                subset, na.action, lag=<<see below>>,
                nlag=20, tol.lag=lag/2, maxdist=<<see below>>,
                angle=c(0, 45, 90, 135),
                ratio=seq(1.25, 2, length = 4),
                minpairs=6, method="classical",
                smooth=T, plot.it=T, panel=panel.xyplot, ...)

REQUIRED ARGUMENTS:

formula
formula defining the response and the predictors. In general, its form is:

z ~ x + y

The z variable is a numeric response. Variables x and y are the locations. All variables in the formula must be vectors of equal length with no missing values ( NAs). The formula may also contain expressions for the variables, for example, sqrt(count), log(age+1) or I(2*x). (The I() is required since the * operator has a special meaning on the right side of a formula.)

OPTIONAL ARGUMENTS:

data
an optional data frame in which to find the objects mentioned in formula.
subset
expression saying which subset of the rows of the data should be used in the fit. This can be a logical vector (which is replicated to have length equal to the number of observations), or a numeric vector indicating which observation numbers are to be included, or a character vector of the row names to be included.
na.action
a function to filter missing data. This is applied to the model.frame after any subset argument has been used. The default (with na.fail) is to create an error if any missing values are found. A possible alternative is na.omit, which deletes observations that contain one or more missing values.
lag
a numeric value, the width of the lags. If missing, lag is set to maxdist / nlag.
nlag
an integer, the maximum number of lags to calculate.
tol.lag
a numeric value, the distance tolerance.
maxdist
the maximum distance to include in the returned output. The default is half the maximum distance in the transformed data.
angle
a vector of direction angles (in degrees, clockwise from North) to consider as directions of anisotropy.
ratio
a vector of ratios of anisotropy. These should all be greater than 1.
minpairs
the minimum number of pairs of points (minimum value for np) that must be used in calculating a variogram value. If np is less than minpairs, that value is dropped from the variogram.
method
a character string to select the method for estimating the variogram. The possible values are "classical" for Matheron's (1963) estimate and "robust" for Cressie and Hawkin's (1980) robust estimator. Only the first character of the string needs to be given.
smooth
a logical flag, if TRUE, a loess smooth line is drawn for each variogram panel. If panel is supplied then this value is ignored.
panel
a panel function to be used in plotting the variograms. If plot.it=FALSE, this value is ignored.
plot.it
a logical flag, if TRUE, a plot of all the variogram is drawn.
...
additional arguments to be passed down to the panel function for plotting.

VALUE:

a data frame with columns:
distance
the average distance for pairs in the lag.
gamma
the variogram estimate.
np
the number of pairs in each lag.
angle
a factor denoting the angle for the geometric anisotropy.
ratio
a factor with levels denoting the ratio for the geometric anisotropy.

SIDE EFFECTS:

If plot.it=TRUE (the default) the variogram for each combination of angle and ratio is plotted. The plot is drawn using xyplot.

DETAILS:

For each combination of angle and ratio the locations are corrected for geometric anisotropy. The correction consists of multipling each location pair ( x[i], y[i]) by the symmetric 2 x 2 matrix A where A[1,1] = cos(angle)^2+ratio*sin(angle)^2, A[1,2] = (1- ratio) * sin(angle) * cos(angle) and A[2,2] = sin(angle)^2+ratio*cos(angle)^2. See Journel and Huijbregts (1978, pp 179-181). The variogram is then estimated using these corrected locations.

REFERENCES:

Cressie, N. and Hawkins, D. M. (1980). Robust estimation of the variogram. Mathematical Geology 12, 115-125.

Journel, A. G. and Huijbregts, Ch. J. (1978). Mining Geostatistics. Academic Press, New York.

Matheron, G. (1963). Principles of geostatistics. Economic Geology 58, 1246-1266.

SEE ALSO:

, , .

EXAMPLES:

anisotropy.plot(log(tcatch+1) ~ long + lat, data=scallops, lag=.075)