predict.softbart_probit: Predict for SoftBart Probit Regression

View source: R/predict.R

predict.softbart_probitR Documentation

Predict for SoftBart Probit Regression

Description

Computes predictions from a softbart_probit object for new data.

Usage

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

Arguments

object

A softbart_probit object obtained as output of the softbart_probit function.

newdata

A dataset to construct predictions on.

iterations

The iterations 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 nonparametric function for each observation, where pnorm(mu) is the success probability.

  • mu_mean: posterior mean of mu.

  • p: samples of the success probability pnorm(mu) for each observation.

  • p_mean: posterior mean of p.


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