predict.gmjmcmc_parallel {FBMS}R Documentation

Predict using a gmjmcmc result object from a parallel run.

Description

Predict using a gmjmcmc result object from a parallel run.

Usage

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

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 moddes (in model space).

...

Additional arguments to pass to merge_results.

Value

A list containing aggregated predictions and per model predictions.

aggr

Aggregated predictions with mean and quantiles.

preds

A list of lists containing individual predictions per model per population in object.

Examples

result <- gmjmcmc.parallel(
 runs = 1,
 cores = 1,
 list(populations = "best", complex.measure = 2, tol = 0.0000001),
 matrix(rnorm(600), 100),
 P = 2,
 gaussian.loglik,
 loglik.alpha = gaussian.loglik.alpha,
 c("p0", "exp_dbl")
)
preds <- predict(result$results, matrix(rnorm(600), 100))


[Package FBMS version 1.0 Index]