Details


Computational and Theoretical Details of Spatial Simulation

Introduction

There are a number of approaches to simulating spatial random fields or, more generally , simulating sets of dependent random variables . This includes sequential indicator methods , turning bands, and the Karhunen-Loeve Expansion. Refer to Christakos (1992, Chapter 8) and Duetsch and Journel (1992, Chapter V) for details.

A particularly simple method available for Gaussian spatial random fields is the LU decomposition method. This method is computationally efficient. For a given covariance matrix, the LU = LL T decomposition is computed once, and the simulation proceeds by repeatedly generating a vector of independent N (0 , 1) random variables and multiplying by the L matrix.

One problem with this technique is memory requirements; memory is required to hold the full data and grid covariance matrix in core . While this is especially limiting in the three-dimensional case, you can use PROC SIM2D, which handles only two-dimensional data, for moderately sized simulation problems.

Theoretical Development

It is a simple matter to produce an N (0 , 1) random number, and by stacking k N (0 , 1) random numbers in a column vector, you can obtain a vector with independent standard normal components W ~ N k ( , I ). The meaning of the terms independence and randomness in the context of a deterministic algorithm required for the generation of these numbers is a little subtle; refer to Knuth (1981, Vol. 2, Chapter 3) for details.

Rather than W ~ N k ( , I ), what is required is the generation of a vector Z ~ N k ( , C ),thatis,

with covariance matrix

click to expand

If the covariance matrix is symmetric and positive definite, it has a Cholesky root L such that C can be factored as

where L is lower triangular . Refer to Ralston and Rabinowitz (1978, Chapter 9, Section 3-3) for details. This vector Z can be generated by the transformation Z = LW . Note that this is where the assumption of a Gaussian SRF is crucial. When W ~ N k ( , I ), then Z = LW is also Gaussian. The mean of Z is

click to expand

and the variance is

click to expand

Consider now an SRF Z ( s ) , s ˆˆ D R 2 , with spatial covariance function C ( h ). Fix locations s 1 , s 2 , , s k , and let Z denote the random vector

with corresponding covariance matrix

click to expand

Since this covariance matrix is symmetric and positive definite, it has a Cholesky root, and the Z ( s i ) , i = 1 , , k can be simulated as described previously. This is how the SIM2D procedure implements unconditional simulation in the zero mean case. More generally,

click to expand

with µ ( s ) being a quadratic form in the coordinates s = ( x, y ), and the µ ( s ) being an SRF having the same covariance matrix C z as previously. In this case, the µ ( s i ) , i = 1 , , k is computed once and added to the simulated vector µ ( s i ) , i = 1 , , k for each realization.

For a conditional simulation, this distribution of

must be conditioned on the observed data. The relevant general result concerning conditional distributions of multivariate normal random variables is the following. Let X ~ N m ( µ , & pound ; ), where

and

click to expand

The subvector X 1 is k — 1, X 2 is n — 1, 11 is k k , 22 is n n , and 12 = is k n , with k + n = m . The full vector X is partitioned into two subvectors X 1 and X 2 , and is similarly partitioned into covariances and cross covariances.

With this notation, the distribution of X 1 conditioned on X 2 = x 2 is N k ( , ) , with

click to expand

and

click to expand

Refer to Searle (1971, pp. 46-47) for details. The correspondence with the conditional spatial simulation problem is as follows . Let the coordinates of the observed data points be denoted 1 , 2 , , n , with values 1 , 2 , , n . Let denote the random vector

The random vector corresponds to X 2 , while Z corresponds to X 1 . Then ( Z = ) ~ N k ( , ) as in the previous distribution. The matrix

click to expand

is again positive definite, so a Cholesky factorization can be performed.

The dimension n for is simply the number of nonmissing observations for the VAR= variable; the values 1 , 2 , , n are the values of this variable. The coordinates 1 , 2 , , n are also found in the DATA= data set, with the variables corresponding to the x and y coordinates identified in the COORDINATES statement. Note that all VAR= variables use the same set of conditioning coordinates; this fixes the matrix C 22 for all simulations.

The dimension k for Z is the number of grid points specified in the GRID statement. Since there is a single GRID statement, this fixes the matrix C 11 for all simulations. Similarly, C 12 is fixed.

The Cholesky factorization = LL T is computed once, as is the mean correction

click to expand

Note that the means µ 1 and µ 2 are computed using the grid coordinates s 1 , s 2 , , s k , the data coordinates 1 , 2 , , n , and the quadratic form specification from the MEAN statement. The simulation is now performed exactly as in the unconditional case. A k — 1 vector of independent standard N (0 , 1) random variables is generated and multiplied by L , and is added to the transformed vector. This is repeated N times, where N is the value specified for the NR= option.

Computational Details

In the computation of and described in the previous section, the inverse is never actually computed; an equation of the form

is solved for A using a modified Gaussian elimination algorithm that takes advantage of the fact that 22 is symmetric with constant diagonal C z (0) that is larger than all off-diagonal elements. The SINGULAR= option pertains to this algorithm. The value specified for the SINGULAR= option is scaled by C z (0) before comparison with the pivot element.

Memory Usage

  • For conditional simulations, the largest matrix held in core at any one time depends on the number of grid points and data points. Using the previous notation, the data-data covariance matrix C 22 is n n , where n is the number of nonmissing observations for the VAR= variable in the DATA= data set. The grid-data cross covariance C 12 is n k , where k is the number of grid points. The grid-grid covariance C 11 is k k . The maximum memory required at any one time for storing these matrices is

    click to expand
  • There are additional memory requirements that add to the total memory usage, but usually these matrix calculations dominate, especially when the number of grid points is large.

Output Data Set

The SIM2D procedure produces a single output data set: the OUTSIM= SAS-data set . The OUTSIM= data set contains all the needed information to uniquely identify the simulated values.

The OUTSIM= data set contains the following variables:

  • LABEL , which is the label for the current SIMULATE statement

  • VARNAME , which is the name of the conditioning variable for the current SIMULATE statement

  • _ITER_ , which is the iteration number within the current SIMULATE statement

  • GXC , which is the x-coordinate for the current grid point

  • GYC , which is the y-coordinate for the current grid point

  • SVALUE , which is the value of the simulated variable

If you specify the NARROW option in the PROC SIM2D statement, the LABEL and VARNAME variables are not included in the OUTSIM= data set. This option is useful in the case where the number of data points, grid points, and realizations are such that they generate a very large OUTSIM= data set. The size of the OUTSIM= data set is reduced when these variables are not included.

In the case of an unconditional simulation, the VARNAME variable is not included. In the case of mixed conditional and unconditional simulations (that is, when multiple SIMULATE statements are specified and one or more contain a VAR= specification and one or more do not contain a VAR= specification), the VARNAME variable is included but is given a missing value for those observations corresponding to an unconditional simulation.




SAS.STAT 9.1 Users Guide (Vol. 6)
SAS.STAT 9.1 Users Guide (Vol. 6)
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 127

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net