|
Chapter Contents |
Previous |
Next |
| The SIM2D Procedure |
The SIMULATE statement specifies details on the simulation and the covariance model used in the simulation. You can specify the following options with a SIMULATE statement, which can be abbreviated by SIM.
There are two ways to specify a semivariogram or covariance model. In the first method, you can specify the required parameters SCALE, RANGE, and FORM, and possibly the optional parameters NUGGET, ANGLE, and RATIO, explicitly in the SIMULATE statement.
In the second method, you can specify an MDATA= data set. This data set contains variables corresponding to the required SCALE, RANGE, and FORM parameters, and, optionally, variables for the NUGGET, ANGLE, and RATIO parameters.
The two methods are exclusive; either you specify all parameters explicitly, or they are all are read from the MDATA= data set.
The FORM variables must be character, and they can assume the same values allowed in the explicit FORM= syntax described previously. The RANGE and SCALE variables must be numeric. The optional variables ANGLE, RATIO, and NUGGET must also be numeric if present.
The number of observations present in the MDATA= data set corresponds to the level of nesting of the covariance or semivariogram model. For example, to specify a non-nested model using a spherical covariance, an MDATA= data set might look like
DATA MD1;
INPUT SCALE RANGE FORM $;
DATALINES;
25 10 SPH
RUN;
The PROC SIM2D statement to use the MDATA= specification is of the form
PROC SIM2D DATA=...;
SIM VAR=.... MDATA=MD1;
RUN;
This is equivalent to the following explicit specification of the covariance model parameters:
PROC SIM2D DATA=...;
SIM VAR=.... SCALE=25 RANGE=10 FORM=SPH;
RUN;
The following MDATA= data set is an example of an anisotropic nested model:
DATA MD2;
INPUT SCALE RANGE FORM $ NUGGET ANGLE RATIO;
DATALINES;
20 8 S 5 35 .7
12 3 G 5 0 .8
4 1 G 5 45 .5
;
PROC SIM2D DATA=...;
SIM VAR=.... MDATA=MD2;
RUN;
This is equivalent to the following explicit specification of the covariance model parameters:
PROC SIM2D DATA=...;
SIM VAR=.... SCALE=(20,12,4) RANGE=(8,3,1) FORM=(S,G,G)
ANGLE=(35,0,45) RATIO=(.7,.8,.5) NUGGET=5;
RUN;
This example is somewhat artificial in that it is usually hard to detect different anisotropy directions and ratios for different nestings using an experimental semivariogram. Note that the NUGGET value is the same for all nestings. This is always the case; the nugget effect is a single additive term for all models. For further details, refer to the section "The Nugget Effect" in Chapter 31, "The KRIGE2D Procedure."
The SIMULATE statement can be given a label. This is useful for identification in the OUTSIM= data set when multiple SIMULATE statements are specified. For example,
PROC SIM2D DATA=...;
GAUSS1: SIM VAR=.... FORM=GAUSS;
MEAN ....;
GAUSS2: SIM VAR=.... FORM=GAUSS;
MEAN ....;
EXP1: SIM VAR=.... FORM=EXP;
MEAN ....;
EXP2: SIM VAR=.... FORM=EXP;
MEAN ....;
RUN;
In the OUTSIM= data set, the values 'GAUSS1', 'GAUSS2', 'EXP1', and 'EXP2' for the LABEL variable help to identify the realizations corresponding to the four SIMULATE statements. If you do not provide a label for a SIMULATE statement, a default label of SIMn is given, where n is the number of unlabeled SIMULATE statements seen so far.
The range parameter is the divisor in the exponent in all supported models. It has the units of distance or distance squared for these models, and it is related to the correlation scale for the underlying spatial process. Refer to the section "Theoretical Semivariogram Models" in the chapter on the KRIGE2D procedure for details on how the RANGE= values are determined.
The scale parameter is the multiplicative factor in all supported models; it has the same units as the variance of the VAR= variable. Refer to the section "Theoretical Semivariogram Models" in the chapter on the KRIGE2D procedure for details on how the SCALE= values are determined.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.