| Square roots {RandomFields} | R Documentation |
Methods relying on square roots of the covariance matrix
RPdirect(phi, root_method, svdtolerance, max_variab) RPsequential(phi, max_variables, back_steps, initial)
phi |
object of class |
root_method |
Decomposition of the covariance matrix.
If Default: |
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 Default: |
max_variab |
If the number of variables to generate is
greater than Default: |
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 Default: |
initial |
First, N=(number of spatial points) * Default: |
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.
RPsequential returns an object of class RMmodel
Martin Schlather, schlather@math.uni-mannheim.de
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.
RP,
RPcoins,
RPhyperplane,
RPspectral,
RPtbm.
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set ## RFoptions(seed=NA) to make them all random again model <- RMgauss(var=10, s=10) + RMnugget(var=0.01) plot(model, xlim=c(-25, 25)) z <- RFsimulate(model=RPdirect(model), 0:10, 0:10, n=4) plot(z)