predicted_draws.wbart: Get predict draws from posterior of 'wbart' model

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

predicted_draws.wbartR Documentation

Get predict draws from posterior of wbart model

Description

Get predict draws from posterior of wbart model

Usage

## S3 method for class 'wbart'
predicted_draws(
  object,
  newdata,
  value = ".prediction",
  ...,
  ndraws = NULL,
  include_newdata = TRUE,
  include_fitted = FALSE,
  include_sigsqs = FALSE
)

Arguments

object

A wbart model.

newdata

Data frame to generate predictions from. If omitted, most model types will generate predictions from the data used to fit the model.

value

The name of the output column for predicted_draws; default ".prediction".

...

Use to specify random number generator, default is rng=stats::rnorm.

ndraws

Not currently implemented.

include_newdata

Should the newdata be included in the tibble?

include_fitted

Should the posterior fitted values be included in the tibble?

include_sigsqs

Should the posterior sigma-squared draw be included?

Value

A tidy data frame (tibble) with predicted values.


tidytreatment documentation built on March 18, 2022, 6:30 p.m.