These functions are the building blocks used to create the multilevel model and are used to specify the names, properties, and variable types.
outcome(name, mean = 10, sd = 5, icc = NULL)within_predictor(name, weight = 1, mean = 0, sd = 1, icc = NULL)
within_time_predictor(name, values, weight = 1)
between_predictor(name, weight = 1, mean = 0, sd = 1)
between_binary_predictor(name, proportion = 0.5, weight = 1)
Returns a mp_variable object based on the variable's type.
a character string for the specific variable's name
a single numeric value that specifies the variable's mean
a single numeric value that specifies the variable's standard deviation
a single numeric value between 0 and 1 that specifies the variable's intraclass correlation.
If NULL then the global ICC specified in effect_size() is used instead.
a single numeric value specifying the variable's contribution to the variance explained metric. Weights are normalized across all variables of the same level.
a numeric vector specifying the time scores that will be repeated within each cluster.
a single numeric value between 0 and 1 that specifies the proportion of 1's at the population.
Note that specifying an icc = 0 in within_predictor()
will result in a centered within cluster (CWC) predictor.
See vignettes for more details.
vignette(package = 'mlmpower')