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

Warning: NaN sel par #31

Closed
brianstock-NOAA opened this issue Dec 2, 2020 · 0 comments
Closed

Warning: NaN sel par #31

brianstock-NOAA opened this issue Dec 2, 2020 · 0 comments

Comments

@brianstock-NOAA
Copy link
Contributor

When calling prepare_wham_input, one of the selectivity parameters is NaN

Warning message:
In log(selpars_hi - selpars_ini) : NaNs produced

In this case the offending parameter was not estimated (mapped to NA). The model ran and converged. However, it caused the OSA residuals to fail:

Doing OSA residuals...
Loading required namespace: parallel
[1] 1
[1] 2
Error in if (xnext + that < parm.range[1]) { : 
  missing value where TRUE/FALSE needed
In addition: Warning message:
In log(selpars_hi - selpars_ini) : NaNs produced
[1] 3
Error in if (xnext + that < parm.range[1]) { : 
  missing value where TRUE/FALSE needed
In addition: Warning message:
In log(selpars_hi - selpars_ini) : NaNs produced

Problem is that the initial selpar was specified greater than the default upper bound (1 for age-specific, n_ages for logistic and double-logistic). Need to add check for this before calculating par$logit_selpars from selpars_ini, selpars_hi, and selpars_lo.

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

1 participant