RandomFields (version 3.0.5)

Square roots: Methods relying on square roots of the covariance matrix

Description

Methods relying on square roots of the covariance matrix

Usage

RPdirect(phi, loggauss, root_method, svdtolerance, max_variab) 

RPsequential(phi, loggauss, max_variables, back_steps, initial)

Arguments

phi
object of class RMmodel; specifies the covariance model to be simulated.
loggauss
optional parameter; same meaning as for RPgauss.
root_method
Decomposition of the covariance matrix. If root_method=1 or 3, Cholesky decomposition will not be attempted, but singular value decomposition performed instead. In case of a multivariate random field, root_method = 2
svdtolerance
If SVD decomposition is used for calculating the square root of the covariance matrix then the absolute componentwise difference between the covariance matrix and square of the square root must be less than svdtolerance. No check is perfor
max_variab
If the number of variables to generate is greater than maxvariables, then any matrix decomposition method is rejected. It is important that this option is set conveniently to avoid great losses of time during the automatic search of a sim
max_variables
The maximum size of the conditional covariance matrix (default to 5000)
back_steps
Number of previous instances on which the algorithm should condition. If less than one then the number of previous instances equals max / (number of spatial points). Default: 5 .
initial
First, N=(number of spatial points) * back_steps number of points are simulated. Then, sequentially, all spatial points for the next time instance are simulated at once, based on the previous back_steps instances. The

Value

Details

RPdirect is based on the well-known method for simulating any multivariate Gaussian distribution, using the square root of the covariance matrix. The method is pretty slow and limited to about 8000 points, i.e. a 20x20x20 grid in three dimensions. This implementation can use the Cholesky decomposition and the singular value decomposition. It allows for arbitrary points and arbitrary grids. RPsequential is programmed for spatio-temporal models where the field is modelled sequentially in the time direction conditioned on the previous $k$ instances. For $k=5$ the method has its limits for about 1000 spatial points. It is an approximative method. The larger $k$ the better. It also works for certain grids where the last dimension should contain the highest number of grid points.

References

  • Schlather, M. (1999)An introduction to positive definite functions and to unconditional simulation of random fields.Technical report ST 99-10, Dept. of Maths and Statistics, Lancaster University.

See Also

RP, RPcoins, RPhyperplane, RPspectral, RPtbm.

Examples

Run this code
set.seed(0)
model <- RMgauss(var=10, s=10) + RMnugget(var=0.01)
z <- RFsimulate(model=RPdirect(model), 0:10, 0:10, grid=TRUE, n=4)
plot(z)

cov <- RFcov(model=model, 1:10)
Print(cov)

Run the code above in your browser using DataLab