create_data_buy {explore}R Documentation

Create data buy

Description

Artificial data that can be used for unit-testing or teaching

Usage

create_data_buy(
  obs = 1000,
  target_name = "buy",
  factorise_target = FALSE,
  target1_prob = 0.5,
  add_extreme = TRUE,
  flip_gender = FALSE,
  add_id = FALSE,
  seed = 123
)

Arguments

obs

Number of observations

target_name

Variable name of target

factorise_target

Should target variable be factorised? (from 0/1 to factor no/yes)?

target1_prob

Probability that target = 1

add_extreme

Add an observation with extreme values?

flip_gender

Should Male/Female be flipped in data?

add_id

Add an id-variable to data?

seed

Seed for randomization

Details

Variables in dataset:

Target in dataset:

Value

A dataset as tibble

Examples

create_data_buy()

[Package explore version 1.3.1 Index]