Research Workflow
Detect Redundant Columns Before Interpreting Regression Coefficients
Inspect the actual model matrix
A regression formula becomes a matrix of columns after categorical encoding, interactions, transformations and exclusions. Exact linear dependencies can make individual coefficients nonidentifiable even when software returns fitted values. Inspect that matrix, not only the original variable list.
The statsmodels pitfalls documentation warns that rank-deficient matrices may not always raise an error. A successful fit call therefore does not establish that every printed coefficient has a unique interpretation.
Identify common dependencies
An intercept plus indicators for every category is a familiar source of redundancy. Other examples include a total entered alongside all its component counts, duplicate transformed columns, or an interaction column that is always zero in the fitted sample.
Check matrix rank, column names and the data support for factor combinations. Distinguish exact redundancy from near-collinearity: both can cause problems, but dropping an arbitrary column without understanding its meaning is not a general solution.
Work through a hypothetical factor
Suppose every participant belongs to exactly one of three sites, A, B or C. The three site indicators sum to one for every row. If the matrix also includes an intercept column of ones, that intercept equals the sum of the three indicators.
Four columns therefore contain at most three independent pieces of information for this factor representation. A reference-category parameterization can omit one indicator, or a no-intercept parameterization can retain all three under the intended model. The choice changes coefficient interpretation, so document it rather than allowing software to silently select a convention.
Recheck after exclusions
A design that was full rank in the complete dataset may become deficient after missing-data exclusions remove a category or combination. Inspect the actual analysis sample and repeat the check for every model with a different denominator.
When changing the parameterization, compare fitted values and intended contrasts on synthetic examples. Some contrasts remain estimable even when individual parameters are not uniquely identified, but that requires explicit reasoning. Keep the original formula, revised matrix definition and explanation with the model record.
The final table should contain interpretable parameters or contrasts supported by the data. A rank check is a safeguard against presenting arbitrary coefficient decompositions as scientific effects; it does not replace assessment of confounding, sampling variation or the appropriateness of the model itself.
Source verification: 6 November 2026. Examples are hypothetical.