Package: tidytreatment 0.3.0.1

tidytreatment: Tidy Methods for Bayesian Treatment Effect Models

Functions for extracting tidy data from Bayesian treatment effect models, in particular BART, but extensions are possible. Functionality includes extracting tidy posterior summaries as in 'tidybayes' <https://github.com/mjskay/tidybayes>, estimating (average) treatment effects, common support calculations, and plotting useful summaries of these.

Authors:Joshua J Bon [aut, cre]

tidytreatment_0.3.0.1.tar.gz
tidytreatment_0.3.0.1.zip(r-4.5)tidytreatment_0.3.0.1.zip(r-4.4)tidytreatment_0.3.0.1.zip(r-4.3)
tidytreatment_0.3.0.1.tgz(r-4.4-any)tidytreatment_0.3.0.1.tgz(r-4.3-any)
tidytreatment_0.3.0.1.tar.gz(r-4.5-noble)tidytreatment_0.3.0.1.tar.gz(r-4.4-noble)
tidytreatment_0.3.0.1.tgz(r-4.4-emscripten)tidytreatment_0.3.0.1.tgz(r-4.3-emscripten)
tidytreatment.pdf |tidytreatment.html
tidytreatment/json (API)
NEWS

# Install 'tidytreatment' in R:
install.packages('tidytreatment', repos = c('https://bonstats.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/bonstats/tidytreatment/issues

Datasets:

On CRAN:

bayesiantidytreatment-effects

5.68 score 16 stars 1 packages 10 scripts 251 downloads 11 exports 62 dependencies

Last updated 2 years agofrom:e740bcad66. Checks:OK: 1 WARNING: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 21 2024
R-4.5-winWARNINGNov 21 2024
R-4.5-linuxWARNINGNov 21 2024
R-4.4-winWARNINGNov 21 2024
R-4.4-macWARNINGNov 21 2024
R-4.3-winWARNINGNov 21 2024
R-4.3-macWARNINGNov 21 2024

Exports:%>%avg_treatment_effectscovariate_importancecovariate_with_treatment_importancehas_common_supporthas_tidytreatment_methodssimulate_su_hill_datatidy_atetidy_atttreatment_effectsvariance_draws

Dependencies:abindarrayhelpersbackportsbitbit64checkmateclicliprcodacolorspacecpp11crayondbartsdistributionaldplyrfansifarvergenericsggdistggplot2gluegtablehmsisobandlabelinglatticelifecyclemagrittrMASSMatrixmatrixStatsmgcvmunsellnlmenumDerivpillarpkgconfigposteriorprettyunitsprogresspurrrquadprogR6RColorBrewerRcppreadrrlangscalesstringistringrsvUnittensorAtibbletidybayestidyrtidyselecttzdbutf8vctrsviridisLitevroomwithr

Using the tidytreatment package with BART

Rendered fromuse-tidytreatment-BART.Rmdusingknitr::rmarkdownon Nov 21 2024.

Last update: 2022-02-19
Started: 2020-04-27

Using the tidytreatment package with bartCause

Rendered fromuse-tidytreatment-bartCause.Rmdusingknitr::rmarkdownon Nov 21 2024.

Last update: 2023-05-18
Started: 2023-05-18

Readme and manuals

Help Manual

Help pageTopics
Get (conditional) average treatment effect draws from posterioravg_treatment_effects
Example model 1bartmodel1
Model matrix used for 'bartmodel1'bartmodel1_modelmatrix
Counts of variable overall inclusioncovariate_importance
Counts of variable inclusion when interacting with treatmentcovariate_with_treatment_importance
Get expected prediction draws from posterior of 'bartCause'-package objectsepred_draws.bartcFit
Get expected prediction draws from posterior of 'stan4bart'-package modelsepred_draws.stan4bartFit
Get fitted draws from posterior of 'BART'-package modelsfitted_draws_BART
Get fitted draws from posterior of 'bartMachine' modelfitted_draws.bartMachine
Get fitted draws from posterior of 'lbart' modelfitted_draws.lbart
Get fitted draws from posterior of 'mbart' modelfitted_draws.mbart
Get fitted draws from posterior of 'mbart2' modelfitted_draws.mbart2
Get fitted draws from posterior of 'pbart' modelfitted_draws.pbart
Get fitted draws from posterior of 'wbart' modelfitted_draws.wbart
Evaluate if observations have common support.has_common_support
Check if a model class has required generic methods for tidytreatment functions.has_tidytreatment_methods
ACIC2019 High Dimensional Test DatasethighDim_testdataset3
Get expected prediction draws (on linear scale) from posterior of 'bartCause'-package objectslinpred_draws.bartcFit
Get expected prediction draws (on linear scale) from posterior of 'stan4bart'-package modelslinpred_draws.stan4bartFit
Get posterior tree draws into tibble format from BART modelposterior_trees_BART
Get predict draws from posterior of 'BART'-package modelspredicted_draws_BART
Get prediction draws from posterior of 'bartCause'-package objectspredicted_draws.bartcFit
Get predict draws from posterior of 'bartMachine' modelpredicted_draws.bartMachine
Get prediction draws from posterior of 'stan4bart'-package modelspredicted_draws.stan4bartFit
Get predict draws from posterior of 'wbart' modelpredicted_draws.wbart
Get residual draw for BART modelresidual_draws_BART
Get residual draw for 'bartMachine' modelresidual_draws.bartMachine
Get residual draw for 'pbart' modelresidual_draws.pbart
Get residual draw for 'wbart' modelresidual_draws.wbart
Simulate data with scenarios from Hill and Su (2013)simulate_su_hill_data
Example simulated dataset 1suhillsim1
Example simulated dataset 2: with subject specific random effectssuhillsim2_ranef
Get average treatment effect draws from posteriortidy_ate
Get average treatment effect on treated draws from posteriortidy_att
Tidy access to posterior of 'bartCause'-package objectstidy_draws.bartcFit
tidytreatment: Tidy methods for Bayesian treatment effect modelstidytreatment
Get (individual) treatment effect draws from posteriortreatment_effects
Get (individual) treatment effect draws from bartcFit posteriortreatment_effects.bartcFit
Get treatment effect draws from posteriortreatment_effects.default
Get variance draws from posterior of BART modelsvariance_draws