Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


rlibkriging (version 0.7-4.3)

simulate.NuggetKriging: Simulation from a NuggetKriging model object.

Description

This method draws paths of the stochastic process at new input points conditional on the values at the input points used in the fit.

Usage

# S3 method for NuggetKriging
simulate(object, nsim = 1, seed = 123, x, ...)

Value

a matrix with length(x) rows and nsim

columns containing the simulated paths at the inputs points given in x.

Arguments

object

S3 NuggetKriging object.

nsim

Number of simulations to perform.

seed

Random seed used.

x

Points in model input space where to simulate.

...

Ignored.

Author

Yann Richet yann.richet@irsn.fr

Examples

Run this code
f <- function(x) 1 - 1 / 2 * (sin(12 * x) / (1 + x) + 2 * cos(7 * x) * x^5 + 0.7)
plot(f)
set.seed(123)
X <- as.matrix(runif(10))
y <- f(X) + 0.1  *rnorm(nrow(X))
points(X, y, col = "blue")

k <- NuggetKriging(y, X, kernel = "matern3_2")

x <- seq(from = 0, to = 1, length.out = 101)
s <- simulate(k, nsim = 3, x = x)

lines(x, s[ , 1], col = "blue")
lines(x, s[ , 2], col = "blue")
lines(x, s[ , 3], col = "blue")

Run the code above in your browser using DataLab