The following statements are available in PROC VARIOGRAM.
PROC VARIOGRAM options ;
COMPUTE computation-options ;
COORDINATES coordinate- variables ;
DIRECTIONS directions-list ;
VAR analysis-variables-list ;
The COMPUTE and COORDINATES statements are required.
The following table outlines the options available in PROC VARIOGRAM classified by function.
Task | Statement | Option |
---|---|---|
Data Set Options | ||
specify input data set | PROC VARIOGRAM | DATA= |
write spatial continuity measures | PROC VARIOGRAM | OUTVAR= |
write distance histogram information | PROC VARIOGRAM | OUTDISTANCE= |
write pairwise point information | PROC VARIOGRAM | OUTPAIR= |
Declaring the Role of Variables | ||
specify the analysis variables | VAR | |
specify the x, y coordinates in the DATA= data set | COORDINATES | XCOORD= YCOORD= |
Controlling Continuity Measure Computations | ||
specify the basic lag distance | COMPUTE | LAGDISTANCE= |
specify the tolerance around the lag distance | COMPUTE | LAGDISTANCE= |
specify the maximum number of lags in computations | COMPUTE | MAXLAGS= |
specify the number of angle classes | COMPUTE | NDIRECTIONS= |
specify the angle tolerances for angle classes | COMPUTE | ANGLETOL= |
specify the bandwidths for angle classes | COMPUTE | BANDWIDTH= |
compute robust semivariogram | COMPUTE | ROBUST |
suppress computation of all continuity measures | COMPUTE | NOVARIOGRAM |
Controlling Distance Histogram Data Set | ||
specify the distance histogram data set | PROC VARIOGRAM | OUTDISTANCE= |
specify the number of histogram classes | COMPUTE | NHCLASSES= |
Controlling Pairwise Information Data Set | ||
specify the pairwise data set | PROC VARIOGRAM | OUTPAIR= |
specify the maximum distance for the pairwise data set | COMPUTE | OUTPDISTANCE= |
PROC VARIOGRAM options ;
You can specify the following options in the PROC VARIOGRAM statement.
DATA= SAS-data-set
specifies a SAS data set containing the x and y coordinate variables and the VAR statement variables.
OUTDISTANCE= SAS-data-set
OUTDIST= SAS-data-set
OUTD= SAS-data-set
specifies a SAS data set in which to store summary distance information. This data set contains a count of all pairs of data points within a given distance interval. The number of distance intervals is controlled by the NHCLASSES= option in the COMPUTE statement. The OUTDISTANCE= data set is useful for plotting modified histograms of the count data for determining appropriate lag distances. See the section 'OUTDIST= SAS-data-set ' on page 4878 for details.
OUTPAIR= SAS-data-set
OUTP= SAS-data-set
specifies a SAS data set in which to store distance and angle information for each pair of points in the DATA= data set. This option should be used with caution when the DATA= data set is large. If n denotes the number of observations in the DATA= data set, the OUTPAIR= data set contains observations unless you restrict it with the OUTPDISTANCE= option in the COMPUTE statement. The OUTPDISTANCE= option in the COMPUTE statement excludes pairs of points when the distance between the pairs exceeds the OUTPDISTANCE= value. See the section 'OUTPAIR= SAS-data-set ' on page 4881 for details.
OUTVAR= SAS-data-set
OUTVR= SAS-data-set
specifies a SAS data set in which to store the continuity measures. See the section 'OUTVAR= SAS-data-set ' on page 4877 for details.
COMPUTE computation-options ;
The COMPUTE statement provides a number of options that control the computation of the semivariogram, the robust semivariogram, and the covariance.
ANGLETOLERANCE= angle tolerance
ANGLETOL= angle tolerance
ATOL= angle tolerance
specifies the tolerance, in degrees, around the angles determined by the NDIRECTIONS= specification. The default is , where n d is the NDIRECTIONS= specification.
See the section 'Theoretical and Computational Details of the Semivariogram' on page 4872 for more detailed information.
BANDWIDTH= bandwidth distance
BANDW= bandwidth distance
specifies the bandwidth, or perpendicular distance cutoff for determining the angle class for a given pair of points. The distance classes define a series of cylindrically shaped areas, while the angle classes radially cut these cylindrically shaped areas. For a given angle class ( 1 ˆ’ 1 , 1 1 + 1 1 ), as you proceed out radially, the area encompassed by this angle class becomes larger. The BANDWIDTH= option restricts this area by excluding all points with a perpendicular distance from the line = 1 that is greater than the BANDWIDTH= value.
If you do not specify the BANDWIDTH= option, no restriction occurs. See Figure 80.15 on page 4876 for more detailed information.
Figure 80.15: Selected Pair P 3 P 4 Falls Outside Bandwidth Limit
DEPSILON= distance value
DEPS= distance value
specifies the distance value for declaring that two distinct points are zero distance apart. Such pairs, if they occur, cause numeric problems. If you specify DEPSILON= ˆˆ , then pairs of points P 1 and P 2 for which the distance between them P 1 P 2 < ˆˆ are excluded from the continuity measure calculations. The default value of the DEPSILON= option is 100 times machine epsilon ; this product is approximately 1E-10 on most computers.
LAGDISTANCE= distance unit
LAGDIST= distance unit
LAGD= distance unit
specifies the basic distance unit defining the lags. For example, a specification of LAGDISTANCE= x results in lag distance classes that are multiples of x . For a given pair of points P 1 and P 2 , the distance between them, denoted P 1 P 2 , is calculated. If P 1 P 2 = x , then this pair is in the first lag class. If P 1 P 2 =2 x , then this pair is in the second lag class, and so on.
For irregularly spaced data, the pairwise distances are unlikely to fall exactly on multiples of the LAGDISTANCE= value. A distance tolerance of xx is used to accommodate a spread of distances around multiples of x (the LAGTOLERANCE= option specifies the distance tolerance). For example, if P 1 P 2 is within x ± x , you would place this pair in the first lag class; if P 1 P 2 is within 2 x ± x , you would place this pair in the second lag class, and so on.
You can determine the candidate values for the LAGDISTANCE= option by plotting or displaying the OUTDISTANCE= data set.
A LAGDISTANCE= value is required unless you specify the NOVARIOGRAM option.
See the section 'Theoretical and Computational Details of the Semivariogram' on page 4872 for more details.
LAGTOLERANCE= tolerance number
LAGTOL= tolerance number
LAGT= tolerance number
specifies the tolerance around the LAGDISTANCE= value for grouping distance pairs into lag classes. See the preceding description of the LAGDISTANCE= option for information on the use of the LAGTOLERANCE= option, and see the section 'Theoretical and Computational Details of the Semivariogram' on page 4872 for more details.
If you do not specify the LAGTOLERANCE= option, a default value of (1 / 2) times the LAGDISTANCE= value is used.
MAXLAGS= number of lags
MAXLAG= number of lags
MAXL= number of lags
specifies the maximum number of lag classes used in constructing the continuity measures. This option excludes any pair of points P 1 and P 2 for which the distance between them, P 1 P 2 , exceeds the MAXLAGS= value times the LAGDISTANCE= value.
You can determine candidate values for the MAXLAGS= option by plotting or displaying the OUTDISTANCE= data set.
A MAXLAGS= value is required unless you specify the NOVARIOGRAM option.
NDIRECTIONS= number of directions
NDIR= number of directions
ND= number of directions
specifies the number of angle classes to use in computing the continuity measures. This option is useful when there is potential anisotropy in the spatial continuity measures. Anisotropy occurs when the spatial continuity or dependence between a pair of points depends on the orientation or angle between the pair. Isotropy is the absence of this effect: the spatial continuity or dependence between a pair of points depends only on the distance between the points, not the angle.
The angle classes formed from the NDIRECTIONS= option start from N_S and proceed clockwise. For example, NDIRECTIONS=3 produces three angle classes. In terms of compass points, these classes are centered at 0 o (or its reciprocal 180 o ), 60 o (or its reciprocal 240 o ), and 120 o (or its reciprocal 300 o ). For irregularly spaced data, the angles between pairs are unlikely to fall exactly in these directions, so an angle tolerance of is used (the ANGLETOLERANCE= option specifies the angle tolerance). If NDIRECTIONS= n d , the base angle is , and the angle classes are
If you do not specify the NDIRECTIONS= option, no angles are formed, and the spatial continuity measures are assumed to be isotropic.
The NDIRECTIONS= option is useful for exploring possible anisotropy. The DIRECTIONS statement, described in the 'DIRECTIONS Statement' section on page 4870, provides greater control over the angle classes. See the section 'Theoretical and Computational Details of the Semivariogram' on page 4872 for more detailed information.
NHCLASSES= number of histogram classes
NHCLASS= number of histogram classes
NHC= number of histogram classes
specifies the number of distance or histogram classes to write to the OUTDISTANCE= data set. The actual number of classes is one more than the NHCLASSES= value since a special lag 0 class is also computed. See the OUTDISTANCE= option on page 4865 and the section 'OUTDIST =SAS-data-set ' on page 4878 for details.
The default value of the NHCLASSES= option is 10. This option is ignored if you do not specify an OUTDISTANCE= data set.
NOVARIOGRAM
prevents the computation of the continuity measures. This option is useful for preliminary analysis when you require only the OUTDISTANCE= or OUTPAIR= data sets.
OUTPDISTANCE= distance limit
OUTPDIST= distance limit
OUTPD= distance limit
specifies the cutoff distance for writing observations to the OUTPAIR= data set. If you specify OUTPDISTANCE= d max , the distance P 1 P 2 between each pair of points P 1 and P 2 is checked against d max .If P 1 P 2 >d max , the observation for this pair is not written to the OUTPAIR= data set. If you do not specify the OUTPDISTANCE= option, all distinct pairs are written. This option is ignored if you do not specify an OUTPAIR= data set.
ROBUST
requests that a robust version of the semivariogram be calculated in addition to the regular semivariogram and covariance.
COORDINATES coordinate-variables ;
The following two options give the names of the variables in the DATA= data set containing the values of the x and y coordinates of the data.
Only one COORDINATES statement is allowed, and it is applied to all the analysis variables. In other words, it is assumed that all the VAR variables have the same x and y coordinates.
XCOORD= (variable- name )
XC= (variable-name)
gives the name of the variable containing the x coordinate of the data in the DATA= data set.
YCOORD= (variable-name)
YC= (variable-name)
gives the name of the variable containing the y coordinate of the data in the DATA= data set.
DIRECTIONS directions-list ;
You use the DIRECTIONS statement to define angle classes. You can specify angle classes as a list of angles, separated by commas, with optional angle tolerances and bandwidths within parentheses following the angle. You must specify at least one angle.
If you do not specify the optional angle tolerance, the default value of 45 o is used. If you do not specify the optional bandwidth, no bandwidth is checked. If you specify a bandwidth, you must also specify an angle tolerance.
For example, suppose you want to compute three separate semivariograms at angles 1 =0 o , 2 =60 o ,and 3 = 120 o , with corresponding angle tolerance 1 = 22 . 5 o , 2 =12 . 5 o ,and 3 =22 . 5 o , with bandwidths 50 and 40 distance units on the first two angle classes and no bandwidth check on the last angle class.
The appropriate DIRECTIONS statement is
directions 0.0(22.5,50), 60.0(12.5,40),120(22.5);
VAR analysis-variables-list ;
Use the VAR statement to specify the analysis variables. You can specify only numeric variables. If you do not specify a VAR statement, all numeric variables in the DATA= data set that are not in the COORDINATES statement are used.