predict.bass {BASS} | R Documentation |
BASS Prediction
Description
Predict function for BASS. Outputs the posterior predictive samples based on the specified MCMC iterations.
Usage
## S3 method for class 'bass'
predict(
object,
newdata,
newdata.func = NULL,
mcmc.use = NULL,
verbose = FALSE,
nugget = FALSE,
...
)
Arguments
object |
a fitted model, output from the |
newdata |
a matrix of new input values at which to predict. The columns should correspond to the same variables used in the |
newdata.func |
a matrix of new values of the functional variable. If none, the same values will be used as in the training data. |
mcmc.use |
a vector indexing which MCMC iterations to use for prediction. |
verbose |
logical; should progress be displayed? |
nugget |
logical; should predictions include error? If FALSE, predictions will be for mean. |
... |
further arguments passed to or from other methods. |
Details
Efficiently predicts when two MCMC iterations have the same basis functions (but different weights).
Value
If model output is a scalar, this returns a matrix with the same number of rows as newdata
and columns corresponding to the the MCMC iterations mcmc.use
. These are samples from the posterior predictive distribution. If model output is functional, this returns an array with first dimension corresponding to MCMC iteration, second dimension corresponding to the rows of newdata
, and third dimension corresponding to the rows of newdata.func
.
See Also
bass for model fitting and sobol for sensitivity analysis.
Examples
# See examples in bass documentation.