next up previous contents index
Next: Linear models in gstat Up: Getting started Previous: Prediction   Contents   Index

Subsections


Simulation

Simulation [6,9,17] is done by setting up a command file for simple kriging (section 2.5) and changing the default action to Gaussian simulation by adding the command

method: gs;

(example 6 and example 7), or to indicator simulation by adding the command

method: is;

If valid data are present (i.e., data are available in the neighbourhoods defined), conditional simulation is done. Unconditional simulation is done when only dummy variables (dummy, section 4.2) or data outside every possible neighbourhood are defined.

The sequential simulation algorithm [9] is used for the simulation. This algorithm visits each simulation location, following a random path. After simulating a value (or set of values in the multivariable case) at the location, it is added to the conditioning data.

A few notes on the practice of (indicator or Gaussian) simulation with gstat are:


Gaussian block simulation

Gstat simulates block averages when a non-zero block size is specified (section 3.5). The implementation of this is a rather inefficient one. Simulation will be faster when nblockdiscr is set to a low value (to 3 or 2, section 4.4), at the expense of the accuracy of point-to-block and block-to-block covariance calculations (see Appendix A.3).


Indicator simulation


Table 2.1: Order relation corrections
Indicator order violation correction set order
independent $\hat{p}_i < 0$ $\tilde{p}_i = 0$ 1-4
independent $\hat{p}_i > 1$ $\tilde{p}_i = 1$ 1-4
categorical, open $\sum_{i=1}^{n} \hat{p}_i > 1$ $\tilde{p}_i = \hat{p}_i / \sum_{i=1}^{n} \hat{p}_i$ 2
categorical, closed $\sum_{i=1}^{n} \hat{p}_i \ne 1$ $\tilde{p}_i = \hat{p}_i / \sum_{i=1}^{n} \hat{p}_i$ 3
cumulative $\hat{p}_i < \hat{p}_{i-1}$ $\tilde{p}_i - \tilde{p}_{i-1} = 0$ 4

From data definitions alone, gstat cannot decide whether it is working with indicator variables or not. In case of prediction this is not crucial--procedure-wise, indicator kriging is identical to simple or ordinary kriging. When indicator simulation is done for multiple variables, a number of different situations may occur, and for correct results, it should be specified explicitly if the set of indicator variables is (i) independent, (ii) cumulative or (iii) disjunct:

Independent indicators may represent independent variables. A set of cumulative indicators may represent the cumulative distribution function of a single continuous variable and a set of disjunct indicators can represent the categories of a categorical variable (see also the data command options c and Category). Table 2.1 shows the corrections done for the different types of indicator variables and the value order should be set to to obtain the corrections (estimated probality $\hat{p}_i$, corrected estimate $\tilde{p}_i$). Cumulative indicators are corrected using the ``upward-downward'' approach, see [8, p. 80] or [10, p. 324].

For multiple indicator simulation (no indicator cross variograms are specified), by default independent indicator simulation is done. The subsequent indicator variables are taken as cumulative indicators if the command

set order=4;

is added to the command file (Table 2.1). They will be treated as disjunct if order is set to 2 or 3 (see section 4.4).


next up previous contents index
Next: Linear models in gstat Up: Getting started Previous: Prediction   Contents   Index
Edzer Pebesma
1999-08-31