RPbernoulli {RandomFields}R Documentation

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, 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 tacitely assumed.

stationary_only

optional arguments; same meaning as for RPgauss. It is 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. In the multivariate case, a vector might be given. If the threshold is not finite, then the original field is returned.

threshold defaults value is 0.

Details

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

Value

The function returns an object of class RMmodel

Author(s)

Martin Schlather, schlather@math.uni-mannheim.de http://ms.math.uni-mannheim.de/de/publications/software

See Also

Auxiliary RMmodels, RP, RMbernoulli

Examples

RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again

x <- seq(0, 10, 0.1)
model <- RPbernoulli(RMexp(), threshold=0)
z <- RFsimulate(model, x, x, n=4)
plot(z)




[Package RandomFields version 3.1.50 Index]