QiniTable: A function to compute the performance of an uplift estimator.

Description Usage Arguments Examples

View source: R/uplift.R

Description

Adapted from QiniTable in the tools4uplift package by Florian Zettelmeyer to ensure that the n-tiles are calculated based on the treatment observations, not the stacked observations..

Usage

1
QiniTable(data, treat, outcome, prediction, nb.group = 10)

Arguments

data:

a data frame containing the treatment, the outcome and the predictors.

treat:

name of a binary (numeric) vector representing the treatment assignment (coded as 0/1)

outcome:

name of a binary response (numeric) vector (coded as 0/1)

prediction:

a score to sort the observations from highest to lowest uplift or propensity.

nb.group:

(optional, default = 10)

Examples

1
2
3
4
5
6
7
QiniTable(
 expdata_stacked.test,
 treat = "ad",
 outcome = "converted",
 prediction = "score_logitFit_treat",
 nb.group = 20
)

fzettelmeyer/mktg482 documentation built on May 26, 2020, 2:26 p.m.