{"action":"created","issue":{"url":"https://api.github.com/repos/seacode/gmacs/issues/144","labels_url":"https://api.github.com/repos/seacode/gmacs/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/seacode/gmacs/issues/144/comments","events_url":"https://api.github.com/repos/seacode/gmacs/issues/144/events","html_url":"https://github.com/seacode/gmacs/issues/144","id":96217510,"number":144,"title":"How to deal with Selectivity","user":{"login":"quantifish","id":5566375,"avatar_url":"https://avatars.githubusercontent.com/u/5566375?v=3","gravatar_id":"","url":"https://api.github.com/users/quantifish","html_url":"https://github.com/quantifish","followers_url":"https://api.github.com/users/quantifish/followers","following_url":"https://api.github.com/users/quantifish/following{/other_user}","gists_url":"https://api.github.com/users/quantifish/gists{/gist_id}","starred_url":"https://api.github.com/users/quantifish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantifish/subscriptions","organizations_url":"https://api.github.com/users/quantifish/orgs","repos_url":"https://api.github.com/users/quantifish/repos","events_url":"https://api.github.com/users/quantifish/events{/privacy}","received_events_url":"https://api.github.com/users/quantifish/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/seacode/gmacs/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"quantifish","id":5566375,"avatar_url":"https://avatars.githubusercontent.com/u/5566375?v=3","gravatar_id":"","url":"https://api.github.com/users/quantifish","html_url":"https://github.com/quantifish","followers_url":"https://api.github.com/users/quantifish/followers","following_url":"https://api.github.com/users/quantifish/following{/other_user}","gists_url":"https://api.github.com/users/quantifish/gists{/gist_id}","starred_url":"https://api.github.com/users/quantifish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantifish/subscriptions","organizations_url":"https://api.github.com/users/quantifish/orgs","repos_url":"https://api.github.com/users/quantifish/repos","events_url":"https://api.github.com/users/quantifish/events{/privacy}","received_events_url":"https://api.github.com/users/quantifish/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/seacode/gmacs/milestones/8","html_url":"https://github.com/seacode/gmacs/milestones/Selectivity%20Issues","labels_url":"https://api.github.com/repos/seacode/gmacs/milestones/8/labels","id":1217260,"number":8,"title":"Selectivity Issues","description":"All the fixes to selectivity that are required.","creator":{"login":"quantifish","id":5566375,"avatar_url":"https://avatars.githubusercontent.com/u/5566375?v=3","gravatar_id":"","url":"https://api.github.com/users/quantifish","html_url":"https://github.com/quantifish","followers_url":"https://api.github.com/users/quantifish/followers","following_url":"https://api.github.com/users/quantifish/following{/other_user}","gists_url":"https://api.github.com/users/quantifish/gists{/gist_id}","starred_url":"https://api.github.com/users/quantifish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantifish/subscriptions","organizations_url":"https://api.github.com/users/quantifish/orgs","repos_url":"https://api.github.com/users/quantifish/repos","events_url":"https://api.github.com/users/quantifish/events{/privacy}","received_events_url":"https://api.github.com/users/quantifish/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":0,"state":"open","created_at":"2015-07-21T02:27:26Z","updated_at":"2015-07-21T03:29:54Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-07-21T03:29:54Z","updated_at":"2015-07-22T05:20:07Z","closed_at":null,"body":"OK, I need to come up with a way to deal with selectivity in the control file. This approach needs to include the following additional features:\r\n  * Priors\r\n  * Sex-specificity\r\n  * Additional parameters if say the double normal selectivity function is required (3 params)\r\n\r\nI've taken a look at iSCAM, the NZ rock lobster model and what we have in place currently and had a think about how this could look, this is my first go at it so I am happy to take any suggestions at all over the next couple of days. What e used to have was this:\r\n\r\n    ## ———————————————————————————————————————————————————————————————————————————————————— ##\r\n    ##        sel   sel  sel sex  size   year  phz                       start  end         ##\r\n    ## Index  type  mu   sd  dep  nodes  nodes mirror lam1  lam2  lam3 | block  block       ##\r\n    ## ———————————————————————————————————————————————————————————————————————————————————— ##\r\n    ## Selectivity P(capture of all sizes)\r\n       1      3    100  120  0    1      1    -1      12.5  12.5  12.5   1975   2014\r\n       2      3    110  150  0    1      1     4      12.5  12.5  12.5   1975   2014 \r\n       3      3     60   65  0    1      1    -3      12.5  12.5  12.5   1975   1981\r\n       3      3     60   65  0    1      1    -3      12.5  12.5  12.5   1982   2014\r\n       4      3     70   90  0    1      1    -4      12.5  12.5  12.5   1975   2014\r\n    ## ———————————————————————————————————————————————————————————————————————————————————— ##\r\n\r\nand what I am proposing is this\r\n\r\n    ## ———————————————————————————————————————————————————————————————————————————————————— ##\r\n    ## gear  par   sel  sel          prior prior prior phz    start  end                    ##\r\n    ## index index type par sex init type  mu    sd    mirror block  block                  ##\r\n    ## ———————————————————————————————————————————————————————————————————————————————————— ##\r\n    ## Selectivity P(capture of all sizes)\r\n       1     1     3    1   1   100  0     10    200    3     1975   2014\r\n       1     2     3    2   1   120  0     10    200    3     1975   2014\r\n       1     3     3    1   2   100  0     10    200    4     1975   2014\r\n       1     4     3    2   2   120  0     10    200    4     1975   2014\r\n       2     5     3    1   1   110  0     10    200    3     1975   2014\r\n       2     6     3    2   1   150  0     10    200    3     1975   2014\r\n       2     7     3    1   2   110  0     10    200   -5     1975   2014\r\n       2     8     3    2   2   150  0     10    200   -6     1975   2014\r\n       3     9     3    1   1   60   0      5    100    3     1975   1981\r\n       3     10    3    2   1   65   0      5    100    3     1975   1981\r\n       3     11    3    1   1   60   0      5    100    3     1982   2014\r\n       3     12    3    2   1   65   0      5    100    3     1982   2014\r\n       3     13    3    1   2   60   0      5    100   -9     1975   1981\r\n       3     14    3    2   2   65   0      5    100  -10     1975   1981\r\n       3     15    3    1   2   60   0      5    100  -11     1982   2014\r\n       3     16    3    2   2   65   0      5    100  -12     1982   2014\r\n       4     17    4    1   1   10   0      1     50    3     1975   2014\r\n       4     18    4    2   1   50   0     10    100    3     1975   2014\r\n       4     19    4    3   1   75   0     10    200    3     1975   2014\r\n       4     20    4    1   2   10   0      1     50  -17     1975   2014\r\n       4     21    4    2   2   50   0     10    100  -18     1975   2014\r\n       4     22    4    3   2   75   0     10    200  -19     1975   2014\r\n    ## ———————————————————————————————————————————————————————————————————————————————————— ##\r\n\r\nSo this proposed way forward specifies a parameter per line, and a sex on a different line. I have retained the mirror concept that Steve came up with as I think it is very useful. I'll walk through this - from the left to the right column we have the `gear index`, a `par index` (every parameter gets a different index), a `sel type` (all the usual suspects, but I will add double normal as option 4), `sel par` (each of the parameters of the selectivity function selected, e.g. logistic95 has two parameters), `sex`, `prior type`, `prior mu` (or just the first par if say a uniform is used), `prior sd`, `phz mirror` (this either species a phase for estimation, or mirrors any of the unique `par index`), `start block` and `end block`.\r\n\r\nSo above the first gear type is sex-specific (e.g. no phz mirror is used) and is logistic95; the second gear type is not sex-specific (e.g. the phz mirror is pointing at the pars `-5` and `-6` for the females, which are the male pars), gear 3 is blocked, and gear 4 uses double normal selectivity with 3 parameters.\r\n\r\nI know this is not a simple as the previous way of doing things, but it gets all of the options in there (except the nodes got the boot). What do we think????"},"comment":{"url":"https://api.github.com/repos/seacode/gmacs/issues/comments/123564694","html_url":"https://github.com/seacode/gmacs/issues/144#issuecomment-123564694","issue_url":"https://api.github.com/repos/seacode/gmacs/issues/144","id":123564694,"user":{"login":"jimianelli","id":2715618,"avatar_url":"https://avatars.githubusercontent.com/u/2715618?v=3","gravatar_id":"","url":"https://api.github.com/users/jimianelli","html_url":"https://github.com/jimianelli","followers_url":"https://api.github.com/users/jimianelli/followers","following_url":"https://api.github.com/users/jimianelli/following{/other_user}","gists_url":"https://api.github.com/users/jimianelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jimianelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimianelli/subscriptions","organizations_url":"https://api.github.com/users/jimianelli/orgs","repos_url":"https://api.github.com/users/jimianelli/repos","events_url":"https://api.github.com/users/jimianelli/events{/privacy}","received_events_url":"https://api.github.com/users/jimianelli/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T05:20:07Z","updated_at":"2015-07-22T05:20:07Z","body":"My thoughts are leaning towards Darcy's approach outlined above with the possible added modifications:\r\n1) some header (by gear) specifying the type of selectivity and the extent that it's sex specific \r\n2) given 1), error traps if the number of lines are different than expected or if timeframe has gaps\r\n3) possible sex specific \"doubling-up\" when sex==2 similar to what's been done earlier for growth in gmacs\r\n4) Advantages include highly flexible, rigorous specification of priors and types and years vary; wonder if 2-d spline used (time and age) that \"block\" years would become problematic? or perhaps they would specify the knot location for the time-spline part...\r\n\r\n[petty aside--prefer \"period\" over \"block\" for terminology]"}}