treatment_effects.default: Get treatment effect draws from posterior

Description Usage Arguments Value

View source: R/treatment-effects-posterior.R

Description

CTE = Conditional Treatment Effects (or CATE, the average effects) newdata specifies the conditions, if unspecified it defaults to the original data. Assumes treated column is either a integer column of 1's (treated) and 0's (nontreated) or logical indicating treatment if TRUE.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Default S3 method:
treatment_effects(
  model,
  treatment,
  newdata,
  subset = "all",
  common_support_method,
  cutoff,
  ...
)

Arguments

model

A supported Bayesian model fit that can provide fits and predictions.

treatment

A character string specifying the name of the treatment variable.

newdata

Data frame to generate fitted values from. If omitted, defaults to the data used to fit the model.

subset

Either "treated", "nontreated", or "all". Default is "all".

common_support_method

Either "sd", or "chisq". Default is unspecified, and no common support calculation is done.

cutoff

Cutoff for common support (if in use).

...

Arguments to be passed to tidybayes::fitted_draws typically scale for BART models.

Value

A tidy data frame (tibble) with treatment effect values.


tidytreatment documentation built on June 23, 2021, 9:07 a.m.