Learn R Programming

FBMS (version 1.1)

predict.mjmcmc: Predict using a mjmcmc result object.

Description

Predict using a mjmcmc result object.

Usage

# S3 method for mjmcmc
predict(object, x, link = function(x) x, quantiles = c(0.025, 0.5, 0.975), ...)

Value

A list containing aggregated predictions.

mean

Mean of aggregated predictions.

quantiles

Quantiles of aggregated predictions.

Arguments

object

The model to use.

x

The new data to use for the prediction, a matrix where each row is an observation.

link

The link function to use

quantiles

The quantiles to calculate credible intervals for the posterior modes (in model space).

...

Not used.

Examples

Run this code
result <- mjmcmc(matrix(rnorm(600), 100), gaussian.loglik)
preds <- predict(result, matrix(rnorm(500), 100))

Run the code above in your browser using DataLab