Description Usage Arguments Details Value Note References See Also Examples
RMbernoulli gives
the centered correlation function of a binary field,
obtained by thresholding a Gaussian field.
1 | RMbernoulli(phi, threshold, correlation, centred, var, scale, Aniso, proj)
|
phi |
covariance function of class |
threshold |
real valued threshold, see
Default: 0. |
correlation |
logical. If Default: |
centred |
logical. If Default: |
var,scale,Aniso,proj |
optional arguments; same meaning for any
|
This model yields the covariance function of the field
that is returned by RPbernoulli.
RMbernoulli returns an object of class RMmodel.
Previous to version 3.0.33 the covariance function was returned, not the correlation function.
Ballani, Schlather
RPbernoulli,
RMmodel,
RFsimulate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.