In some studies, harvest (recovery strata) start after the run has started and terminate prior to the run ending. For example, consider the following recovery matrix where releases and recoveries have been stratified on a weekly basis:
## Tagging SW22 SW23 SW24 SW25 SW26 SW27 SW28 SW29 SW30 SW31 SW32 SW33 SW34 SW35 SW36 SW37 Applied
## 1 SW22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10
## 2 SW23 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 100
## 3 SW24 0 0 0 51 2 0 0 0 0 0 0 0 0 0 0 0 525
## 4 SW25 0 0 0 10 45 0 0 0 0 0 0 0 0 0 0 0 403
## 5 SW26 0 0 0 0 169 64 9 0 0 0 0 0 0 0 0 0 849
## 6 SW27 0 0 0 0 0 139 41 5 0 0 0 0 0 0 0 0 742
## 7 SW28 0 0 0 0 0 0 155 31 3 1 0 0 0 0 0 0 675
## 8 SW29 0 0 0 0 0 0 0 266 32 5 0 0 0 0 0 0 916
## 9 SW30 0 0 0 0 0 0 0 0 33 49 3 0 0 0 0 0 371
## 10 SW31 0 0 0 0 0 0 0 0 0 33 36 0 0 0 0 0 296
## 11 SW32 0 0 0 0 0 0 0 0 0 0 39 8 0 0 0 0 234
## 12 SW33 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 39
## 13 SW34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 97
## 14 SW35 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61
## 15 SW36 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 26
## 16 SW37 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3
## 17 CatchComm 0 0 0 1869 5394 5131 5668 6733 1780 1828 2493 157 0 0 0 0 NA
The bottom line is the total recoveries (tagged and untagged) from a commercial harvest. In this case, the commerical harvest did not start until statistical week SW25 and ended in SW33 but the run started earlier and ended later than the commerical harvest.
We now fit the BTSPAS model using the current data
##
##
## *** Start of call to JAGS
## Working directory: /Users/cschwarz/Dropbox/SPAS-Bayesian/BTSPAS/vignettes
## Initial seed for JAGS set to: 661607
## Random number seed for chain 582324
## Random number seed for chain 424815
## Random number seed for chain 911807
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 32
## Unobserved stochastic nodes: 96
## Total graph size: 895
##
## Initializing model
##
##
|
| | 0%
|
|++ | 4%
|
|++++ | 8%
|
|++++++ | 12%
|
|++++++++ | 16%
|
|++++++++++ | 20%
|
|++++++++++++ | 24%
|
|++++++++++++++ | 28%
|
|++++++++++++++++ | 32%
|
|++++++++++++++++++ | 36%
|
|++++++++++++++++++++ | 40%
|
|++++++++++++++++++++++ | 44%
|
|++++++++++++++++++++++++ | 48%
|
|++++++++++++++++++++++++++ | 52%
|
|++++++++++++++++++++++++++++ | 56%
|
|++++++++++++++++++++++++++++++ | 60%
|
|++++++++++++++++++++++++++++++++ | 64%
|
|++++++++++++++++++++++++++++++++++ | 68%
|
|++++++++++++++++++++++++++++++++++++ | 72%
|
|++++++++++++++++++++++++++++++++++++++ | 76%
|
|++++++++++++++++++++++++++++++++++++++++ | 80%
|
|++++++++++++++++++++++++++++++++++++++++++ | 84%
|
|++++++++++++++++++++++++++++++++++++++++++++ | 88%
|
|++++++++++++++++++++++++++++++++++++++++++++++ | 92%
|
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96%
|
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100%
##
|
| | 0%
|
|** | 4%
|
|**** | 8%
|
|****** | 12%
|
|******** | 16%
|
|********** | 20%
|
|************ | 24%
|
|************** | 28%
|
|**************** | 32%
|
|****************** | 36%
|
|******************** | 40%
|
|********************** | 44%
|
|************************ | 48%
|
|************************** | 52%
|
|**************************** | 56%
|
|****************************** | 60%
|
|******************************** | 64%
|
|********************************** | 68%
|
|************************************ | 72%
|
|************************************** | 76%
|
|**************************************** | 80%
|
|****************************************** | 84%
|
|******************************************** | 88%
|
|********************************************** | 92%
|
|************************************************ | 96%
|
|**************************************************| 100%
##
##
## *** Finished JAGS ***
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
On the surface, the fit looks fine:
but the spline remains very large in the first 3 weeks leading to unrealistic estimates of the run in the first 3 weeks and an unrealistic estimate of the total run:
## mean sd 2.5% 97.5%
## Ntot 205328 85279 132582 384186
## U[1] 27923 53018 44 126771
## U[2] 22501 26908 744 77048
## U[3] 21007 13950 4339 53651
## U[4] 19230 2954 13815 25510
## U[5] 18544 1560 15646 21814
## U[6] 20058 1564 17187 23283
## U[7] 19909 1386 17394 22791
## U[8] 17003 1296 14518 19599
## U[9] 9978 1749 6550 13557
## U[10] 7919 1067 5838 10042
## U[11] 6910 1401 4391 9946
## U[12] 3385 1109 1665 5948
## U[13] 2446 1595 512 6470
## U[14] 1541 1459 102 5213
## U[15] 952 1235 8 4163
## U[16] 675 3417 0 3451
## Utot 199981 85279 127235 378839
The problem is that without a commercial catch in the first 3 and last 3 weeks, there is no information about the probability of capture for those weeks and BTSPAS simply interpolates the spline from the middle of the data to the first 3 and last 3 weeks. The interpolation for the last 3 weeks isn’t too bad – the spline is already on a downwards trend and so this is continued. However, the interpolation back for the first 3 weeks is not very realistic
It is possible to “force” BTSPAS to interpolate the first 3 and last 3 weeks down to zero by adding ``fake’’ data. In particular, we pretend that in the first 3 and last 3 weeks, that a commercial catch of 1 fish occurred and it was tagged. You also need to ensure that enough fish were tagged and released to accomodate the fake data.
The revised recovery matrix is:
## Tagging SW22 SW23 SW24 SW25 SW26 SW27 SW28 SW29 SW30 SW31 SW32 SW33 SW34 SW35 SW36 SW37 Applied
## 1 SW22 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10
## 2 SW23 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 100
## 3 SW24 0 0 1 51 2 0 0 0 0 0 0 0 0 0 0 0 525
## 4 SW25 0 0 0 10 45 0 0 0 0 0 0 0 0 0 0 0 403
## 5 SW26 0 0 0 0 169 64 9 0 0 0 0 0 0 0 0 0 849
## 6 SW27 0 0 0 0 0 139 41 5 0 0 0 0 0 0 0 0 742
## 7 SW28 0 0 0 0 0 0 155 31 3 1 0 0 0 0 0 0 675
## 8 SW29 0 0 0 0 0 0 0 266 32 5 0 0 0 0 0 0 916
## 9 SW30 0 0 0 0 0 0 0 0 33 49 3 0 0 0 0 0 371
## 10 SW31 0 0 0 0 0 0 0 0 0 33 36 0 0 0 0 0 296
## 11 SW32 0 0 0 0 0 0 0 0 0 0 39 8 0 0 0 0 234
## 12 SW33 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 39
## 13 SW34 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 97
## 14 SW35 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 61
## 15 SW36 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 26
## 16 SW37 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3
## 17 CatchComm 1 1 1 1869 5394 5131 5668 6733 1780 1828 2493 157 1 1 1 1 NA
Notice how “fake” recoveries were added to the diagonal entries for the first and final weeks of the data including “fake” harvest.
Because the fake data values are very small, it has little impact on the total run size, but a recovery of 1 tagged fish in a commerical harvest of 1 fish is not consistent with a very large run size and so this forces the run curve down at these points as seen in the revised fit:
##
##
## *** Start of call to JAGS
## Working directory: /Users/cschwarz/Dropbox/SPAS-Bayesian/BTSPAS/vignettes
## Initial seed for JAGS set to: 624849
## Random number seed for chain 321164
## Random number seed for chain 19375
## Random number seed for chain 719718
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 32
## Unobserved stochastic nodes: 96
## Total graph size: 895
##
## Initializing model
##
##
|
| | 0%
|
|++ | 4%
|
|++++ | 8%
|
|++++++ | 12%
|
|++++++++ | 16%
|
|++++++++++ | 20%
|
|++++++++++++ | 24%
|
|++++++++++++++ | 28%
|
|++++++++++++++++ | 32%
|
|++++++++++++++++++ | 36%
|
|++++++++++++++++++++ | 40%
|
|++++++++++++++++++++++ | 44%
|
|++++++++++++++++++++++++ | 48%
|
|++++++++++++++++++++++++++ | 52%
|
|++++++++++++++++++++++++++++ | 56%
|
|++++++++++++++++++++++++++++++ | 60%
|
|++++++++++++++++++++++++++++++++ | 64%
|
|++++++++++++++++++++++++++++++++++ | 68%
|
|++++++++++++++++++++++++++++++++++++ | 72%
|
|++++++++++++++++++++++++++++++++++++++ | 76%
|
|++++++++++++++++++++++++++++++++++++++++ | 80%
|
|++++++++++++++++++++++++++++++++++++++++++ | 84%
|
|++++++++++++++++++++++++++++++++++++++++++++ | 88%
|
|++++++++++++++++++++++++++++++++++++++++++++++ | 92%
|
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96%
|
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100%
##
|
| | 0%
|
|** | 4%
|
|**** | 8%
|
|****** | 12%
|
|******** | 16%
|
|********** | 20%
|
|************ | 24%
|
|************** | 28%
|
|**************** | 32%
|
|****************** | 36%
|
|******************** | 40%
|
|********************** | 44%
|
|************************ | 48%
|
|************************** | 52%
|
|**************************** | 56%
|
|****************************** | 60%
|
|******************************** | 64%
|
|********************************** | 68%
|
|************************************ | 72%
|
|************************************** | 76%
|
|**************************************** | 80%
|
|****************************************** | 84%
|
|******************************************** | 88%
|
|********************************************** | 92%
|
|************************************************ | 96%
|
|**************************************************| 100%
##
##
## *** Finished JAGS ***
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
## [1] TRUE
Notice that in the revised fit, the run curve is forced to 0 at the start and end of the study: The estimates of total run size and the weekly estimates of the runsize are also more sensible:
## mean sd 2.5% 97.5%
## Ntot 126974 3961 119555 135124
## U[1] 0 5 0 2
## U[2] 12 35 0 96
## U[3] 528 638 8 2270
## U[4] 16728 2893 11598 22997
## U[5] 18775 1728 15614 22287
## U[6] 20207 1605 17198 23402
## U[7] 20209 1475 17521 23267
## U[8] 17443 1366 14735 20143
## U[9] 9361 1978 5713 13610
## U[10] 7467 1259 5026 9969
## U[11] 8934 1695 5850 12403
## U[12] 1855 693 829 3498
## U[13] 101 137 2 462
## U[14] 5 15 0 41
## U[15] 0 1 0 2
## U[16] 0 1 0 0
## Utot 121627 3961 114208 129777