create_data_random: Create data random
Description
Random data that can be used for unit-testing or teaching
Usage
create_data_random(
obs = 1000,
vars = 10,
target_name = "target_ind",
factorise_target = FALSE,
target1_prob = 0.5,
add_id = TRUE,
seed = 123
)
Arguments
- obs
Number of observations
- vars
Number of variables
- target_name
Variable name of target
- factorise_target
Should target variable be factorised?
(from 0/1 to facotr no/yes)?
- target1_prob
Probability that target = 1
- add_id
Add an id-variable to data?
- seed
Seed for randomization
Details
Variables in dataset:
Target in dataset:
Examples
Run this codecreate_data_random(obs = 100, vars = 5)
Run the code above in your browser using DataLab