Package: stochtree 0.4.4
stochtree: Stochastic Tree Ensembles (XBART and BART) for Supervised Learning and Causal Inference
Flexible stochastic tree ensemble software. Robust implementations of Bayesian Additive Regression Trees (BART) (Chipman, George, McCulloch (2010) <doi:10.1214/09-AOAS285>) for supervised learning and Bayesian Causal Forests (BCF) (Hahn, Murray, Carvalho (2020) <doi:10.1214/19-BA1195>) for causal inference. Enables model serialization and parallel sampling and provides a low-level interface for custom stochastic forest samplers. Includes the grow-from-root algorithm for accelerated forest sampling (He and Hahn (2021) <doi:10.1080/01621459.2021.1942012>), a log-linear leaf model for forest-based heteroskedasticity (Murray (2020) <doi:10.1080/01621459.2020.1813587>), and the cloglog BART model of Alam and Linero (2025) <doi:10.48550/arXiv.2502.00606> for ordinal outcomes.
Authors:
stochtree_0.4.4.tar.gz
stochtree_0.4.4.tar.gz(r-4.7-arm64)stochtree_0.4.4.tar.gz(r-4.7-x86_64)stochtree_0.4.4.tar.gz(r-4.6-arm64)stochtree_0.4.4.tar.gz(r-4.6-x86_64)
stochtree_0.4.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
card.svg |card.png
stochtree/json (API)
NEWS
| # Install 'stochtree' in R: |
| install.packages('stochtree', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/stochastictree/stochtree/issues
Last updated from:41a16d6d0f. Checks:6 OK. Indexed: no.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | OK | 262 | ||
| linux-devel-x86_64 | OK | 236 | ||
| source / vignettes | OK | 262 | ||
| linux-release-arm64 | OK | 255 | ||
| linux-release-x86_64 | OK | 258 | ||
| wasm-release | OK | 203 |
Exports:bartbcfcalibrateInverseGammaErrorVariancecomputeBARTPosteriorIntervalcomputeBCFPosteriorIntervalcomputeContrastBARTModelcomputeContrastBCFModelcomputeForestLeafIndicescomputeForestLeafVariancescomputeForestMaxLeafIndexcreateBARTModelFromCombinedJsoncreateBARTModelFromCombinedJsonStringcreateBARTModelFromJsoncreateBARTModelFromJsonFilecreateBARTModelFromJsonStringcreateBCFModelFromCombinedJsoncreateBCFModelFromCombinedJsonStringcreateBCFModelFromJsoncreateBCFModelFromJsonFilecreateBCFModelFromJsonStringcreateCppJsoncreateCppJsonFilecreateCppJsonStringcreateCppRNGcreateForestcreateForestDatasetcreateForestModelcreateForestModelConfigcreateForestSamplescreateGlobalModelConfigcreateOutcomecreatePreprocessorFromJsoncreatePreprocessorFromJsonStringcreateRandomEffectSamplescreateRandomEffectsDatasetcreateRandomEffectsModelcreateRandomEffectsTrackerextractParametergetRandomEffectSamplesloadForestContainerCombinedJsonloadForestContainerCombinedJsonStringloadForestContainerJsonloadRandomEffectSamplesCombinedJsonloadRandomEffectSamplesCombinedJsonStringloadRandomEffectSamplesJsonloadScalarJsonloadVectorJsonOutcomeModelpreprocessPredictionDatapreprocessTrainDataresetActiveForestresetForestModelresetRandomEffectsModelresetRandomEffectsTrackerrootResetRandomEffectsModelrootResetRandomEffectsTrackersample_without_replacementsampleBARTPosteriorPredictivesampleBCFPosteriorPredictivesampleGlobalErrorVarianceOneIterationsampleLeafVarianceOneIterationsaveBARTModelToJsonsaveBARTModelToJsonFilesaveBARTModelToJsonStringsaveBCFModelToJsonsaveBCFModelToJsonFilesaveBCFModelToJsonStringsavePreprocessorToJsonsavePreprocessorToJsonString
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| stochtree: Stochastic Tree Ensembles (XBART and BART) for Supervised Learning and Causal Inference | stochtree-package stochtree |
| Run BART for Supervised Learning | bart |
| BART Serialization Routines | BARTSerialization createBARTModelFromCombinedJson createBARTModelFromCombinedJsonString createBARTModelFromJson createBARTModelFromJsonFile createBARTModelFromJsonString saveBARTModelToJson saveBARTModelToJsonFile saveBARTModelToJsonString |
| Run BCF for Causal Effect Estimation | bcf |
| BCF Serialization Routines | BCFSerialization createBCFModelFromCombinedJson createBCFModelFromCombinedJsonString createBCFModelFromJson createBCFModelFromJsonFile createBCFModelFromJsonString saveBCFModelToJson saveBCFModelToJsonFile saveBCFModelToJsonString |
| Calibrate Inverse Gamma Prior | calibrateInverseGammaErrorVariance |
| Compute BART Posterior Credible Intervals | computeBARTPosteriorInterval |
| Compute BCF Posterior Credible Intervals | computeBCFPosteriorInterval |
| Compute Contrast for BART Model | computeContrastBARTModel |
| Compute Contrast for BCF Model | computeContrastBCFModel |
| JSON C++ Object Wrapper | CppJson |
| Random Number Generator C++ Wrapper | CppRNG |
| Create CppRNG Object | createCppRNG |
| Create Forest Object | createForest |
| Create ForestDataset Object | createForestDataset |
| Create ForestModel Object | createForestModel |
| Create ForestModelConfig Object | createForestModelConfig |
| Create ForestSamples Object | createForestSamples |
| Create GlobalModelConfig Object | createGlobalModelConfig |
| Create Outcome Object | createOutcome |
| Create RandomEffectSamples Object | createRandomEffectSamples |
| Create RandomEffectsDataset Object | createRandomEffectsDataset |
| Create RandomEffectsModel Object | createRandomEffectsModel |
| Create RandomEffectsTracker Object | createRandomEffectsTracker |
| Data Preprocessing Routines | createPreprocessorFromJson createPreprocessorFromJsonString DataPreprocessing preprocessPredictionData preprocessTrainData savePreprocessorToJson savePreprocessorToJsonString |
| Extract Parameter Samples Generic Function | extractParameter |
| Extract BART Parameter Samples | extractParameter.bartmodel |
| Extract BCF Parameter Samples | extractParameter.bcfmodel |
| Forest C++ Wrapper | Forest |
| Forest Dataset C++ Wrapper | ForestDataset |
| Forest Kernel Computation Routines | computeForestLeafIndices computeForestLeafVariances computeForestMaxLeafIndex ForestKernelComputation |
| Forest Model C++ Wrapper | ForestModel |
| Forest Model Configuration Object | ForestModelConfig |
| Forest Container C++ Wrapper | ForestSamples |
| Forest Container Serialization Routines | ForestSamplesSerialization loadForestContainerCombinedJson loadForestContainerCombinedJsonString loadForestContainerJson |
| Forest State Management Routines | ForestStateManagement resetActiveForest resetForestModel |
| Extract Random Effect Samples Generic Function | getRandomEffectSamples |
| Extract Random Effects Samples from BART Model | getRandomEffectSamples.bartmodel |
| Extract Random Effect Samples from BCF Model | getRandomEffectSamples.bcfmodel |
| Global Model Configuration Object | GlobalModelConfig |
| JSON Creation Routines | createCppJson createCppJsonFile createCppJsonString JSONCreation |
| Load Scalar from JSON | loadScalarJson |
| Load Vector from JSON | loadVectorJson |
| Outcome Data C++ Wrapper | Outcome |
| Create a New Outcome Model Object | OutcomeModel |
| Plot BART Model Fit | plot.bartmodel |
| Plot BCF Model | plot.bcfmodel |
| Predict from a BART Model | predict.bartmodel |
| Predict from BCF Model | predict.bcfmodel |
| Print Summary of BART Model | print.bartmodel |
| Print Summary of BCF Model | print.bcfmodel |
| Summarize a ForestSamples Object | print.ForestSamples |
| Summarize a RandomEffectSamples Object | print.RandomEffectSamples |
| Random Effect Container C++ Wrapper | RandomEffectSamples |
| Random Effects Container Serialization Routines | loadRandomEffectSamplesCombinedJson loadRandomEffectSamplesCombinedJsonString loadRandomEffectSamplesJson RandomEffectSamplesSerialization |
| Random Effects Dataset C++ Wrapper | RandomEffectsDataset |
| Random Effects Model C++ Wrapper | RandomEffectsModel |
| Random Effects State Management Routines | RandomEffectStateManagement resetRandomEffectsModel resetRandomEffectsTracker rootResetRandomEffectsModel rootResetRandomEffectsTracker |
| Random Effects Tracker C++ Wrapper | RandomEffectsTracker |
| Sample Without Replacement | sample_without_replacement |
| Sample BART Posterior Predictive | sampleBARTPosteriorPredictive |
| Sample BCF Posterior Predictive | sampleBCFPosteriorPredictive |
| Sample Global Error Variance | sampleGlobalErrorVarianceOneIteration |
| Sample Leaf Scale | sampleLeafVarianceOneIteration |
| Summarize BART Model Fit and Parameters | summary.bartmodel |
| Summarize BCF Model | summary.bcfmodel |
