Creates a likelihood object from a categorical variable with three or more levels, grouped by a secondary categorical variable if provided.
Value
Returns an object of class "inz_lmulti".
An object of class "inz_lmulti" is a list which contains the following:
- x
the count of observations in each level (as a vector or as a table if grouped).
- levels
the levels of the primary variable.
- groups
the levels of the secondary variable, or "none" if not grouped.
Details
Both primary and secondary must be categorical variables.
They can be passed as a string (e.g. "Qualification") or as a non-string (e.g. Qualification).
The primary variable must have three or more levels.
If the primary variable has only two levels, use inz_lbinom.