predicted_draws.stan4bartFit: Get prediction draws from posterior of 'stan4bart'-package...

View source: R/tidy-posterior-stan4bart.R

predicted_draws.stan4bartFitR Documentation

Get prediction draws from posterior of stan4bart-package models

Description

Get prediction draws from posterior of stan4bart-package models

Usage

## S3 method for class 'stan4bartFit'
predicted_draws(
  object,
  newdata,
  ...,
  value = ".prediction",
  sample_new_levels = TRUE
)

Arguments

object

A stan4bartFit object.

newdata

Data frame to generate predictions from [optional].

...

Additional arguments passed to the underlying prediction method for the type of model given.

value

The name of the output column.

sample_new_levels

logical; if TRUE, levels out of the training sample will have random effects drawn from their posterior predictive distribution. If FALSE, their random effects will be fixed to 0.


tidytreatment documentation built on Dec. 7, 2025, 1:07 a.m.