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 bass function.

newdata

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.

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 bass nugget variances when predicting?

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 n.cores==1, parType is ignored.

...

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.


[Package BASS version 1.2.2 Index]