vario.calc {RGeostats}R Documentation

Computes experimental variograms

Description

Computes various types of experimental variograms for irregular samplings, for one or several variables contained in a DB structure. If present (defined in the input Db), a set of weight is taken into account in the calculations. The variograms can be calculated with regular or not distance lags.

Usage

vario.calc(db, dirvect=NA,lag=NA, toldis=0.5, tolang=NA, bench=0,
           cylrad=0,nlag=NA, breaks = NA, calcul="vg", by.sample=FALSE,
           opt.code=0, tolcode=0, verr.mode=0, dates=NA, 
           means=NA, flag.indicator=FALSE,
           uc=c("1"), struct=melem.name(c(1,4,5,2,3)), model=NA,
           verbose=FALSE,vario.add=NA)

Arguments

db

The db-class containing the data information used to calculate the experimental variogram. The variograms are calculated for the set of "z*" variables present in the DB. When present, the field "w" gives the weights attached to each sample. In the case of Transitive covariogram, it may be used to reflect the area of influence of each datum (when irregularly spread).

dirvect

The directions in which the variogram must be calculated. For more information, refer to get.directions

lag

Array containing the distance lags for each calculation direction. If no corresponding lag is not defined, a default lag is calculated so that the maximum distance is equal to half of the field diagonal. For one distance, if the lag is not defined, it is set to the default lag.

toldis

Tolerance on the distance, expressed as a proportion of the lag. This parameter is only used in the case of regular lags.

tolang

Array containing the angular tolerance for each calculation direction. If no angular tolerance is not defined, a default tolerance is calculated as one half of the angle. For one direction, if the angular tolerance is not defined, it is set to the default tolerance.

bench

Array containing the bench separation tolerance for each calculation direction. When bench is defined and positive, a pair is discarded if the separation distance between the two points along the third axis is larger than 'bench'.

cylrad

Array containing the cylrad tolerance for each calculation direction. When specified and positive, a pair is discarded if the separation distance in the plane orthogonal to the calculation distance is larger than 'cylrad'.

nlag

Array containing the number of lags for each calculation direction. If not defined, the defaulted number of lags is set to 10. For one direction, if the number of lags is not defined, it is set to 10.

breaks

Vector giving the boundaries of irregular distance lags. For multidrectional computations, breaks is either: a vector (The breaks are then the same for all directions) a list of vectors of the breaks for each direction. If provided, nlag is adapted to the breaks. Intervals are open left and closed right (e.g ]0;15]).

calcul

Character string giving the type of structure to compute:

  • vg : Variogram

  • cov : Covariance (Centered)

  • covnc : Non-centered Covariance

  • covg : Transitive Covariogram

  • mado : Madogram (Variogram of order 1)

  • rodo : Rodogram (Variogram of order 1/2)

  • poisson : Variogram of a Poisson-weighted variable

  • general1 : Generalized variogram of order 1

  • general2 : Generalized variogram of order 2

  • general3 : Generalized variogram of order 3

    Note that the Generalized Variogram is calculated along lines. Therefore, the Db must contain a "code" attribute which serves as the line identifier: samples of the same line share the same code.

by.sample

This parameter drives the way the calculations are performed. When FALSE, the usual calculation is performed: all points (up to a certain distance) are compared.

When TRUE, a variogram is calculated for each sample; then the different variograms are averaged.

Note that in the case of Transitive Covariogram, this flag is set to TRUE automatically (as we apply the Regression algorithm from N. BEZ in the case of irregular data set).

opt.code

Array containing the option concerning the use of the code for each direction. This option defines the strategy for the code usage when considering a pair of samples:

  • 0 : a pair of samples is selected whatever their codes (if active)

  • 1 : a pair is retained if the code is active in the data base and the codes of the two samples are closer than tolcode

  • 2 : a pair is retained only if the codes of the two samples are different

tolcode

Array giving the maximum distance between the codes of the two samples for each direction.

verr.mode

Type of correction when accounting for the Variance of Measurement Error (if defined in the input Db):

  • 0 Do not take the Variance of Measurement Error into account

  • 1 Bias Correction

  • 2 By minimizing the variance of a linear combination

  • 3 Scaled estimator

dates

When defined and if the 'time' locator is defined, this value corresponds to the bounds of the Date Intervals. It is organized as follows:

  • The lower bound of the first Date Interval

  • The upper bound of the first Date Interval

  • The lower bound of the second Date Interval

  • The upper bound of the second Date Interval

  • ...

means

Array corresponding to the estimated means of the variable using for the Poisson variogram calculation

flag.indicator

When TRUE, the variable which corresponds to the first (and unique) Z-locator is converted beforehand into its indicators. The principle is described next.

The target variable is first converted into the lower closest integer value. Then the list of these different integer values is established and sorted in ascending order. Finally the initial variable is converted into indicators of these integer values.

uc

The drift description. Use command uc.names for details. When uc is specified and different from "1", the calculation provide the variogram of residuals when a global trend (build using the set of basic drift functions specified by uc argument) has been removed. This variogram is biased. This bias can be filtered using an iterative procedure. The count of iterations can be controled using the set.keypair("KU_Niter",xxx) mechanism. By default, the number of iterations is set equal to 0.

struct

List of basic structures to be used. This model is used to debias the variogram of residuals. This option is only active when the argument uc is provided and is different from the Universalit condition alone ("1").

model

When this model-class structure is used, it is assumed to correspond to the Model of the true residuals. Therefore this model does not have to be fitted interactively within the procedure to calculate the unbiased variogram of residuals. This option is only active when the argument uc is provided and is different from the Universality Condition along ("1").

verbose

Verbose flag. This is used to produce the drift coefficients when calculating the variogram of the residuals (after drift removal). In the case of debiasing procedure, the matrix of drift coefficients is produced at each iteration.

vario.add

When defined, the current variogram computation is concatenated to the contents of the current variogram.

Value

An experimental vario-class structure.

See Also

db-class, vario-class,


[Package RGeostats version 11.0.6 Index]