The VARIOGRAM Procedure

Distance Classification

The distance class for a point pair $P_1P_2$ is determined as follows. The directed line segment $P_1P_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 $\mid P_1P_2 \mid $ and the LAGDISTANCE= value by $\Delta $, the lag class L is determined by

\[  L(P_1P_2) = \left\lfloor \frac{\mid P_1P_2 \mid }{\Delta } + 0.5 \right\rfloor  \]

where $\lfloor x \rfloor $ denotes the largest integer $\le x$.

When the directed line segment $P_1P_2$ is superimposed on the coordinate system that shows the distance classes, it is seen to fall in the first lag class; see FigureĀ 109.21 for an illustration for $\Delta =1$.

Figure 109.21: Selected Pair $P_1P_2$ Falls within the First Lag Class

Selected Pair P1P2 Falls within the First Lag Class


Pairwise distances are positive. Therefore, the line segment $\mid P_1P_2 \mid $ 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, \cdots ,$ 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

\[  [0,0.5), [0.5,1.5), [1.5,2.5), \cdots , [9.5,10.5)  \]

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Ā 109.22.

Figure 109.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

\[  [0,0.25), [0.75,1.25), [1.75,2.25), \cdots , [9.75,10.25)  \]

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

\[  \mid P_1P_2 \mid \in [1.25,1.75)  \]

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.