precompute {spatialCovariance}R Documentation

Precompute Step for Computing Covariance Matrix

Description

For a lattice with nr rows and nc columns on only needs to compute $n=nr X nc$ entries to fill the whole covariance matrix (of size $n X n$). For example, the diagonal entries will all be the same so one only needs to compute it once and know that the value needs to be placed along the diagonal. This algorithm figures out which entries need to be computed, and how to insert them into the covariance matrix.

When an anisotropy term aniso is included in the direction of rows and columns it changes how distance is measure from $sqrt (x^2+y^2)$ to $sqrt (x^2+ alpha^2 y^2)$. This amounts to stretching the lattice in the appropriate direction by a factor of $alpha$. We can update the results of the precompute stage very easily.

Usage

precompute(nrows,ncols,rowwidth,colwidth,rowsep,colsep,cat.level)
precompute.update(info,cat.level=0,aniso=1) 

Arguments

nrows, ncols

Number of rows and columns in the lattice

rowwidth, colwidth

Dimensions of the rectangle

rowsep, colsep

Vectors of separations between rows and columns. Pass scalars if the separations are constant in each direction.

cat.level

0,0.5,1, changes the amount of output. Output is limited to times for various stages of the computation

aniso

Value of anisotropy parameter in the direction of rows and columns. Should be a positive number.

info

Result of the precompute stage

Author(s)

David Clifford

Examples

## See computeV help page for more details and examples

[Package spatialCovariance version 0.6-9 Index]