Skip to content

Add support for __regression, drop NaN time points - #54

Open
lentinj wants to merge 2 commits into
mainfrom
surveyindices-retro
Open

lentinj wants to merge 2 commits into
mainfrom
surveyindices-retro

Conversation

@lentinj

@lentinj lentinj commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

This is the companion commit for gadget-framework/gadget3#278 which (finally) fixes surveyindices when the retro_years option is used.

data points for years that aren't run in the model (retro_years) are now NaN, not 0, so we can filter them away.

The __regression array solves the sub-issue in gadget-framework/gadget3#55 that there's no breakdown of the regression output. The new __regression output replaces __params, and has a breakdown. Eventually we can rip out the old one.

There's no harm in merging this and using it against old gadget3, everything should keep working as-is (although obviously you won't be able to use retro_years still).

lentinj and others added 2 commits December 2, 2026 17:46
gadget3 now leaves the model arrays NaN for time points the model
didn't reach (e.g. removed by retro_years). These aren't part of the
fit, so drop them from sidat & catchdist.fleets.

Output for older gadget3 versions is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gadget3 now reports __regression, the intercept & slope of each
combination of a survey index's dimensions (e.g. age). Use it when
available, rather than __params, which only has the final combination.
sidat keeps any age & stock columns, so the rows can be told apart.

Output for older gadget3 versions is unchanged, bar the extra
age / stock columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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