powered by
Predict Using an MJMCMC Result Object from a Parallel Run
# S3 method for mjmcmc_parallel predict( object, x, link = function(x) x, quantiles = c(0.025, 0.5, 0.975), x_train = NULL, ... )
A list containing aggregated predictions.
Mean of aggregated predictions.
Quantiles of aggregated predictions.
The model to use.
The new data to use for the prediction, a matrix where each row is an observation.
The link function to use
The quantiles to calculate credible intervals for the posterior modes (in model space).
Training design matrix to be provided when imputations are to be made from them
Not used.
result <- mjmcmc.parallel(runs = 1, cores = 1, x = matrix(rnorm(600), 100), y = matrix(rnorm(100), 100), loglik.pi = gaussian.loglik) preds <- predict(result, matrix(rnorm(600), 100))
Run the code above in your browser using DataLab