predict.kmModel: Predict a 'kmModel'

Description Usage Arguments Value References See Also Examples

Description

Predict a fitted Kriging model.

Usage

1
2
3
4
5
## S3 method for class 'kmModel'
predict(object, newdata = NULL, ...)

## S3 method for class 'kmModel'
fitted(object, ...)

Arguments

object

[kmModel]
The fitted Kriging model.

newdata

[data.frame]
The cases to be predicted.

...

Additional arguments to predict.km.

Value

See predict.km. A list containing at least the Kriging mean and trend computed at newdata.

References

Roustant, O., Ginsbourger, D. and Deville, Y. (2012), DiceKriging, DiceOptim: Two R packages for the analysis of computer experiments by Kriging-based metamodeling and optimization. Journal of Statistical Software, 51(1), http://www.jstatsoft.org/.

See Also

Predict, predict, predict.km, kmModel.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## We use the first example in the documentation of function km
if (require(DiceKriging)) {
    d <- 2L
    x <- seq(0, 1, length = 4L)
    design <- expand.grid(x1 = x, x2 = x)
    y <- apply(design, 1, branin)
    df <- data.frame(y = y, design)

    ## fitting the model
    mf <- dpp(kmModel, y ~ ., data = df)
    m <- fit(kmModel, mf, formula = ~ .)

    ## fitted values and prediction
    fitted(m, type = "UK")
    predict(m, type = "UK", se.compute = FALSE, light.return = TRUE)
}

schiffner/mobKriging documentation built on May 29, 2019, 3:39 p.m.