RMblend: Scale model for a few areas of different scales and/or...

Description Usage Arguments Value References See Also Examples

View source: R/RMmodels.R

Description

Let Z=(Z_1, … Z_k) be an k-variate random field and A_1,…, A_k a partition of the space. Then

Y(x) = ∑_{i=1}^k Z_i * 1(x \in A_i)

i.e. the model blends the components of Z to a new, univariate model Y.

Usage

1
RMblend(multi, blend, thresholds, var, scale, Aniso, proj)

Arguments

multi

a multivariate covariance function

blend,thresholds

The threshold is a vector of increasing values. If the value of blend is below all thresholds up to the k-th threshold, then the k-th component of the field given by multi is taken. If necessary the components are recycled.

Default: threshold = 0.5, useful for blending a bivariate field if blend takes only the values 0 and 1.

var,scale,Aniso,proj

optional arguments; same meaning for any RMmodel. If not passed, the above covariance function remains unmodified.

Value

RMblend returns an object of class RMmodel.

References

See Also

RMSadvanced, RMbubble, RMscale,

Examples

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

x <- seq(0,1, if (interactive()) 0.01 else 0.5)
len <- length(x)
m <- matrix(1:len, nc=len, nr=len)
m <- m > t(m)
image(m) # two areas separated by the first bisector

biwm <- RMbiwm(nudiag=c(0.3, 1), nured=1, rhored=1, cdiag=c(1, 1), 
                s=c(1, 1, 0.5))
model <- RMblend(multi=biwm, blend=RMcovariate(data = as.double(m), raw=TRUE))
plot(z <- RFsimulate(model, x, x)) ## takes a while ...

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