predict.bass {BASS} | R Documentation |
Predict function for BASS. Outputs the posterior predictive samples based on the specified MCMC iterations.
## S3 method for class 'bass' predict( object, newdata, newdata.func = NULL, mcmc.use = NULL, verbose = FALSE, ... )
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? |
... |
further arguments passed to or from other methods. |
Efficiently predicts when two MCMC iterations have the same basis functions (but different weights).
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
.
bass for model fitting and sobol for sensitivity analysis.
# See examples in bass documentation.