fit_ps_mech: Propensity Score Estimation

Description Usage Arguments Value

View source: R/nuisance.R

Description

Estimate the propensity score (PS), g(1|W), the probability of receiving treatment conditional on baseline covariates. In a randomized experiment or A/B test, this is usually known to be g(1|W) = 0.5. In such a case, this known probability is passed in via Lrnr_prob_known.

Usage

1
fit_ps_mech(train_data, valid_data, learner)

Arguments

train_data

A data.table containing those observations falling in the training set for a particular cross-validation sample split. This data object is created by the internal call of est_cate to cross_validate and is (unfortunately) a copy of a subset of the full estimation data.

valid_data

A data.table containing those observations falling in the holdout (validation) set for a particular cross-validation sample split. This data object is created by the internal call of est_cate to cross_validate and is (unfortunately) a copy of a subset of the full estimation data.

learner

An instantiated learner object, with class inheriting from Lrnr_base, from sl3, to be used for estimation of the propensity score (the probability of receiving treatment, conditional on covariates). Note that the outcome of this estimation task is strictly binary and that algorithms or ensembles should be set up accordingly.

Value

A list (as required by cross_validate) containing two slots populated with data.tables for the training and validation data (for a given cross-validation split). Each data.table has two columns, corresponding to estimates of the conditional probability of receiving the treatment ("g1") or the conditional probability of the treatment being withheld ("g0"). Note that values of these two columns should add up to one for any given row.


Netflix/sherlock documentation built on Dec. 17, 2021, 5:22 a.m.