Skip to contents

This function fills in a variable with simulated data based on the provided parameters.

Usage

fillInVariable(name, mu, sd, level)

Arguments

name

The name of the variable.

mu

A numeric value or a numeric vector (of length = level) representing the mean.

sd

A numeric value representing the standard deviation, or NA if not applicable.

level

A numeric value specifying the number of levels to simulate.

Value

A data frame or a list containing the simulated data for the variable.

Examples

variable_data <- fillInVariable(name = "myVariable", mu = c(2, 3), sd = NA, level = 2)