Description Usage Arguments Value See Also Examples
A function equivalent to fitEmulator
. In fitEmulatorData
the user can provide
the inputs and outputs in one matrix/dataframe. To provide them seperately, use fitEmulator
1 | fitEmulatorData(formula, data, input.names = NULL, ...)
|
formula |
Formula to include the RHS and LHS. The LHS indicates the outputs and the RHS defines the prior mean function defined by the column names of |
data |
A data frame or matrix containing at least the inputs and outputs of the model. |
input.names |
An optional vector of character containing the names of variables in data to be considered as input variables. By default, all variables in the data matrix, except those on the left hand side of the formula, are treated as inputs. |
... |
Additional arguments to be passed to the more specific |
fitEmulatorData
returns an object of class 'emulatorFit'.
See fitEmulator
for details.
If input and output data is in different objects, see fitEmulator
as a more conveniant method.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # specify the prior mean function as a object of class 'formula'
# ensure colnames of datasets include at least these variables.
emulator.prior.mean.formula <- Y ~ X.1 + X.2
# fit the emulator using a prior mean specified above and a Gaussian correlation function.
fit <- fitEmulatorData(formula = emulator.prior.mean.formula, data = surfebm[1:25, ],
cor.function = corGaussian)
# Use fitted emulator to predict posterior means and variances at the new inputs
predictions <- predict(fit, surfebm[26:35, 1:2], sd = FALSE, var.cov = TRUE)
# view results
print(predictions$posterior.mean)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.