predict.softbart_regression: Predict for SoftBart Regression

View source: R/predict.R

predict.softbart_regressionR Documentation

Predict for SoftBart Regression

Description

Computes predictions from a softbart_regression object on new data.

Usage

## S3 method for class 'softbart_regression'
predict(object, newdata, iterations = NULL, ...)

Arguments

object

A softbart_regression object obtained as output of the softbart_regression() function.

newdata

A dataset to construct predictions on.

iterations

The iterations to get predictions on; includes all of iterations including burn-in and thinning iterations. Defaults to the saved iterations, running from (num_burn + num_thin):(num_burn + num_thin * num_save).

...

Other arguments passed to predict.

Value

A list containing

  • mu: samples of the predicted value for each observation and iteration.

  • mu_mean: posterior predicted values for each observation.


SoftBart documentation built on June 8, 2025, 9:40 p.m.