lp_r_learner: Lp-R-Learner

View source: R/lp_r_learner.R

lp_r_learnerR Documentation

Lp-R-Learner

Description

This function computes the Lp-R-Learner approach to CATE estimation.

Usage

lp_r_learner(x0, y, a, x, mu.x, pi.x, basis, order_basis, kernel)

Arguments

x0

evaluation points, i.e. E(Y^1 - Y^0 | x0)

y

vector of outcomes

a

vector of treatments

x

matrix of covariates

mu.x

a function with arguments y, x, new.x computing the regression of y on x and evaluating it at new.x.

pi.x

a function with arguments a, x, new.x computing the propensity score and evaluating it at new.x.

basis

a function with arguments x and j returning the j^th basis element applied to x, e.g. x^j. It will be the building block to compute a tensor product basis.

order_basis

the order of the basis

kernel

a function with arguments x and x_0 returning K((x - x0) / h) / h

Value

a list containing the following components:

est

estimate of the CATE at x0

fold_k_est

length(x0)xnsplits matrix with estimates of the CATE at x0 in each fold.


matteobonvini/drl.cate documentation built on Nov. 10, 2024, 12:20 a.m.