View source: R/create_uplift_formula.R
create_uplift_formula | R Documentation |
create_uplift_formula
is a helper function to create a formula object
as required by most functions in the uplift package.
create_uplift_formula(x, y, trt, env = parent.frame())
x |
A character vector of predictor names. |
y |
A character vector of the response name. |
trt |
A character vector of the treatment name. |
env |
The environment associated with the result, the calling environment by default. |
A formula object.
Leo Guelman leo.guelman@gmail.com
set.seed(1) df <- sim_uplift(n = 100, p = 20, response = "binary") f <- create_uplift_formula(names(df)[-c(1:3)], "y", "T") class(f) environment(f) # the callling environment
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.