Provides predictions and posterior credible/prediction intervals for given feature vectors.
# S3 method for mvrm
predict(object, newdata, interval = c("none", "credible", "prediction"),
level = 0.95, nSamples = 100, ...)
an object of class "mvrm", usually a result of a call to mvrm
.
data frame of feature vectors to obtain predictions for. If newdata is missing, the function will use the feature vectors in the data frame used to fit the mvrm object.
type of interval calculation.
tolerance level.
number of samples to obtain from the posterior predictive distribution (for each sweep of the MCMC). Only relevant for "prediction intervals".
other arguments.
Predictions for given covariate/feature vectors.
The function returns predictions of new responses or the means of the responses for given feature vectors. Predictions for new responses or the means of new responses are the same. However, the two differ in the associated level of uncertainty: response predictions are associated with wider (prediction) intervals than mean response predictions. To obtain prediction intervals (for new responses) the function samples from the normal distributions with means and variances as sampled during the MCMC run.
# NOT RUN {
#see \code{mvrm} example
# }
Run the code above in your browser using DataLab