| predict.bassBasis {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 'bassBasis'
predict(
object,
newdata,
mcmc.use = NULL,
trunc.error = FALSE,
nugget = T,
n.cores = 1,
parType = "fork",
...
)
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 |
mcmc.use |
a vector indexing which MCMC iterations to use for prediction. |
trunc.error |
logical, use basis truncation error when predicting? |
nugget |
logical, use individual |
n.cores |
number of cores, though 1 is often the fastest. |
parType |
either "fork" or "socket". Forking is typically faster, but not compatible with Windows. If |
... |
further arguments passed to or from other methods. |
Details
Prediction combined across bass models.
Value
An array with first dimension corresponding to MCMC iteration, second dimension corresponding to the rows of newdata, and third dimension corresponding to the multivariate/functional response.
See Also
bassPCA and bassBasis for model fitting and sobolBasis for sensitivity analysis.
Examples
# See examples in bass documentation.