Previous Page | Next Page

The SIM2D Procedure

MEAN Statement
MEAN spec,...,spec ;
MEAN QDATA= SAS-data-set CONST=var CX=var CY=var
CXX=var CYY=var CXY=var
;
MEAN QDATA= SAS-data-set ;

A mean function that is a quadratic in the coordinates can be written

     

The MEAN statement is used to specify the quadratic surface to use as the mean function for the simulated SRF. There are three ways to specify the MEAN statement. The MEAN statement allows the specification of the coefficients either explicitly or through a QDATA= data set.

An example of an explicit specification is the following:

   mean 1.4 + 2.5*x + 3.6*y + 0.47*x*x + 0.58*y*y + 0.69*x*y;

In this example, all terms have a nonzero coefficient. Any term with a zero coefficient is simply left out of the specification. For example,

   mean 1.4;

is a valid quadratic form with all terms having zero coefficients except the constant term.

An equivalent way of specifying the mean function is through the QDATA= data set. For example, the MEAN statement

   mean 1.4 + 2.5*x + 3.6*y + 0.47*x*x + 0.58*y*y + 0.69*x*y;

can be alternatively specified by the following DATA step and MEAN statement:

   data q1;
      input c1 c2 c3 c4 c5 c6;
      datalines;
      1.4 2.5 3.6 0.47 0.58 0.69
   run;
   proc sim2d data=....;
      simulate ...;
      mean qdata=q1 const=c1 cx=c2 cy=c3 cxx=c4
              cyy=c5 cxy=c6;
   run;

The QDATA= data set specifies the data set containing the coefficients. The parameters CONST=, CX=, CY=, CXX=, CYY=, and CYX= specify the variables in the QDATA= data set that correspond to the constant, linear , linear , and so on. For any coefficient not specified in this list, the QDATA= data set is checked for the presence of variables with default names of CONST, CX, CY, CXX, CYY, and CXY. If these variables are present, their values are taken as the corresponding coefficients. Hence, you can rewrite the previous example as follows:

   data q1;
      input const cx cy cxx cyy cxy;
      datalines;
      1.4 2.5 3.6 0.47 0.58 0.69
      ;
   proc sim2d data=....;
      simulate ...;
      mean qdata=q1;
   run;

If a given coefficient does not appear in the list or in the data set with the default name, a value of zero is assumed.

Previous Page | Next Page | Top of Page