Learn R Programming

FBMS (version 1.1)

predict.gmjmcmc: Predict using a gmjmcmc result object.

Description

Predict using a gmjmcmc result object.

Usage

# S3 method for gmjmcmc
predict(
  object,
  x,
  link = function(x) x,
  quantiles = c(0.025, 0.5, 0.975),
  pop = NULL,
  tol = 1e-07,
  ...
)

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.

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).

pop

The population to plot, defaults to last

tol

The tolerance to use for the correlation when finding equivalent features, default is 0.0000001

...

Not used.

Examples

Run this code
result <- gmjmcmc(
 matrix(rnorm(600), 100),
 P = 2,
 gaussian.loglik,
 loglik.alpha = gaussian.loglik.alpha,
 c("p0", "exp_dbl")
)
preds <- predict(result, matrix(rnorm(600), 100))


Run the code above in your browser using DataLab