Repository navigation
g3_fit: Add f_by_age argument for the age range of F - #53
Merged
Merged
Conversation
By default res.by.year$F is the F of the oldest age of each stock, which is now documented. f_by_age sets the age range (for all stocks, or per stock as a named list). F at age is the sum of the per-step -log(1 - C/N) over the year, then averaged (unweighted) over the ages. Closes #52 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
I don't have time to test it in a branch. If you merge it into the main branch, we can test it as we work. If there are bugs, we'll report them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #52.
res.by.year$F(andf.by.year$F) is by default the F of the oldest age of each stock.f_by_agetog3_fit():NULL(default, oldest age), an age range for all stocks (e.g.c(4, 7)), or a named list per stock (e.g.list(imm = c(1, 2), mat = c(5, 6))). F is NA, with a warning, for stocks with no ages in the range.-log(1 - C/N)summed over the steps of the year, then the unweighted mean over the age range.The default output is unchanged. Checked on two test models (equal and unequal step lengths, two areas):
f.by.yearandres.by.yearare identical tomain, and F for eachf_by_ageoption matches a calculation straight from the report arrays.@MikkoVihtakari could you test this?
🤖 Generated with Claude Code