RPtbm: Turning Bands method

Description Usage Arguments Details Value Note References See Also Examples

View source: R/RMmodels.R

Description

The Turning Bands method is a simulation method for stationary, isotropic (univariate or multivariate) random fields in any dimension and defined on arbitrary points or arbitrary grids. It performs a multidimensional simulation by superposing lower-dimensional fields. In fact, the Turning Bands method is called with the Turning Bands model, see RMtbm.
For details see RMtbm.

Usage

1
2
RPtbm(phi, boxcox, fulldim, reduceddim, layers, lines,
      linessimufactor, linesimustep, center, points)

Arguments

phi

object of class RMmodel; specifies the covariance function to be simulated; a univariate stationary isotropic covariance model (see RFgetModelNames(type="positive definite", domain="single variable", isotropy="isotropic", vdim=1)) which is valid in dimension fulldim.

boxcox

the one or two parameters of the box cox transformation. If not given, the globally defined parameters are used. See RFboxcox for details.

fulldim

a positive integer. The dimension of the space of the random field to be simulated.

reduceddim

a positive integer; less than fulldim. The dimension of the auxiliary hyperplane (most frequently a line, i.e. reduceddim=1) used in the simulation.

layers

a boolean value; for space-time model. If TRUE then the turning layers are used whenever a time component is given. If NA the turning layers are used only when the traditional TBM is not applicable. If FALSE then turning layers may never be used.

Default: TRUE.

lines

Number of lines used. Default: 60.

linessimufactor

linessimufactor or linesimustep must be non-negative; if linesimustep is positive then linessimufactor is ignored. If both arguments are naught then points is used (and must be positive). The grid on the line is linessimufactor-times finer than the smallest distance. See also linesimustep.

Default: 2.0.

linesimustep

If linesimustep is positive the grid on the line has lag linesimustep. See also linessimufactor.

Default: 0.0.

center

Scalar or vector. If not NA, the center is used as the center of the turning bands for fulldim. Otherwise the center is determined automatically such that the line length is minimal. See also points and the examples below.

Default: NA.

points

integer. If greater than 0, points gives the number of points simulated on the TBM line, hence must be greater than the minimal number of points given by the size of the simulated field and the two parameters linessimufactor and linesimustep. If points is not positive the number of points is determined automatically. The use of center and points is highlighted in an example below.

Default: 0.

Details

Value

RPtbm returns an object of class RMmodel.

Note

Both the precision and the simulation time depend heavily on linesimustep and linessimufactor. For covariance models with larger values of the scale parameter, linessimufactor=2 is too small.

References

Turning bands

Turning layers

See Also

Gaussian, RP, RPspectral.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again

## isotropic example that forces the use of the turning bands method
model <- RPtbm(RMstable(s=1, alpha=1.8))
x <- seq(-3, 3, 0.1)
z <- RFsimulate(model=model, x=x, y=x)
plot(z)

## anisotropic example that forces the use of the turning bands method
model <- RPtbm(RMexp(Aniso=matrix(nc=2, rep(1,4))))
z <- RFsimulate(model=model, x=x, y=x)
plot(z)

## isotropic example that uses the turning layers method
model <- RMgneiting(orig=FALSE, scale=0.4)
x <- seq(0, 10, 0.1)
z <- RFsimulate(model, x=x, y=x, z=x, T=c(1,1,5))
plot(z, MARGIN.slices=4, MARGIN.movie=3)

RandomFields documentation built on Jan. 19, 2022, 1:06 a.m.