mareframe / mfdbatlantis

MareFrame Atlantis routines
GNU General Public License v3.0
1 stars 2 forks source link

Survey selectivity #4

Closed lentinj closed 8 years ago

lentinj commented 8 years ago

Surveys will be represented by narrowing down the tracer output, with the same approach as for stomach surveys. Admittedly their "catch" won't be represented in the Atlantis model, but it should be too small to be significant anyway.

Rgadget (I believe @bthe ?) has some code that does something along these lines.

atlantisom does too: https://github.com/r4atlantis/atlantisom/blob/master/R/create_survey.R#L46

lentinj commented 8 years ago

I've found this:-

https://github.com/Hafro/rgadget/blob/master/R/summaryFunc.R#L34

...which takes a stock and scales it based on a random distribution. This would plug in nicely in the gap we have, however I was expecting length to be a factor, i.e. the gear has an optimal length that it's most efficient at catching. Am I @bthe :

bthe commented 8 years ago

I think the short answer would be point 2;) The long answer: Not familiar with the output from Atlantis, but I guess you have mean length by age- and species group, subdivision and depth layer. If that is the case we will need a mechanism that:

I think something along the lines of the ldist (or aldist) function would be definitely be a start, but you would need to add the catchability scalars to the function.

lentinj commented 8 years ago

Okay. Atlantis output is count & mgN per age-group/species/box/time. Length is a function of mgN. But you're essentially correct.

Noise pre-import sounds a lot easier, you can always have a seed so the output is predictable.

bthe commented 8 years ago

So what you need is a combination of the distr function (from https://github.com/Hafro/rgadget/blob/master/R/function.R#L99 ) that distributes the number of fish to length groups, suitability (https://github.com/Hafro/rgadget/blob/master/R/function.R#L431 ) to assign proportions to length groups caught by the survey and the (a)ldist to assign error to (age-) lengthgroups,

lentinj commented 8 years ago

Okay, this is making sense, and certainly seems more thorough than what atlantisom does currently. Will bash this out tomorrow.

@erlasturl I'm guessing the answer will be no, but all I have for length is a means to derive it lifted from vat, using FLAG_LI_A and FLAG_LI_B, which I'm treating as mean length for that age group. Is there anything to indicate spread? I'm guessing whoever ends up using this having to providing sigmas won't be the end of the world.

bthe commented 8 years ago

I guess we can guess a good value for the sigma quite easily for the main fish species from the "real" data. There are also some cod-like guestimates in Rgadget::gadget.options()$init.sigma

gstefans commented 8 years ago

Just to concur: all of what you are saying seems very sensible.

Still we should always keep in the back of our minds that the error assumptions are quite simplistic.

Get

On Mon, 13 Jun 2016, 17:35 Bjarki Þór Elvarsson, notifications@github.com wrote:

I guess we can guess a good value for the sigma quite easily for the main fish species from the "real" data. There are some cod-like guestimates in Rgadget::gadget.options()$init.sigma

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mareframe/mfdbatlantis/issues/4#issuecomment-225636278, or mute the thread https://github.com/notifications/unsubscribe/AEB-yYXIOxWz5aD7yFHzdJxJkUwxBF5Vks5qLYbBgaJpZM4Ioq51 .

erlasturl commented 8 years ago

You are right Jamie, there is nothing to indicate the spread.

Erla

2016-06-13 16:28 GMT+00:00 Jamie Lentin notifications@github.com:

Okay, this is making sense, and certainly seems more thorough than what atlantisom does currently. Will bash this out tomorrow.

@erlasturl https://github.com/erlasturl I'm guessing the answer will be no, but all I have for length is a means to derive it lifted from vat, using FLAG_LI_A and FLAG_LI_B, which I'm treating as mean length for that age group. Is there anything to indicate spread? I'm guessing whoever ends up using this having to providing sigmas won't be the end of the world.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mareframe/mfdbatlantis/issues/4#issuecomment-225634459, or mute the thread https://github.com/notifications/unsubscribe/AOptfW4osGgf-K7NVklAJ17dDVkXhrSZks5qLYVCgaJpZM4Ioq51 .

lentinj commented 8 years ago

Okay, this is now implemented, although could do with more testing before I declare it finished.

See the changes to the demo for how to use: https://github.com/mareframe/mfdbatlantis/commit/59119ddec3706940bc3c17db1711c904c3802c62#diff-bc5b73e36e6582f021b0f6c06d531e9d

In practice survey_suitability would be defined using rgadget.

Mean weight for each length group (within a cohort) is currently being copied from the mean weight of the entire cohort. We could:-