Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

RMbernoulli

Covariance Model for binary field based on a Gaussian field


Description

RMbernoulli gives the centered correlation function of a binary field, obtained by thresholding a Gaussian field.

Usage

RMbernoulli(phi, threshold, correlation, centred, var, scale, Aniso, proj)

Arguments

phi

covariance function of class RMmodel.

threshold

real valued threshold, see RPbernoulli. Currently, only threshold=0.0 is possible.

Default: 0.

correlation

logical. If FALSE the corresponding covariance function is returned.

Default: TRUE.

centred

logical. If FALSE the uncentred covariance is returned.

Default: TRUE.

var,scale,Aniso,proj

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

Details

This model yields the covariance function of the field that is returned by RPbernoulli.

Value

RMbernoulli returns an object of class RMmodel.

Note

Previous to version 3.0.33 the covariance function was returned, not the correlation function.

Author(s)

References

Ballani, Schlather

See Also

Examples

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

threshold <- 0
x <- seq(0, 5, 0.02)
GaussModel <- RMgneiting()

n <- 1000
z <- RFsimulate(RPbernoulli(GaussModel, threshold=threshold), x=x, n=n)
plot(z)

model <- RMbernoulli(RMgauss(), threshold=threshold, correlation=FALSE)
plot(model, xlim=c(0,5))
z1 <- as.matrix(z)
estim.cov <- apply(z1, 1, function(x) cov(x, z1[1,]))
points(coordinates(z), estim.cov, col="red")

RandomFields

Simulation and Analysis of Random Fields

v3.3.10
GPL (>= 3)
Authors
Martin Schlather [aut, cre], Alexander Malinowski [aut], Marco Oesting [aut], Daphne Boecker [aut], Kirstin Strokorb [aut], Sebastian Engelke [aut], Johannes Martini [aut], Felix Ballani [aut], Olga Moreva [aut], Jonas Auel[ctr], Peter Menck [ctr], Sebastian Gross [ctr], Ulrike Ober [ctb], Paulo Ribeiro [ctb], Brian D. Ripley [ctb], Richard Singleton [ctb], Ben Pfaff [ctb], R Core Team [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.