| predict.mjmcmc_parallel | R Documentation |
Predict using a mjmcmc result object from a parallel run.
## S3 method for class 'mjmcmc_parallel'
predict(
object,
x,
link = function(x) x,
quantiles = c(0.025, 0.5, 0.975),
x_train = NULL,
...
)
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). |
x_train |
Training design matrix to be provided when imputations are to be made from them |
... |
Not used. |
A list containing aggregated predictions.
mean |
Mean of aggregated predictions. |
quantiles |
Quantiles of aggregated predictions. |
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.