Function to help format input to the term_prep function. Initializes a list with the specific parameters to be passed to the recode function when creating a new term.

term_coding(values, codes = NULL, default = 0, type = NULL)

term_coding_dummy(categories)

term_coding_effect(categories, referent)

Arguments

values

A vector or list of values. Must equal in length to codes.

codes

A vector of values.

type

A character string, either 'replace', 'linear', or 'interval'. If not provided function attempts to determine from input to values.

categories

A vector of values, all cases to be coded as 1 (dummy coding and effect coding).

referent

A vector of values, all cases to be coded as -1 (effect coding).

default.

A value.

Value

A list.