The VARIOGRAM Procedure

Distance Classification

The distance class for a point pair upper P 1 upper P 2 is determined as follows. The directed line segment upper P 1 upper P 2 is superimposed on the coordinate system that shows the distance or lag classes. These classes are determined by the LAGDISTANCE= option in the COMPUTE statement. Denoting the length of the line segment by bar upper P 1 upper P 2 bar and the LAGDISTANCE= value by normal upper Delta, the lag class L is determined by

upper L left-parenthesis upper P 1 upper P 2 right-parenthesis equals left floor StartFraction bar upper P 1 upper P 2 bar Over normal upper Delta EndFraction plus 0.5 right floor

where left floor x right floor denotes the largest integer less-than-or-equal-to x.

When the directed line segment upper P 1 upper P 2 is superimposed on the coordinate system that shows the distance classes, it is seen to fall in the first lag class; see FigureĀ 21 for an illustration for normal upper Delta equals 1.

Figure 21: Selected Pair upper P 1 upper P 2 Falls within the First Lag Class

Selected Pair P1P2 Falls within the First Lag Class


Pairwise distances are positive. Therefore, the line segment bar upper P 1 upper P 2 bar might belong to one of the MAXLAG lag classes or it could be shorter than half the length of the LAGDISTANCE= value. In the last case the segment is said to belong to the lag class zero. Hence, lag class zero is smaller than lag classes 1 comma ellipsis comma MAXLAGS. The definition of lag classes in this manner means that when you specify the MAXLAGS= parameter, PROC VARIOGRAM produces a semivariogram with a total of MAXLAGS+1 lag classes including the zero lag class. For example, if you specify LAGDISTANCE=1 and MAXLAGS=10 and you do not specify a LAGTOLERANCE= value in the COMPUTE statement in PROC VARIOGRAM, the 11 lag classes generated by the preceding equation are

left-bracket 0 comma 0.5 right-parenthesis comma left-bracket 0.5 comma 1.5 right-parenthesis comma left-bracket 1.5 comma 2.5 right-parenthesis comma ellipsis comma left-bracket 9.5 comma 10.5 right-parenthesis

The preceding lag classes description is correct under the assumption of the default lag tolerance, which is half the LAGDISTANCE= value. Using the default lag tolerance results in no gaps between the distance class intervals, as shown in FigureĀ 22.

Figure 22: Lag Distance Axis Showing Lag Classes

Lag Distance Axis Showing Lag Classes


On the other hand, if you do specify a distance tolerance with the LAGTOLERANCE= option in the COMPUTE statement, a further check is performed to see whether the point pair falls within this tolerance of the nearest lag. In the preceding example, if you specify LAGDISTANCE=1 and MAXLAGS=10 (as before) and also specify LAGTOLERANCE=0.25, the intervals become

left-bracket 0 comma 0.25 right-parenthesis comma left-bracket 0.75 comma 1.25 right-parenthesis comma left-bracket 1.75 comma 2.25 right-parenthesis comma ellipsis comma left-bracket 9.75 comma 10.25 right-parenthesis

You might want to avoid this specification because it results in gaps in the lag classes. For example, if a point pair upper P 1 upper P 2 falls in an interval such as

bar upper P 1 upper P 2 bar element-of left-bracket 1.25 comma 1.75 right-parenthesis

then it is excluded from the semivariance calculation. The maximum LAGTOLERANCE= value allowed is half the LAGDISTANCE= value; no overlap of the distance classes is allowed.

See the section Computation of the Distribution Distance Classes for a more extensive discussion of practical aspects in the specification of the LAGDISTANCE= and MAXLAGS= options.

Last updated: December 09, 2022