Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: should ragged IAA_mats (varying ages) work by using index_sel_start_age and index_sel_end_age? #37

Open
tcarruth opened this issue Mar 11, 2021 · 2 comments

Comments

@tcarruth
Copy link

Line 173 of prepare_wham_input():

temp = asap3$IAA_mats[[i]][, 3 + 1:data$n_ages]

requires that all IAA mats have data for all n_ages. However, the NMFS fall survey (that I have at least) goes from ages 1 to 5, while the spring survey goes from ages 1 to 8.

I was wondering if this is the intended role of the $index_sel_start_age and $index_sel_end_age slots?

It looks like I can just expand out these matrices to include NAs otherwise.

@timjmiller
Copy link
Owner

timjmiller commented Mar 11, 2021 via email

@brianstock-NOAA
Copy link
Contributor

brianstock-NOAA commented Mar 11, 2021

index_sel_start_age and index_sel_end_age are in the ASAP .dat file but not used in WHAM (they're in read_asap3_dat() but not in prepare_wham_input() or wham_v0.cpp). I believe it is necessary to expand the IAA mats to age 8 as you note, because prepare_wham_input() fills in index_paa using IAA_mats[[i]][, 3 + 1:data$n_ages].

If using age-specific selectivity, lines 382-416 of prepare_wham_input check for ages with 0 catch (proportions at age < 1e-5). The selectivity parameters for these ages are set to 0 and mapped to NA (not estimated).

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

No branches or pull requests

3 participants