Skip to content

Align mixed-model degrees of freedom by coefficient name - #342

Open
xec-cm wants to merge 1 commit into
FrederickHuangLin:bugfixfrom
xec-cm:fix-mixed-model-df-alignment
Open

xec-cm wants to merge 1 commit into
FrederickHuangLin:bugfixfrom
xec-cm:fix-mixed-model-df-alignment

Conversation

@xec-cm

@xec-cm xec-cm commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

This fixes how coefficient-specific degrees of freedom are combined in .iter_remle().

Some taxon-specific mixed models omit fixed-effect terms. Their df vectors were being combined by position rather than coefficient name, which could recycle values and assign the wrong degrees of freedom and therefore incorrect p-values to other terms.

The change aligns each vector by coefficient name and keeps NA for omitted terms or failed fits. Fitted coefficients and standard errors are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant