simdata: simdata

Description Usage Arguments Value Examples

Description

Simulate some data to test the tree on. The resulting dataframe will have multiple factorial predictors (1/0), named "pred1", "pred2", ... and a continuous outcome variable named "out".

Usage

1
simdata(n_obs, n_vars, predictors = "factor", output = "cont")

Arguments

n_obs

number of observations, i.e. number of rows in the dataframe

n_vars

number of variables, i.e. total number of columns in the dataframe (including the outcome!)

predictors

predictor type ("factor" by default) – TO BE EXTENDED!

output

output variable type ("cont" by default) – TO BE EXTENDED!

Value

a dataframe with multiple predictors and a single outcome variable

Examples

1
2
dat = simdata(n_obs = 500, n_vars = 5)
head(dat)

andriizakharov/DDMtree documentation built on May 21, 2019, 9:19 a.m.