UpliftPerCat function

Uplift barplot for categorical variables

Uplift barplot for categorical variables

Computes the observed uplift per category and creates a barplot.

UpliftPerCat(data, treat, outcome, x, ...)

Arguments

  • data: a data frame containing the treatment, the outcome and the variable of interest.
  • 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).
  • x: name of the explanatory variable of interest.
  • ...: extra parameters for the barplot.

Returns

returns a barplot representing the uplift per category.

Author(s)

Mouloud Belbahri

Examples

library(tools4uplift) data("SimUplift") binX1 <- BinUplift(data = SimUplift, treat = "treat", outcome = "y", x = "X1", n.split = 100, alpha = 0.01, n.min = 30) SimUplift$quantizedX1 <- predict(binX1, SimUplift$X1) UpliftPerCat(data = SimUplift, treat = "treat", outcome = "y", x = "quantizedX1", xlab='Quantized X1', ylab='Uplift', ylim=c(-1,1))
  • Maintainer: Mouloud Belbahri
  • License: GPL-2 | GPL-3
  • Last published: 2021-01-06

Useful links