nmfs-fish-tools/SSMSE

Nsamp for conditional age at length in sample_struct

Closed this issue · 3 comments

After reading the description of sample_struct and searching through the code, I'm not clear how specifying Nsamp for CAAL data gets treated in the data generation component. Specifically, does the user need to specify a unique Nsamp value for each year-lengthbin combination in the future, and if so, what sort of additional sub setting is performed (a la ss3sim::sample_calcomp) to produce the resultant simulated data?

@mkapur-noaa thanks for the question! SSMSE is just using the bootstrapping module of SS3 for sampling, so the sample sizes are as specified in the ss3 user manual:

The sample size for conditional age-at-length data matches the inputs for each length bin. If stratified sampling is used, this may be appropriate, but if the ages represent a random subset of the selected population, this may result in less variability than if the associated length distribution were resampled.

I think it's correct that the user needs to provide a unique Nsamp for each year-lengthbin combination.

Let me know if that helps or if more clarification is still needed!

Thank you for this clarification. I will generate a vector of sex- and bin- specific input sample sizes for our purposes.

As an aside, our implementation of the helper function didn't get us there at first because we actually had two separate chunks in the .dat file for the same fleet (you can see this here); the first chunk is ghosted (all values are -7) so the helper ignored that fleet entirely, not picking up that there were indeed CAAL entries for that fleet later on (starting on line 792).

Thanks for your help! You are welcome to close this issue.

Thanks @mkapur-noaa! Thanks for reporting the issue with the helper function; I'll open a new issue to take a look at it.