RandomFields (version 3.0.5)

RPbernoulli: Simulation of Binary Random Fields

Description

Indicator or binary field which has the value 1, if an underfield field exceeds a given threshold, 0 otherwise.

Usage

RPbernoulli(phi, loggauss, stationary_only, threshold)

Arguments

phi
the RMmodel. Either a model for a process or a covariance model must be specified. In the latter case, a Gaussian process RPgauss is
loggauss, stationary_only
optional parameters; same meaning as for RPgauss. They will be ignored if the submodel is a process definition.
threshold
real valued. RPbernoulli returns $1$ if value of the random field given by phi is equal to or larger than the value of threshold, and $0$ otherwise. threshold

Value

  • The function returns an object of class RMmodel

Details

RPbernoulli can applied to any field. If only a covariance model is given, a Gaussian field is simulated as underlying field.

See Also

Auxiliary RMmodels, RP, RMbernoulli

Examples

Run this code
set.seed(0)

model <- RPbernoulli(RMexp(), threshold=0)
z <- RFsimulate(model=model, 0:10, 0:10, grid=TRUE, n=4)
plot(z)

\dontrun{
model <- RPbernoulli(RPbrownresnick(RMexp(), xi=1), threshold=1)
z <- RFsimulate(model=model, 0:10, 0:10, grid=TRUE, n=4)
plot(z)
}

Run the code above in your browser using DataLab