Takes a | or || language object and extracts the grouping variable(s),
effect terms (intercept, slopes), and correlation structure. The bar
operator drives the correlated flag: | -> TRUE (LKJ-Cholesky on the
joint slope vector), || -> FALSE (diagonal covariance, one sigma per
coefficient). This matches lme4 / glmmTMB and lets downstream packages
branch on correlated to choose between independent-sigma and Cholesky
parameterizations.
Value
A list of RE specs (one per grouping level). Each spec has:
group_var: character, display label (colon-joined for nested)group_vars: character vector, each element a column namegroup_expr: language or NULL (set when grouping is a non-name expr)slope_terms: list of language objects (slope LHS terms)has_intercept: logicalcorrelated: logical (TRUE for|, FALSE for||)original: the original bar language object