Skip to contents

Initialize variable

Usage

init_variable(list_var = c(), name = "myVariable", sd = 0.2, level = 2, mu = 0)

Arguments

list_var

Either c() or output of init_variable

name

Variable name

sd

Either numeric value or NA. Use to specify range of effect sizes.

level

Numeric value to specify the number of levels to simulate. Default = 2.

mu

Either a numeric value or a numeric vector (of length = level). Default : 0. Not recommended to modify.

Value

A list with initialized variables

Examples

init_variable(name = "my_varA", sd = 0.50, level = 200)
#> Variable name should not contain digits, spaces, or special characters.
#> If any of these are present, they will be removed from the variable name.
#> $myvarA
#>   mu  sd level
#> 1  0 0.5   200
#>