Package: grf 2.4.0

Erik Sverdrup

grf: Generalized Random Forests

Forest-based statistical estimation and inference. GRF provides non-parametric methods for heterogeneous treatment effects estimation (optionally using right-censored outcomes, multiple treatment arms or outcomes, or instrumental variables), as well as least-squares regression, quantile regression, and survival regression, all with support for missing covariates.

Authors:Julie Tibshirani [aut], Susan Athey [aut], Rina Friedberg [ctb], Vitor Hadad [ctb], David Hirshberg [ctb], Luke Miner [ctb], Erik Sverdrup [aut, cre], Stefan Wager [aut], Marvin Wright [ctb]

grf_2.4.0.tar.gz
grf_2.4.0.tar.gz(r-4.5-noble)grf_2.4.0.tar.gz(r-4.4-noble)
grf_2.4.0.tgz(r-4.4-emscripten)grf_2.4.0.tgz(r-4.3-emscripten)
grf.pdf |grf.html
grf/json (API)

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

Peer review:

Bug tracker:https://github.com/grf-labs/grf/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

cpp

5.87 score 14 packages 1.1k scripts 7.6k downloads 1 mentions 27 exports 8 dependencies

Last updated 10 days agofrom:2f6b371daa. Checks:OK: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 25 2024
R-4.5-linux-x86_64OKNov 25 2024

Exports:average_treatment_effectbest_linear_projectionboosted_regression_forestcausal_forestcausal_survival_forestgenerate_causal_datagenerate_causal_survival_dataget_forest_weightsget_leaf_nodeget_scoresget_treegrf_optionsinstrumental_forestll_regression_forestlm_forestmerge_forestsmulti_arm_causal_forestmulti_regression_forestprobability_forestquantile_forestrank_average_treatment_effectrank_average_treatment_effect.fitregression_forestsplit_frequenciessurvival_foresttest_calibrationvariable_importance

Dependencies:DiceKriginglatticelmtestMatrixRcppRcppEigensandwichzoo

Readme and manuals

Help Manual

Help pageTopics
Get doubly robust estimates of average treatment effects.average_treatment_effect
Estimate the best linear projection of a conditional average treatment effect.best_linear_projection
Boosted regression forestboosted_regression_forest
Causal forestcausal_forest
Causal survival forestcausal_survival_forest
Generate causal forest datagenerate_causal_data
Simulate causal survival datagenerate_causal_survival_data
Given a trained forest and test data, compute the kernel weights for each test point.get_forest_weights
Find the leaf node for a test sample.get_leaf_node
Compute doubly robust scores for a GRF forest objectget_scores
Compute doubly robust scores for a causal forest.get_scores.causal_forest
Compute doubly robust scores for a causal survival forest.get_scores.causal_survival_forest
Doubly robust scores for estimating the average conditional local average treatment effect.get_scores.instrumental_forest
Compute doubly robust scores for a multi arm causal forest.get_scores.multi_arm_causal_forest
Retrieve a single tree from a trained forest object.get_tree
grf package optionsgrf_options
Intrumental forestinstrumental_forest
Local linear forestll_regression_forest
LM Forestlm_forest
Merges a list of forests that were grown using the same data into one large forest.merge_forests
Multi-arm/multi-outcome causal forestmulti_arm_causal_forest
Multi-task regression forestmulti_regression_forest
Plot a GRF tree object.plot.grf_tree
Plot the Targeting Operator Characteristic curve.plot.rank_average_treatment_effect
Predict with a boosted regression forest.predict.boosted_regression_forest
Predict with a causal forestpredict.causal_forest
Predict with a causal survival forest forestpredict.causal_survival_forest
Predict with an instrumental forestpredict.instrumental_forest
Predict with a local linear forestpredict.ll_regression_forest
Predict with a lm forestpredict.lm_forest
Predict with a multi arm causal forestpredict.multi_arm_causal_forest
Predict with a multi regression forestpredict.multi_regression_forest
Predict with a probability forestpredict.probability_forest
Predict with a quantile forestpredict.quantile_forest
Predict with a regression forestpredict.regression_forest
Predict with a survival forestpredict.survival_forest
Print a boosted regression forestprint.boosted_regression_forest
Print a GRF forest object.print.grf
Print a GRF tree object.print.grf_tree
Print the Rank-Weighted Average Treatment Effect (RATE).print.rank_average_treatment_effect
Print tuning output. Displays average error for q-quantiles of tuned parameters.print.tuning_output
Probability forestprobability_forest
Quantile forestquantile_forest
Estimate a Rank-Weighted Average Treatment Effect (RATE).rank_average_treatment_effect
Fitter function for Rank-Weighted Average Treatment Effect (RATE).rank_average_treatment_effect.fit
Regression forestregression_forest
Calculate which features the forest split on at each depth.split_frequencies
Survival forestsurvival_forest
Omnibus evaluation of the quality of the random forest estimates via calibration.test_calibration
Calculate a simple measure of 'importance' for each feature.variable_importance