predictMobKriging: Predict a Partitioned Kriging Model

Description Usage Arguments Details Value See Also Examples

Description

Interface function for predicting a partitioned Kriging model.

Usage

1
2
3
4
predictMobKriging(object, newdata = NULL, type = c("response", "node"),
  km.args = list())

fittedMobKriging(object, type = c("response", "node"), km.args = list())

Arguments

object

[mob]
A tree with fitted Kriging models in the terminal nodes.

newdata

[data.frame]
The cases to be predicted.

type

[character(1)]
Passed to type in predict.mob: A character string specifying whether the response or the ID of the associated terminal node should be predicted.

km.args

[list]
Additional arguments to predict.km.

Details

predictMobKriging calls predict.mob, but handles name clashes and generates prettier output.

Value

If type = "node" a vector of associated terminal node IDs.

If type = "response" a list containing at least the Kriging mean and trend computed at newdata, depending on km.args.

See Also

predict.mob, predict.km, mobKriging.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## currently nonsense example
if (require(DiceKriging)) {
    d <- 2L
    x <- seq(0, 1, length = 10L)
    design <- expand.grid(x1 = x, x2 = x)
    y <- apply(design, 1, branin)
    df <- data.frame(y = y, design)

    ## linear trend (formula = ~ x1 + x2)
    m <- mobKriging(y ~ x1 + x2 | x1 + x2, data = df,
        km.args = list(formula = ~ ., control = list(trace = FALSE)))

    ## predict the response
    pred <- predictMobKriging(m, newdata = design, km.args = list(type = "UK",
        se.compute = TRUE, cov.compute = TRUE))

    ## calculate fitted values, only trend and mean
    pred <- fittedMobKriging(m, km.args = list(type = "UK", se.compute = FALSE,
        light.return = TRUE))

    ## predict nodes
    nodes <- predictMobKriging(m, newdata = design, type = "node")
}

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