Predict function for BASS. Outputs the posterior predictive samples based on the specified MCMC iterations.
# S3 method for bassBasis
predict(
object,
newdata,
mcmc.use = NULL,
trunc.error = FALSE,
nugget = T,
n.cores = 1,
parType = "fork",
...
)a fitted model, output from the bass function.
a matrix of new input values at which to predict. The columns should correspond to the same variables used in the bassBasis or bassPCA functions.
a vector indexing which MCMC iterations to use for prediction.
logical, use basis truncation error when predicting?
logical, use individual bass nugget variances when predicting?
number of cores, though 1 is often the fastest.
either "fork" or "socket". Forking is typically faster, but not compatible with Windows. If n.cores==1, parType is ignored.
further arguments passed to or from other methods.
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.
Prediction combined across bass models.
bassPCA and bassBasis for model fitting and sobolBasis for sensitivity analysis.
# NOT RUN {
# See examples in bass documentation.
# }
Run the code above in your browser using DataLab