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

Issue when simulating paa and age-specific selectivity == 0 #80

Closed
GiancarloMCorrea opened this issue May 15, 2023 · 5 comments
Closed

Comments

@GiancarloMCorrea
Copy link

Let's assume we have age-specific selectivity for a given fleet, and selectivity is = 0 for ages 1 and 2. The set_osa_obs.R script will remove the paa observations for those ages in the 'obs' data frame.

Now, if we want to simulate paa data for that fleet, an issue arises here (same for surveys). The length of the vector 't_pred_paa' is = n_ages, but the length of the vector 'ages_obs_y' is = n_ages - 2 (ages 1 and 2 were removed). Therefore, these lines will be problematic: n_ages simulated values will be produced and sorted in a vector whose length = n_ages - 2.

I fixed this issue here, but want to confirm if this would be the best way to do it.

@timjmiller
Copy link
Owner

timjmiller commented May 22, 2023 via email

@GiancarloMCorrea
Copy link
Author

Hi Tim,

I used multinom. I agree, that issue will happen only with those options.

@timjmiller
Copy link
Owner

timjmiller commented May 22, 2023 via email

@Cole-Monnahan-NOAA
Copy link
Collaborator

When I do this the data are always. I've only experimented with this setup using the multinomial but it seemed to estimate fine.

@timjmiller
Copy link
Owner

This is now corrected on devel branch.

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