RFoptions(seed=0)
threshold <- 0
x <- seq(0, 5, if (interactive()) 0.02 else 1)
GaussModel <- RMgneiting()
z <- RFsimulate(RPbernoulli(GaussModel, threshold=threshold),
x=x, n=2)
plot(z)
z <- RFsimulate(RPbernoulli(GaussModel, threshold=threshold),
x=x, n=if (interactive()) 10000 else 2, spConform=FALSE)
estim.cov <- apply(z, 1, function(x) cov(x, z[1,]))
plot(x, estim.cov)
lines(x, RFcov(x=x, RMbernoulli(RMgauss(), threshold=threshold)))
RFoptions(seed=NA)
Run the code above in your browser using DataLab