Function to help format input to the term_prep function. Initializes the sublist with the parameters for creating a new term by combining other existing terms (e.g., an interaction).

term_combo(combine, label = "", transformation = NULL, scale = NULL)

Arguments

combine

A character vector, the names of the terms/variables to combine. Providing a named vector

label

An optional label for the new term.

transformation

An optional character string specifying an R expression indicating how terms should be combined. Variables are matched to the named elements of combine. If not provided defaults to multiplying all terms together (i.e., an interaction).

scale

Either a logical value, or a named vector of the form c(m = ..., sd = ...) for standardizing the term.

Value

A list.