Create syntax for a single random intercept term based on a vector of variable names and a variable name for the random intercept term. Used internally by random_intercepts.

a_random_intercept(vars, varname)

Arguments

vars

Vector of variable names (column names in the target data.frame).

varname

Used to name the latent random intercept.

Value

A list with the model text in model_text, random intercept name in varname, and type set to 'latent' (not used yet).