Learn R Programming

FLAME (version 1.0.0)

CATE: Get the Size and CATE of Matched Group(s)

Description

CATE provides detailed information of the conditional average treatment effect (CATE) and size of each matched group. First, given number of covariates used for matching, CATE(FLAME_object, num_covs = x) returns the covariate values, size and CATE of each matched group. Second, given a covariate combination, CATE(FLAME_object, num_covs = x, cov_name = c("x1", "x2", ...), cov_val = c(0,1,...)) returns the CATE and size of the matched group. Third, if user would like to see all matched groups given a specific covariate combination even when the FLAME algorithm performs matching with more than the number of covariates specified, CATE(FLAME_object, cov_name = c("x1", "x2", ...), cov_val = c(0,1,...)) returns all matched groups containing the covariate combination.

Usage

CATE(FLAME_object, num_covs = NULL, cov_name = NULL, cov_val = NULL)

Arguments

FLAME_object

object returned by applying the FLAME algorithm (FLAME_bit or FLAME_PostgreSQL or FLAME_SQLite)

num_covs

number of covariates used for matching

cov_name

a vector of covariate names

cov_val

a vector of covariate values, where the value position should match cov_name position. In addition, it has to be in character R data type.

Value

data frame with covariate values, CATE, and size of each matched group

Examples

Run this code
# NOT RUN {
data(toy_data)
result <- FLAME::FLAME_bit(data = toy_data, holdout = toy_data)
FLAME::CATE(FLAME_object = result, num_covs  = 2)
FLAME::CATE(FLAME_object = result, num_covs  = 2, cov_name = c("X1", "X2"), cov_val = c("2", "2"))
FLAME::CATE(FLAME_object = result, cov_name = c("X1", "X2"), cov_val = c("2", "2"))
# }

Run the code above in your browser using DataLab