Learn R Programming

⚠️There's a newer version (2.3.2) of this package.Take me there.

grf (version 2.0.1)

Generalized Random Forests

Description

A pluggable package for forest-based statistical estimation and inference. GRF currently provides methods for non-parametric least-squares regression, quantile regression, survival regression and treatment effect estimation (optionally using instrumental variables), with support for missing values.

Copy Link

Version

Install

install.packages('grf')

Monthly Downloads

7,924

Version

2.0.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Julie Tibshirani

Last Published

July 6th, 2021

Functions in grf (2.0.1)

best_linear_projection

Estimate the best linear projection of a conditional average treatment effect using a causal forest, or causal survival forest.
average_partial_effect

Average partial effect (removed)
causal_survival_forest

Causal survival forest (experimental)
custom_forest

Custom forest (removed)
boosted_regression_forest

Boosted regression forest (experimental)
average_treatment_effect

Get doubly robust estimates of average treatment effects.
create_dot_body

Writes each node information If it is a leaf node: show it in different color, show number of samples, show leaf id If it is a non-leaf node: show its splitting variable and splitting value If trained with missing values, the edge arrow is filled according to which direction the NAs are sent.
average_late

Average LATE (removed)
causal_forest

Causal forest
compute_eta

Compute pseudo outcomes (based on the influence function of tau(X) for each unit) used for CART splitting.
expected_survival

Compute E[T | X]
export_graphviz

Export a tree in DOT format. This function generates a GraphViz representation of the tree, which is then written into `dot_string`.
generate_causal_survival_data

Simulate causal survival data
generate_causal_data

Generate causal forest data
leaf_stats.regression_forest

Calculate summary stats given a set of samples for regression forests.
get_scores.causal_forest

Compute doubly robust scores for a causal forest.
get_scores.causal_survival_forest

Compute doubly robust scores for a causal survival forest.
ll_regression_forest

Local linear forest
leaf_stats.causal_forest

Calculate summary stats given a set of samples for causal forests.
get_scores.instrumental_forest

Doubly robust scores for estimating the average conditional local average treatment effect.
get_scores.multi_arm_causal_forest

Compute doubly robust scores for a multi arm causal forest.
get_scores

Compute doubly robust scores for a GRF forest object
leaf_stats.instrumental_forest

Calculate summary stats given a set of samples for instrumental forests.
get_sample_weights

Retrieve forest weights (renamed to get_forest_weights)
leaf_stats.default

A default leaf_stats for forests classes without a leaf_stats method that always returns NULL.
predict.ll_regression_forest

Predict with a local linear forest
predict.multi_arm_causal_forest

Predict with a multi arm causal forest
predict.instrumental_forest

Predict with an instrumental forest
predict.causal_survival_forest

Predict with a causal survival forest forest
predict.quantile_forest

Predict with a quantile forest
merge_forests

Merges a list of forests that were grown using the same data into one large forest.
predict.regression_forest

Predict with a regression forest
predict.boosted_regression_forest

Predict with a boosted regression forest.
predict.causal_forest

Predict with a causal forest
probability_forest

Probability forest
print.tuning_output

Print tuning output. Displays average error for q-quantiles of tuned parameters.
multi_arm_causal_forest

Multi-arm causal forest (experimental)
get_forest_weights

Given a trained forest and test data, compute the kernel weights for each test point.
tune_forest

Tune a forest
instrumental_forest

Intrumental forest
tune_causal_forest

Causal forest tuning (removed)
test_calibration

Omnibus evaluation of the quality of the random forest estimates via calibration.
predict.multi_regression_forest

Predict with a multi regression forest
tune_instrumental_forest

Instrumental forest tuning (removed)
print.boosted_regression_forest

Print a boosted regression forest
tune_ll_regression_forest

Local linear forest tuning
predict.survival_forest

Predict with a survival forest
tune_ll_causal_forest

Local linear forest tuning
print.grf

Print a GRF forest object.
survival_forest

Survival forest
print.grf_tree

Print a GRF tree object.
split_frequencies

Calculate which features the forest split on at each depth.
get_tree

Retrieve a single tree from a trained forest object.
get_leaf_node

Find the leaf node for a test sample.
tune_regression_forest

Regression forest tuning (removed)
regression_forest

Regression forest
multi_regression_forest

Multi-task regression forest
grf-package

grf: Generalized Random Forests
plot.grf_tree

Plot a GRF tree object.
quantile_forest

Quantile forest
predict.probability_forest

Predict with a probability forest
variable_importance

Calculate a simple measure of 'importance' for each feature.