residual_draws.pbart: Get residual draw for 'pbart' model

Description Usage Arguments Value

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

Description

The original response variable must be passed as an argument to this function. e.g. 'response = y'

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'pbart'
residual_draws(
  object,
  newdata,
  value = ".residual",
  ...,
  ndraws = NULL,
  include_newdata = TRUE,
  include_sigsqs = FALSE
)

Arguments

object

wbart model.

newdata

Data frame to generate predictions from. If omitted, original data used to fit the model.

value

Name of the output column for residual_draws; default is .residual.

...

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

ndraws

Not currently implemented.

include_newdata

Should the newdata be included in the tibble?

include_sigsqs

Should the posterior sigma-squared draw be included?

Value

Tibble with residuals.


tidytreatment documentation built on July 26, 2021, 9:06 a.m.