set default chunk options
install devtools
Load packages
## Year district catch effort
## 1 2000 Salima 288.6 24715
## 2 2001 Salima 418.8 21486
## 3 2002 Salima 260.8 34313
## 4 2003 Salima 294.7 20601
## 5 2004 Salima 1333.1 32244
## 6 2005 Salima 1189.3 18890
## 'data.frame': 103 obs. of 4 variables:
## $ Year : int 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 ...
## $ district: chr "Salima" "Salima" "Salima" "Salima" ...
## $ catch : num 289 419 261 295 1333 ...
## $ effort : int 24715 21486 34313 20601 32244 18890 19241 56024 9523 66020 ...
## Year district catch effort
## Min. :2000 Length:103 Min. : 260.8 Min. : 1194
## 1st Qu.:2005 Class :character 1st Qu.: 2340.8 1st Qu.: 37043
## Median :2010 Mode :character Median : 7234.0 Median : 72180
## Mean :2010 Mean :10998.3 Mean : 157631
## 3rd Qu.:2015 3rd Qu.:14354.9 3rd Qu.: 122038
## Max. :2022 Max. :49456.2 Max. :1585813
Create plots to visualize the catch and effort data over time and by district.
##
## Call:
## lm(formula = catch ~ effort, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -11190 -8843 -2803 3175 38621
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.156e+04 1.363e+03 8.482 1.93e-13 ***
## effort -3.551e-03 4.435e-03 -0.801 0.425
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11870 on 101 degrees of freedom
## Multiple R-squared: 0.006307, Adjusted R-squared: -0.003531
## F-statistic: 0.6411 on 1 and 101 DF, p-value: 0.4252
## time series anaylsis
## Series: ts_data
## ARIMA(2,1,0) with drift
##
## Coefficients:
## ar1 ar2 drift
## -0.7292 -0.4937 4206.868
## s.e. 0.1816 0.1800 1364.259
##
## sigma^2 = 217333206: log likelihood = -241.19
## AIC=490.37 AICc=492.72 BIC=494.74
##
## Training set error measures:
## ME RMSE MAE MPE MAPE MASE
## Training set -330.8263 13399.11 10820.04 -16.93876 32.14281 0.7719357
## ACF1
## Training set -5.621411e-05
## Year Catch CPUE SE
## 1 2000 12071.3 0.11463934 0.09864321
## 2 2001 6644.4 0.10033766 0.07601699
## 3 2002 7842.9 0.05280430 0.03725321
## 4 2003 10643.5 0.71868482 0.68184713
## 5 2004 11039.3 0.06606605 0.03064150
## 6 2005 14188.9 0.08341772 0.04863737
## 7 2006 14668.4 0.05199452 0.02101957
## 8 2007 32196.1 0.10999468 0.03623772
## 9 2008 31941.7 0.13929549 0.04488057
## 10 2009 38693.7 0.08825747 0.03286297
## 11 2010 64443.0 0.15765895 0.05123198
## 12 2011 37573.8 0.12511566 0.05458505
## 13 2012 51916.4 0.42959287 0.25351251
## 14 2013 92176.3 0.24105122 0.11617509
## 15 2014 49328.3 0.19699495 0.07923183
## 16 2015 70209.8 0.22168535 0.07041205
## 17 2016 61934.6 0.19427017 0.05763568
## 18 2017 55759.5 0.23252227 0.07811317
## 19 2018 86126.3 0.21952087 0.06846371
## 20 2019 97512.9 0.29473567 0.09061716
## 21 2020 101809.7 0.32965504 0.12250264
## 22 2021 82328.4 0.22417560 0.08267029
## 23 2022 101780.0 0.27844954 0.10387362
## Year catch cpue effort
## 1 2000 288.6 0.011677119 24715
## 2 2000 1240.2 0.032275022 38426
## 3 2000 9520.8 0.410043499 23219
## 4 2000 1021.7 0.004561711 223973
## 5 2001 418.8 0.019491762 21486
## 6 2001 954.1 0.051799772 18419
## # A tibble: 23 × 4
## Year total_catch total_effort mean_cpue
## <int> <dbl> <int> <dbl>
## 1 2000 12071. 310333 0.115
## 2 2001 6644. 346641 0.100
## 3 2002 7843. 495735 0.0528
## 4 2003 10644. 340752 0.719
## 5 2004 11039. 441231 0.0661
## 6 2005 14189. 515862 0.0834
## 7 2006 14668. 469849 0.0520
## 8 2007 32196. 566404 0.110
## 9 2008 31942. 833337 0.139
## 10 2009 38694. 1429173 0.0883
## # ℹ 13 more rows
## Year catch
## 1 2000 12071.3
## 2 2001 6644.4
## 3 2002 7842.9
## 4 2003 10643.5
## 5 2004 11039.3
## 6 2005 14188.9
## 7 2006 14668.4
## 8 2007 32196.1
## 9 2008 31941.7
## 10 2009 38693.7
## 11 2010 64443.0
## 12 2011 37573.8
## 13 2012 51916.4
## 14 2013 92176.3
## 15 2014 49328.3
## 16 2015 70209.8
## 17 2016 61934.6
## 18 2017 55759.5
## 19 2018 86126.3
## 20 2019 97512.9
## 21 2020 101809.7
## 22 2021 82328.4
## 23 2022 101780.0
## Year cpue
## 1 2000 0.11463934
## 2 2001 0.10033766
## 3 2002 0.05280430
## 4 2003 0.71868482
## 5 2004 0.06606605
## 6 2005 0.08341772
## 7 2006 0.05199452
## 8 2007 0.10999468
## 9 2008 0.13929549
## 10 2009 0.08825747
## 11 2010 0.15765895
## 12 2011 0.12511566
## 13 2012 0.42959287
## 14 2013 0.24105122
## 15 2014 0.19699495
## 16 2015 0.22168535
## 17 2016 0.19427017
## 18 2017 0.23252227
## 19 2018 0.21952087
## 20 2019 0.29473567
## 21 2020 0.32965504
## 22 2021 0.22417560
## 23 2022 0.27844954
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 72
## Unobserved stochastic nodes: 76
## Total graph size: 1322
##
## Initializing model
##
## ><> jbplot_catcherror() <><
##
## ><> jbplot_ppist() - prior and posterior distributions <><
##
## ><> jbplot_cpue() - fits to CPUE <><
##
## ><> jbplot_cpue() - fits to CPUE <><
##
## ><> jbplot_trj() - B trajectory <><
##
## ><> jbplot_trj() - F trajectory <><
##
## ><> jbplot_trj() - BBmsy trajectory <><
##
## ><> jbplot_trj() - FFmsy trajectory <><
##
## ><> jbplot_spphase() - JABBA Surplus Production Phase Plot <><
##
## ><> jbplot_kobe() - Stock Status Plot <><
##
## ><> jbplot_summary()
##
## ><> jbplot_summary()
##
## ><> jbplot_spphase() - JABBA Surplus Production Phase Plot <><
##
## ><> jbplot_kobe() - Stock Status Plot <><