RFMethods {RandomFields}R Documentation

Simulation Techniques

Description

PrintMethodList prints the list of currently implemented methods for simulating random fields

GetMethodNames returns a list of currently implemented methods

Usage

PrintMethodList()

GetMethodNames()

Details

Automatic selection algorithm

— details coming soon —

Note

Most methods possess additional parameters, see RFparameters() that control the precision of the result. The default parameters are chosen such that the simulations are fine for many models and their parameters. The example in EmpiricalVariogram() shows a way of checking the precision.

Author(s)

Martin Schlather, martin.schlather@math.uni-goettingen.de http://www.stochastik.math.uni-goettingen.de/institute

Yindeng Jiang jiangyindeng@gmail.com (circulant embedding methods ‘cutoff’ and ‘intrinsic’)

References

Gneiting, T. and Schlather, M. (2004) Statistical modeling with covariance functions. In preparation.

Lantuejoul, Ch. (2002) Geostatistical simulation. New York: Springer.

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.

Original work:

See Also

GaussRF, MaxStableRF, PrintModelList, RandomFields.

Examples

 PrintMethodList()

############################################################
##                                                        ##
##                     Figure 1 in                        ##
##           Gneiting, T., Sevcikova, H.,                 ##
##   Percival, D.B., Schlather, M. and Jiang, Y. (2005)   ##
##                                                        ##
############################################################
## the example below shows for which parameter combinations
## of the stable model, the cutoff method works
## note the method 'cutoff' itself has an automatic
## selection algorithm implemented and is called with
## the stable model only.
## Not run: 

stabletest <- function(alpha, theta, size=512) {
  RFparameters(CE.trials=1, CE.tolIm = 1e-8, CE.tolRe=0, CE.force = FALSE,
               CE.useprimes=TRUE, CE.strategy=0, Print=2)
  model <- list(list(model="cutoff", var=1, kappa=c(1, theta, 1)),
                "(",
                list(model="stable", var=1, scale=1, kappa=alpha)
                )
  check <- CheckAndComplete(model=model, dim=2)
  if (check$error != 0) {
    cat("error", check$error, "\n")
    return(NA)
  }
  r <- paramextract(check$param[ , 1])$cutoffr
#  x <- c(r/size, r,  r /  size)
  x <- c(0, r, r / (size - 1)) * theta
  RFparameters(CE.mmin=rep(2 * size, 2))
  return(if (InitGaussRF(x, x, grid=TRUE, gridtriple=TRUE,
                         model=model, meth="circulant") == 0)
         r else NA)
}

alphas <- seq(1.52, 2.0, 0.01) # 0.02
thetas <- seq(0.05, 3.5, 0.05) #0.05( 2x)
m <- matrix(NA, nrow=length(thetas), ncol=length(alphas))
for (it in 1:length(thetas)) {
  theta <- thetas[it]
  for (ia in 1:length(alphas)) {
    alpha <- alphas[ia]
    cat("alpha=", alpha, "theta=", theta,"\n")
    print(unix.time(m[it, ia] <- stabletest(alpha=alpha, theta=theta)))
    if (is.na(m[it, ia])) break
  }
  if (any(is.finite(m))) image(thetas, alphas, m, col=rainbow(100))
}

## End(Not run) 


[Package RandomFields version 1.3.41 Index]