make_patterns: Construct binary covariate pattern matrix

View source: R/COLA.R

make_patternsR Documentation

Construct binary covariate pattern matrix

Description

Builds the full design grid of binary fixed-effect patterns used by COLA to aggregate counts and outcome sums. When 'intercept = TRUE', an 'Intercept' column of ones is included and all other variables are expanded over {0,1}.

Usage

make_patterns(x_names, intercept = TRUE)

Arguments

x_names

Character vector of fixed-effect names. If 'intercept = TRUE', it may include '"Intercept"'; otherwise it must not.

intercept

Logical; include a fixed intercept column. Default: 'TRUE'.

Value

A tibble of all binary patterns over 'x_names' (with/without 'Intercept'), one row per pattern.


pda documentation built on Nov. 18, 2025, 1:07 a.m.

Related to make_patterns in pda...