predict.bassBasis {BASS} | R Documentation |
Predict function for BASS. Outputs the posterior predictive samples based on the specified MCMC iterations.
## S3 method for class 'bassBasis' predict( object, newdata, mcmc.use = NULL, trunc.error = FALSE, nugget = T, n.cores = 1, parType = "fork", ... )
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. |
Prediction combined across bass
models.
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.
bassPCA and bassBasis for model fitting and sobolBasis for sensitivity analysis.
# See examples in bass documentation.