23.18 Effective rank, pseudo-inverse, and ridge stabilization
Efficient information can contain weak directions because category columns are sparse, spline bases overlap, covariates are nearly collinear, or a candidate direction resembles an active/nuisance direction. Eigenvalue decomposition separates well-supported from near-zero directions. The effective rank, not merely the number of columns, supplies the score-test degrees of freedom.
A pseudo-inverse discards directions below numerical tolerance instead of dividing by almost zero. Modest ridge stabilization can make a nearly singular positive matrix usable. nlmx records the inverse method and ridge; --ridge-max is a safety rail, and exceeding it is a failure. These operations address numerical near-singularity, not substantive lack of information.
A categorical block with nominal three degrees of freedom but rank two is not evidence about all three contrasts. A large ridge or unexpected rank loss should trigger review of counts, references, coding, design support, and redundant candidates. A clearly negative eigenvalue is different from a tiny positive eigenvalue: it can indicate incompatible or noisy information and should not be repaired silently.
Preserve matrices with --write-matrices for qualification and difficult cases.
Distinguishing numerical and scientific nonidentifiability
Numerical nonidentifiability can sometimes improve with scaling, a better derivative step, or removal of an exactly redundant column. Scientific nonidentifiability arises when the data cannot distinguish effects—for example, a category occurs in only one study or WT and dose are nearly perfectly linked. No ridge setting creates the missing design information. Review the singular vector or implicated columns, then inspect the subject distribution that supports them. If rank loss reflects the design, simplify or combine a candidate only when scientifically defensible and report the limitation. If it reflects code duplication, correct the candidate construction and rerun the entire family.
Common mistakes
- Reporting nominal degrees of freedom after rank loss.
- Treating ridge as a universal cure.
- Raising
--ridge-maxsolely to finish a run. - Ignoring sparse levels and redundant columns.
- Conflating a pseudo-inverse with evidence for all original contrasts.
Checklist
- Review eigenvalues, effective rank, method, and ridge.
- Confirm category counts and basis construction.
- Investigate unexpected rank loss.
- Fail explicitly on materially negative information.
- Refit or redesign weak candidates.
Further reading
See multi-df blocks, matrices output, and troubleshooting.