Description Usage Arguments Value Author(s) See Also Examples
kmData is equivalent to km, except for the interface with the data. In kmData, the user must supply both the design and the response within a single data.frame data. To supply them separately, use km.
1 |
formula |
an object of class "formula" specifying the linear trend of the kriging model (see |
data |
a data.frame containing both the design (input variables) and the response (1-dimensional output given by the objective function at the design points). |
inputnames |
an optional vector of character containing the names of variables in |
... |
other arguments for creating or fitting Kriging models, to be taken among the arguments of |
An object of class km (see km-class).
O. Roustant
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # a 16-points factorial design, and the corresponding response
d <- 2; n <- 16
design.fact <- expand.grid(x1=seq(0,1,length=4), x2=seq(0,1,length=4))
y <- apply(design.fact, 1, branin)
data <- cbind(design.fact, y=y)
# kriging model 1 : matern5_2 covariance structure, no trend, no nugget effect
m1 <- kmData(y~1, data=data)
# this is equivalent to: m1 <- km(design=design.fact, response=y)
# now, add a second response to data:
data2 <- cbind(data, y2=-y)
# the previous model is now obtained with:
m1_2 <- kmData(y~1, data=data2, inputnames=c("x1", "x2"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.