Predict from a BayesA Fit

Predict from a BayesA Fit

Description

Computes GEBVs and prediction metrics from a run_bayesa fit. Behaviour and return value are identical to predict.masbayes_bayesr; see that page for usage modes and examples.

Usage

## S3 method for class 'masbayes_bayesa'
predict(object, newdata = NULL, y_new = NULL, X_new = NULL, ...)

Arguments

object An object of class masbayes_bayesa.
newdata Optional numeric design matrix.
y_new Optional response vector for newdata.
Unused.

Value

An object of class masbayes_prediction.

See Also

run_bayesa, summary.masbayes_bayesa, predict.masbayes_bayesr

Examples

library("masbayes")

fit  <- run_bayesa(W_train, y_train, wtw_train, wty_train,
                   sigma2_g      = var(y_train)/2,
                   sigma2_e_init = var(y_train)/2)
pred <- predict(fit, W_test, y_test)
pred$metrics$AUC      # for binary traits