These functions return a function to use inside sim_abundance. Given parameters, it generates N0, R and Z values.

sim_R(log_mean = log(3e+07), log_sd = 0.5, random_walk = TRUE, plot = FALSE)

sim_Z(
  log_mean = log(0.5),
  log_sd = 0.2,
  phi_age = 0.9,
  phi_year = 0.5,
  plot = FALSE
)

sim_N0(N0 = "exp", plot = FALSE)

Arguments

log_mean

One mean value or a vector of means, in log scale, of length equal to years for sim_R or a matrix of means with rows equaling the number of ages and columns equaling the number of years for sim_Z.

log_sd

Standard deviation of the variable in the log scale.

random_walk

Simulate recruitment as a random walk?

plot

produce a simple plot of the simulated values?

phi_age

Autoregressive parameter for the age dimension.

phi_year

Autoregressive parameter for the year dimension.

N0

Either specify "exp" or numeric vector of starting abundance excluding the first age. If "exp" is specified using sim_N0, then abundance at age are calculated using exponential decay.

Value

Returns a function for use inside sim_abundance.

Details

sim_R generates uncorrelated recruitment values or random walk values from a log normal distribution. sim_Z does the same as sim_R when phi_age and phi_year are both 0, otherwise values are correlated in the age and/or year dimension. The covariance structure follows that described in Cadigan (2015).

References

Cadigan, Noel G. 2015. A State-Space Stock Assessment Model for Northern Cod, Including Under-Reported Catches and Variable Natural Mortality Rates. Canadian Journal of Fisheries and Aquatic Sciences 73 (2): 296-308.

Examples


R_fun <- sim_R(log_mean = log(100000), log_sd = 0.1, random_walk = TRUE, plot = TRUE)
R_fun(years = 1:100)

#>         1         2         3         4         5         6         7         8 
#>  92839.33  98547.32 100707.99 123626.99 142122.73 164552.51 168346.70 140335.04 
#>         9        10        11        12        13        14        15        16 
#> 118028.22 118658.67 118101.12 106117.63 100005.09 121811.64 147692.97 124750.21 
#>        17        18        19        20        21        22        23        24 
#> 133959.80 158022.54 174692.56 193200.43 191192.71 212280.14 192141.98 224054.61 
#>        25        26        27        28        29        30        31        32 
#> 196935.17 175947.99 199797.52 214912.14 230099.78 262837.24 239050.49 237890.03 
#>        33        34        35        36        37        38        39        40 
#> 214660.68 223736.51 170530.33 162027.33 159444.31 142449.66 146484.72 144249.73 
#>        41        42        43        44        45        46        47        48 
#> 116704.13 103293.10 101928.56 117501.56 139633.00 113480.89 110288.50 100860.59 
#>        49        50        51        52        53        54        55        56 
#>  81129.54  87950.15  99367.39  94544.89  96802.03  92799.15  89364.99  89797.88 
#>        57        58        59        60        61        62        63        64 
#>  89423.65  97149.20  90676.86  84790.49  87525.09 105134.55 104525.13 114570.10 
#>        65        66        67        68        69        70        71        72 
#> 127499.77 131479.12 110109.39 121916.57 115689.66  95820.82 102761.15 114845.06 
#>        73        74        75        76        77        78        79        80 
#> 134958.97 140166.44 158752.59 154976.69 132073.23 119041.97  97666.78  89053.52 
#>        81        82        83        84        85        86        87        88 
#>  91027.84  82998.55  79298.96  87599.67 105292.12 120912.83 112951.57 106809.65 
#>        89        90        91        92        93        94        95        96 
#> 108376.07 110887.11 116375.22 119254.31 100676.75 110002.75 114659.63 120028.91 
#>        97        98        99       100 
#> 123537.61 128601.65 122636.56 124722.69 
sim_abundance(R = sim_R(log_mean = log(100000), log_sd = 0.5))
#> $ages
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $lengths
#>  [1]   1   4   7  10  13  16  19  22  25  28  31  34  37  40  43  46  49  52  55
#> [20]  58  61  64  67  70  73  76  79  82  85  88  91  94  97 100 103 106 109 112
#> [39] 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169
#> [58] 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226
#> [77] 229 232 235 238
#> 
#> $years
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $R
#>         1         2         3         4         5         6         7         8 
#> 116028.45 162983.84 197403.57 220624.87 119847.31  49668.47 229477.82  99731.05 
#>         9        10        11        12        13        14        15        16 
#>  72915.89 110418.28  48630.25  23706.11  23564.64  30250.47  30159.88  12207.02 
#>        17        18        19        20 
#>  17530.79  27531.60  41476.93  13750.66 
#> 
#> $N0
#>  [1] 116028.44880  86743.24772  66111.31732  48431.00903  37712.66855
#>  [6]  31961.57455  24129.74346  17091.12668  10571.04005   6834.72794
#> [11]   3827.17155   2091.50772   1270.04001    741.29250    411.21387
#> [16]    227.63992    108.39965     56.48705     28.25121     17.51229
#> 
#> $Z
#>     year
#> age          1         2         3         4         5         6         7
#>   1  0.2908828 0.5181935 0.7007476 0.9210299 0.5040801 0.3509010 0.1056271
#>   2  0.2716126 0.5649917 0.7171007 0.6761193 0.5224845 0.3943943 0.1411932
#>   3  0.3111997 0.3165771 0.6717497 0.5838207 0.4149798 0.3702218 0.1188640
#>   4  0.2501442 0.2994107 0.8703893 0.6751835 0.5689024 0.5286938 0.1684844
#>   5  0.1654617 0.2719598 0.7635687 0.7245683 0.7390095 0.7493422 0.2207698
#>   6  0.2810891 0.3784283 0.8409815 0.7898942 1.0086421 1.2496572 0.2435771
#>   7  0.3448858 0.5431967 1.0118042 0.9428677 1.1306828 1.9264938 0.2994522
#>   8  0.4804412 0.7446466 1.0678627 1.0155449 1.0669691 1.9346595 0.3071024
#>   9  0.4361015 0.7105899 0.8361141 0.9042751 0.9925738 2.2683759 0.3593282
#>   10 0.5798906 1.0786151 1.0956193 0.9551438 1.1494901 2.0648239 0.4500772
#>   11 0.6042408 1.2595158 1.5674374 1.2664178 1.1914313 1.6197013 0.4914833
#>   12 0.4988368 0.7277872 1.0715071 0.8912701 0.6649452 1.0439520 0.3539179
#>   13 0.5384084 0.8104610 1.3740556 1.0713265 0.7930178 0.8917273 0.4186257
#>   14 0.5892818 0.5479947 0.9292562 1.0956879 1.1210629 1.1060701 0.4310024
#>   15 0.5913483 0.6813723 0.8982029 1.1207038 0.9181076 0.9434515 0.3423941
#>   16 0.7419403 0.9022367 1.1326694 0.7553198 0.7342875 0.9184649 0.3498443
#>   17 0.6518134 0.7248754 0.9620438 0.4955959 0.5893269 0.5459873 0.2698548
#>   18 0.6928752 0.7997314 0.9431431 0.5816265 0.5329966 0.4640887 0.2492416
#>   19 0.4782334 0.6011682 0.6692677 0.3026637 0.3478869 0.2768316 0.2048332
#>   20 0.5282398 0.5322380 0.7294190 0.3947428 0.3479232 0.3547019 0.2780635
#>     year
#> age          8         9        10        11        12        13        14
#>   1  0.1452749 0.3811977 0.7576322 0.6624192 0.5098754 0.4177628 0.3556465
#>   2  0.1349989 0.2720897 0.5517555 0.4227008 0.3838821 0.3450609 0.2923036
#>   3  0.1371963 0.4077668 0.8112221 0.4743043 0.4384592 0.5000591 0.3600590
#>   4  0.1708549 0.3669467 0.6316030 0.4532395 0.5109327 0.6697589 0.3576317
#>   5  0.2253420 0.3781105 0.6631760 0.5629491 0.6527931 0.9334663 0.4647703
#>   6  0.2746540 0.4570113 0.9182205 0.6258719 0.5482563 0.7113349 0.4333505
#>   7  0.3518710 0.5395739 0.9432877 0.6766896 0.4002638 0.6012257 0.4735661
#>   8  0.4541385 0.5542908 0.9876831 0.5890071 0.3501519 0.5352934 0.3656630
#>   9  0.5443257 0.7233338 0.9940625 0.7820468 0.4915405 0.9201518 0.3632680
#>   10 0.4824386 0.8335332 1.6191209 1.3224210 0.6166060 0.9460390 0.2985595
#>   11 0.8456800 1.1487661 1.5339198 1.4603103 0.7972407 0.9083181 0.3104918
#>   12 0.6615827 0.8424494 0.9621108 1.1549952 0.8906249 1.1672690 0.4074055
#>   13 0.7321958 1.6644768 1.3571823 1.3758129 0.8692013 0.8428494 0.4227206
#>   14 0.6889206 1.3441096 1.0001364 1.3316144 0.6990533 0.9767270 0.3668817
#>   15 0.6650555 1.1013515 1.0534006 1.4439201 0.6250317 0.9764912 0.4107063
#>   16 0.6307545 1.0143048 0.9057691 1.1970212 0.6428649 1.1297675 0.4464892
#>   17 0.4545336 0.7649817 0.6386519 1.1850953 0.7180171 1.3498512 0.6380881
#>   18 0.2387859 0.4582732 0.4825290 0.7606149 0.4698288 1.4322310 0.4482950
#>   19 0.3247530 0.4954699 0.7215982 1.1997380 0.7565238 1.0623980 0.5532108
#>   20 0.3065902 0.3618310 0.7706289 1.7941858 0.9670466 1.1454778 0.5344864
#>     year
#> age         15        16        17        18        19        20
#>   1  0.2819586 0.1704935 0.1221995 0.1844620 0.2674407 0.8060413
#>   2  0.2071841 0.1859594 0.1511617 0.2099920 0.2569781 0.6856593
#>   3  0.2622614 0.2892039 0.2054727 0.2571960 0.3583210 0.5906259
#>   4  0.2823775 0.3448753 0.1518262 0.2279845 0.3245112 0.5068060
#>   5  0.2753978 0.3653430 0.1585532 0.2802100 0.5442622 0.6297278
#>   6  0.3399367 0.4653904 0.1630899 0.3257151 0.5679011 0.6012391
#>   7  0.3963484 0.4965110 0.1849566 0.3044468 0.5855758 0.7025610
#>   8  0.3380527 0.3819616 0.1627786 0.2667980 0.5056609 0.7703279
#>   9  0.3588511 0.4611489 0.2662201 0.2491412 0.6340026 0.9698162
#>   10 0.3868181 0.6360699 0.3357498 0.2843230 0.9924505 0.9554302
#>   11 0.4285598 0.6339246 0.3641502 0.2256587 1.0259623 0.8008245
#>   12 0.5169332 0.6143848 0.2770388 0.3171828 1.3082027 1.1119539
#>   13 0.3927371 0.4109367 0.3089902 0.4771535 1.5373138 1.1278006
#>   14 0.3350018 0.3652456 0.3866428 0.5661710 1.6232187 1.2645232
#>   15 0.3585984 0.4496588 0.4198211 0.5601887 1.5403968 0.9625319
#>   16 0.2845602 0.4174995 0.4138471 0.5891943 1.2570406 0.4965587
#>   17 0.2867131 0.4377697 0.6011781 0.6352895 0.9243859 0.4519897
#>   18 0.1664977 0.3387228 0.4120923 0.3701513 0.6839102 0.4493965
#>   19 0.2038204 0.3141151 0.4220901 0.3443286 0.7703603 0.5485451
#>   20 0.2605152 0.3863365 0.4687948 0.5712012 1.3586898 0.6525777
#> 
#> $N
#>     year
#> age             1            2            3            4            5
#>   1  116028.44880 162983.83817 197403.57058 220624.86527 119847.31176
#>   2   86743.24772  86743.24772  97072.43997  97954.45351  87832.70003
#>   3   66111.31732  66111.31732  49301.81337  47387.42228  49818.34824
#>   4   48431.00903  48431.00903  48171.27133  25184.05893  26430.96342
#>   5   37712.66855  37712.66855  35899.72491  20173.57325  12820.27220
#>   6   31961.57455  31961.57455  28732.71331  16729.28718   9774.77575
#>   7   24129.74346  24129.74346  21891.66670  12392.04649   7593.30359
#>   8   17091.12668  17091.12668  14016.68651   7958.98767   4826.81644
#>   9   10571.04005  10571.04005   8116.61181   4818.12968   2882.78518
#>   10   6834.72794   6834.72794   5194.12582   3517.66961   1950.54877
#>   11   3827.17155   3827.17155   2324.25977   1736.56501   1353.44734
#>   12   2091.50772   2091.50772   1086.11834    484.79178    489.43248
#>   13   1270.04001   1270.04001   1010.14911    371.98679    198.82985
#>   14    741.29250    741.29250    564.72716    255.64700    127.42550
#>   15    411.21387    411.21387    428.54707    222.98100     85.46524
#>   16    227.63992    227.63992    208.04224    174.54764     72.70301
#>   17    108.39965    108.39965     92.34471     67.02541     82.01301
#>   18     56.48705     56.48705     52.50716     35.28594     40.83240
#>   19     28.25121     28.25121     25.38809     20.44639     19.72443
#>   20     17.51229     17.51229     15.48649     13.00082     15.10677
#>     year
#> age            6            7            8            9           10
#>   1  49668.47360 229477.81760  99731.04818 7.291589e+04 1.104183e+05
#>   2  72395.08650  34969.26131 206474.97832 8.624587e+04 4.980468e+04
#>   3  52088.77041  48800.67344  30364.56122 1.804007e+05 6.570089e+04
#>   4  32897.72737  35971.52134  43331.51093 2.647180e+04 1.199906e+05
#>   5  14963.79734  19389.07593  30393.93695 3.652603e+04 1.834089e+04
#>   6   6122.79171   7073.04821  15548.12478 2.426175e+04 2.502599e+04
#>   7   3564.99644   1754.81071   5543.98969 1.181401e+04 1.536189e+04
#>   8   2451.21521    519.27031   1300.70813 3.899481e+03 6.887527e+03
#>   9   1660.66478    354.13552    381.96238 8.259429e+02 2.240172e+03
#>   10  1068.42236    171.84576    247.23800 2.216271e+02 4.006915e+02
#>   11   617.93048    135.51937    109.56524 1.526141e+02 9.629951e+01
#>   12   411.15857    122.32418     82.89968 4.703256e+01 4.838291e+01
#>   13   251.71596    144.75273     85.86332 4.277905e+01 2.025478e+01
#>   14    89.96599    103.19021     95.24012 4.128755e+01 8.097633e+00
#>   15    41.53220     29.76585     67.05891 4.782176e+01 1.076663e+01
#>   16    34.12404     16.16773     21.13578 3.448471e+01 1.589698e+01
#>   17    34.88634     13.61997     11.39498 1.124826e+01 1.250603e+01
#>   18    45.49266     20.20859     10.39872 7.232896e+00 5.234291e+00
#>   19    23.96224     28.60159     15.75041 8.189858e+00 4.573900e+00
#>   20    13.92898     18.16774     23.30409 1.138291e+01 4.989954e+00
#>     year
#> age            11           12           13           14           15
#>   1  48630.253120 2.370611e+04 2.356464e+04 3.025047e+04 3.015988e+04
#>   2  51761.336188 2.507388e+04 1.423719e+04 1.551775e+04 2.119712e+04
#>   3  28684.398393 3.391789e+04 1.708062e+04 1.008245e+04 1.158465e+04
#>   4  29191.871016 1.785081e+04 2.187804e+04 1.035931e+04 7.033875e+03
#>   5  63803.655232 1.855336e+04 1.070934e+04 1.119788e+04 7.244581e+03
#>   6   9449.455983 3.633790e+04 9.658686e+03 4.210789e+03 7.035398e+03
#>   7   9991.096220 5.053521e+03 2.100174e+04 4.742302e+03 2.729994e+03
#>   8   5981.085934 5.078443e+03 3.386583e+03 1.151188e+04 2.953399e+03
#>   9   2565.180982 3.318773e+03 3.578175e+03 1.982836e+03 7.986211e+03
#>   10   829.020917 1.173490e+03 2.030038e+03 1.425754e+03 1.378864e+03
#>   11    79.366065 2.209252e+02 6.334186e+02 7.882150e+02 1.057747e+03
#>   12    20.770702 1.842596e+01 9.954240e+01 2.553955e+02 5.778296e+02
#>   13    18.486410 6.543998e+00 7.562000e+00 3.097916e+01 1.699336e+02
#>   14     5.213276 4.670298e+00 2.743809e+00 3.255306e+00 2.029946e+01
#>   15     2.978546 1.376569e+00 2.321398e+00 1.033158e+00 2.255574e+00
#>   16     3.754859 7.029393e-01 7.368008e-01 8.743089e-01 6.851713e-01
#>   17     6.426050 1.134316e+00 3.695942e-01 2.380665e-01 5.594446e-01
#>   18     6.603232 1.964553e+00 5.532266e-01 9.582796e-02 1.257709e-01
#>   19     3.230711 3.086212e+00 1.228060e+00 1.320970e-01 6.120687e-02
#>   20     2.222801 9.733266e-01 1.448344e+00 4.244496e-01 7.596904e-02
#>     year
#> age            16           17           18           19           20
#>   1  1.220702e+04 1.753079e+04 2.753160e+04 4.147693e+04 1.375066e+04
#>   2  2.274975e+04 1.029355e+04 1.551425e+04 2.289395e+04 3.174378e+04
#>   3  1.723050e+04 1.888928e+04 8.849453e+03 1.257571e+04 1.770584e+04
#>   4  8.912185e+03 1.290323e+04 1.538083e+04 6.842544e+03 8.788518e+03
#>   5  5.303465e+03 6.312578e+03 1.108565e+04 1.224524e+04 4.946343e+03
#>   6  5.500593e+03 3.680385e+03 5.387012e+03 8.376592e+03 7.105543e+03
#>   7  5.007904e+03 3.453767e+03 3.126541e+03 3.889481e+03 4.747130e+03
#>   8  1.836664e+03 3.048064e+03 2.870565e+03 2.305922e+03 2.165606e+03
#>   9  2.106239e+03 1.253563e+03 2.590181e+03 2.198358e+03 1.390717e+03
#>   10 5.578195e+03 1.328108e+03 9.605679e+02 2.018968e+03 1.166151e+03
#>   11 9.365447e+02 2.952923e+03 9.493338e+02 7.228499e+02 7.483655e+02
#>   12 6.890660e+02 4.968423e+02 2.051652e+03 7.575593e+02 2.591065e+02
#>   13 3.445868e+02 3.727665e+02 3.766189e+02 1.494008e+03 2.047724e+02
#>   14 1.147403e+02 2.284710e+02 2.736807e+02 2.337098e+02 3.211486e+02
#>   15 1.452095e+01 7.963274e+01 1.552080e+02 1.553671e+02 4.610224e+01
#>   16 1.575868e+00 9.262125e+00 5.233180e+01 8.863951e+01 3.329457e+01
#>   17 5.154853e-01 1.038011e+00 6.123209e+00 2.903232e+01 2.521747e+01
#>   18 4.199902e-01 3.327326e-01 5.690020e-01 3.243967e+00 1.151930e+01
#>   19 1.064808e-01 2.993186e-01 2.203565e-01 3.929697e-01 1.637035e+00
#>   20 4.992086e-02 7.777727e-02 1.962557e-01 1.561658e-01 1.818846e-01
#> 
#> $N_at_length
#>       year
#> length            1            2            3            4            5
#>    1   7.049676e-58 9.902599e-58 1.199388e-57 1.340476e-57 7.281703e-58
#>    4   8.526522e-18 1.197711e-17 1.450649e-17 1.621294e-17 8.807156e-18
#>    7   6.238740e-04 8.763488e-04 1.061420e-03 1.186279e-03 6.444077e-04
#>    10  2.604374e+02 3.658335e+02 4.430920e+02 4.952145e+02 2.690092e+02
#>    13  3.117012e+04 4.378431e+04 5.303089e+04 5.926911e+04 3.219602e+04
#>    16  7.155186e+04 1.005029e+05 1.217264e+05 1.360439e+05 7.390660e+04
#>    19  1.434736e+04 1.949418e+04 2.346098e+04 2.602286e+04 1.478641e+04
#>    22  1.859695e+04 1.873390e+04 2.100600e+04 2.125912e+04 1.883568e+04
#>    25  3.848964e+04 3.849065e+04 4.293983e+04 4.331753e+04 3.887974e+04
#>    28  2.699906e+04 2.699906e+04 2.865553e+04 2.876284e+04 2.625377e+04
#>    31  2.057560e+04 2.057560e+04 1.736248e+04 1.688343e+04 1.682857e+04
#>    34  2.445602e+04 2.445602e+04 1.888574e+04 1.743520e+04 1.822136e+04
#>    37  2.242129e+04 2.242129e+04 1.834265e+04 1.481183e+04 1.551484e+04
#>    40  1.952844e+04 1.952844e+04 1.776673e+04 1.144141e+04 1.174940e+04
#>    43  1.860972e+04 1.860972e+04 1.791309e+04 1.005899e+04 9.669630e+03
#>    46  1.762075e+04 1.762075e+04 1.703483e+04 9.329999e+03 7.926667e+03
#>    49  1.657804e+04 1.657804e+04 1.578133e+04 8.767129e+03 6.429044e+03
#>    52  1.574512e+04 1.574512e+04 1.470637e+04 8.306894e+03 5.451859e+03
#>    55  1.488209e+04 1.488209e+04 1.365912e+04 7.793074e+03 4.829432e+03
#>    58  1.383682e+04 1.383682e+04 1.249813e+04 7.159654e+03 4.340089e+03
#>    61  1.258939e+04 1.258939e+04 1.118169e+04 6.412874e+03 3.866972e+03
#>    64  1.117724e+04 1.117724e+04 9.728021e+03 5.590605e+03 3.373383e+03
#>    67  9.671047e+03 9.671047e+03 8.210583e+03 4.747317e+03 2.869499e+03
#>    70  8.151993e+03 8.151993e+03 6.725092e+03 3.932578e+03 2.382298e+03
#>    73  6.694872e+03 6.694872e+03 5.353941e+03 3.178547e+03 1.934227e+03
#>    76  5.358697e+03 5.358697e+03 4.150870e+03 2.502384e+03 1.536253e+03
#>    79  4.182347e+03 4.182347e+03 3.141249e+03 1.914173e+03 1.191162e+03
#>    82  3.184636e+03 3.184636e+03 2.327521e+03 1.420987e+03 8.989525e+02
#>    85  2.367201e+03 2.367201e+03 1.694863e+03 1.025396e+03 6.591589e+02
#>    88  1.718648e+03 1.718648e+03 1.217208e+03 7.226576e+02 4.700627e+02
#>    91  1.219173e+03 1.219173e+03 8.639255e+02 5.006685e+02 3.273301e+02
#>    94  8.450045e+02 8.450045e+02 6.057854e+02 3.430678e+02 2.239404e+02
#>    97  5.719708e+02 5.719708e+02 4.185324e+02 2.332697e+02 1.514613e+02
#>    100 3.778093e+02 3.778093e+02 2.837511e+02 1.573061e+02 1.016952e+02
#>    103 2.433070e+02 2.433070e+02 1.879694e+02 1.048049e+02 6.782918e+01
#>    106 1.526298e+02 1.526298e+02 1.212333e+02 6.861455e+01 4.481569e+01
#>    109 9.320297e+01 9.320297e+01 7.593856e+01 4.390802e+01 2.918597e+01
#>    112 5.537925e+01 5.537925e+01 4.613324e+01 2.734984e+01 1.863194e+01
#>    115 3.201387e+01 3.201387e+01 2.716975e+01 1.653777e+01 1.160414e+01
#>    118 1.800808e+01 1.800808e+01 1.551616e+01 9.694458e+00 7.026583e+00
#>    121 9.860497e+00 9.860497e+00 8.598411e+00 5.507606e+00 4.128176e+00
#>    124 5.258683e+00 5.258683e+00 4.628288e+00 3.033768e+00 2.351090e+00
#>    127 2.733429e+00 2.733429e+00 2.422672e+00 1.621718e+00 1.297999e+00
#>    130 1.385935e+00 1.385935e+00 1.234749e+00 8.422820e-01 6.950799e-01
#>    133 6.860648e-01 6.860648e-01 6.135086e-01 4.256074e-01 3.613973e-01
#>    136 3.318790e-01 3.318790e-01 2.975540e-01 2.095259e-01 1.826679e-01
#>    139 1.570379e-01 1.570379e-01 1.410415e-01 1.006359e-01 8.987943e-02
#>    142 7.275503e-02 7.275503e-02 6.541558e-02 4.722302e-02 4.311186e-02
#>    145 3.303551e-02 3.303551e-02 2.972123e-02 2.167796e-02 2.018792e-02
#>    148 1.471568e-02 1.471568e-02 1.324288e-02 9.747670e-03 9.241755e-03
#>    151 6.436908e-03 6.436908e-03 5.792796e-03 4.298618e-03 4.141669e-03
#>    154 2.767446e-03 2.767446e-03 2.490140e-03 1.861244e-03 1.819369e-03
#>    157 1.170531e-03 1.170531e-03 1.052957e-03 7.921338e-04 7.843871e-04
#>    160 4.874984e-04 4.874984e-04 4.383814e-04 3.317139e-04 3.322893e-04
#>    163 2.000887e-04 2.000887e-04 1.798592e-04 1.368117e-04 1.384723e-04
#>    166 8.100081e-05 8.100081e-05 7.278143e-05 5.562611e-05 5.682343e-05
#>    169 3.236817e-05 3.236817e-05 2.907145e-05 2.231566e-05 2.298480e-05
#>    172 1.277730e-05 1.277730e-05 1.147112e-05 8.840473e-06 9.172947e-06
#>    175 4.986189e-06 4.986189e-06 4.474626e-06 3.461110e-06 3.615044e-06
#>    178 1.924904e-06 1.924904e-06 1.726728e-06 1.340142e-06 1.408038e-06
#>    181 7.356107e-07 7.356107e-07 6.596238e-07 5.135533e-07 5.424371e-07
#>    184 2.784581e-07 2.784581e-07 2.496024e-07 1.948978e-07 2.068408e-07
#>    187 1.044741e-07 1.044741e-07 9.361486e-08 7.329740e-08 7.812237e-08
#>    190 3.887244e-08 3.887244e-08 3.482024e-08 2.733296e-08 2.924472e-08
#>    193 1.435115e-08 1.435115e-08 1.285113e-08 1.011214e-08 1.085715e-08
#>    196 5.260264e-09 5.260264e-09 4.708923e-09 3.713654e-09 3.999824e-09
#>    199 1.914878e-09 1.914878e-09 1.713719e-09 1.354435e-09 1.462978e-09
#>    202 6.927601e-10 6.927601e-10 6.198012e-10 4.908422e-10 5.315587e-10
#>    205 2.490167e-10 2.490167e-10 2.227466e-10 1.767764e-10 1.919183e-10
#>    208 8.908624e-11 8.908624e-11 7.966561e-11 6.333572e-11 6.890937e-11
#>    211 3.177636e-11 3.177636e-11 2.840323e-11 2.260264e-11 2.462016e-11
#>    214 1.123772e-11 1.123772e-11 1.004441e-11 8.017326e-12 8.751792e-12
#>    217 3.981169e-12 3.981169e-12 3.562282e-12 2.838602e-12 3.094642e-12
#>    220 1.390218e-12 1.390218e-12 1.241529e-12 9.948011e-13 1.091734e-12
#>    223 4.797985e-13 4.797985e-13 4.281947e-13 3.434279e-13 3.814251e-13
#>    226 1.680842e-13 1.680842e-13 1.497303e-13 1.202562e-13 1.338681e-13
#>    229 5.186970e-14 5.186970e-14 4.633292e-14 3.753502e-14 4.180491e-14
#>    232 2.420988e-14 2.420988e-14 2.178283e-14 1.711782e-14 1.897614e-14
#>    235 7.025023e-15 7.025023e-15 6.257335e-15 5.156767e-15 5.544228e-15
#>    238 1.944254e-15 1.944254e-15 1.719346e-15 1.443381e-15 1.677188e-15
#>       year
#> length            6            7            8            9           10
#>    1   3.017765e-58 1.394265e-57 6.059476e-58 4.430236e-58 6.708812e-58
#>    4   3.649961e-18 1.686352e-17 7.328883e-18 5.358332e-18 8.114250e-18
#>    7   2.670627e-04 1.233881e-03 5.362445e-04 3.920619e-04 5.937087e-04
#>    10  1.114858e+02 5.150858e+02 2.238563e+02 1.636670e+02 2.478448e+02
#>    13  1.334304e+04 6.164738e+04 2.679195e+04 1.958827e+04 2.966299e+04
#>    16  3.063455e+04 1.414930e+05 6.152125e+04 4.497013e+04 6.808735e+04
#>    19  6.804064e+03 2.581015e+04 1.480998e+04 9.612432e+03 1.303858e+04
#>    22  1.538295e+04 8.032202e+03 4.373890e+04 1.837802e+04 1.080820e+04
#>    25  3.210523e+04 1.564120e+04 9.092084e+04 3.889291e+04 2.225158e+04
#>    28  2.233706e+04 1.228474e+04 5.623954e+04 3.407644e+04 1.726813e+04
#>    31  1.643565e+04 1.342244e+04 1.966632e+04 4.656211e+04 1.853250e+04
#>    34  1.910513e+04 1.785875e+04 1.311489e+04 6.196352e+04 2.657650e+04
#>    37  1.690522e+04 1.652120e+04 1.318093e+04 4.702620e+04 3.150761e+04
#>    40  1.361895e+04 1.418938e+04 1.455028e+04 2.523587e+04 3.643979e+04
#>    43  1.163671e+04 1.282026e+04 1.548503e+04 1.540608e+04 3.578690e+04
#>    46  9.403600e+03 1.082310e+04 1.449580e+04 1.350718e+04 2.701394e+04
#>    49  7.110873e+03 8.483498e+03 1.256179e+04 1.349301e+04 1.761105e+04
#>    52  5.292770e+03 6.354271e+03 1.041089e+04 1.288487e+04 1.238878e+04
#>    55  3.946557e+03 4.517635e+03 8.180102e+03 1.133701e+04 1.032386e+04
#>    58  2.979417e+03 3.032365e+03 6.062347e+03 9.280768e+03 9.174071e+03
#>    61  2.312761e+03 1.940303e+03 4.247707e+03 7.139235e+03 7.867153e+03
#>    64  1.852950e+03 1.202874e+03 2.821507e+03 5.174881e+03 6.308757e+03
#>    67  1.517030e+03 7.385553e+02 1.785902e+03 3.538159e+03 4.725792e+03
#>    70  1.250935e+03 4.624509e+02 1.089147e+03 2.288053e+03 3.322936e+03
#>    73  1.026023e+03 3.044806e+02 6.518534e+02 1.407225e+03 2.202542e+03
#>    76  8.297939e+02 2.151511e+02 3.928439e+02 8.308866e+02 1.381165e+03
#>    79  6.581843e+02 1.634895e+02 2.456800e+02 4.779447e+02 8.228771e+02
#>    82  5.105157e+02 1.315444e+02 1.636023e+02 2.735820e+02 4.686878e+02
#>    85  3.867235e+02 1.093252e+02 1.171088e+02 1.601080e+02 2.576437e+02
#>    88  2.861231e+02 9.155053e+01 8.904955e+01 9.843013e+01 1.386829e+02
#>    91  2.070368e+02 7.579883e+01 7.013265e+01 6.458491e+01 7.463242e+01
#>    94  1.468708e+02 6.133271e+01 5.572401e+01 4.503704e+01 4.121518e+01
#>    97  1.024463e+02 4.823447e+01 4.379130e+01 3.267778e+01 2.393688e+01
#>    100 7.044372e+01 3.680701e+01 3.362328e+01 2.403558e+01 1.478692e+01
#>    103 4.780839e+01 2.725476e+01 2.506063e+01 1.753945e+01 9.632142e+00
#>    106 3.200335e+01 1.959095e+01 1.807966e+01 1.251829e+01 6.467584e+00
#>    109 2.108006e+01 1.366950e+01 1.261274e+01 8.668231e+00 4.367408e+00
#>    112 1.361539e+01 9.253011e+00 8.507538e+00 5.800481e+00 2.910270e+00
#>    115 8.591734e+00 6.070981e+00 5.549803e+00 3.745639e+00 1.891117e+00
#>    118 5.280174e+00 3.857385e+00 3.502570e+00 2.334063e+00 1.190771e+00
#>    121 3.153022e+00 2.371990e+00 2.139540e+00 1.404601e+00 7.245456e-01
#>    124 1.826916e+00 1.411304e+00 1.265630e+00 8.172345e-01 4.257476e-01
#>    127 1.026572e+00 8.126541e-01 7.254848e-01 4.603372e-01 2.417263e-01
#>    130 5.594983e-01 4.531357e-01 4.032996e-01 2.513950e-01 1.327681e-01
#>    133 2.959521e-01 2.448975e-01 2.176251e-01 1.332947e-01 7.065000e-02
#>    136 1.520827e-01 1.284314e-01 1.141111e-01 6.871724e-02 3.648303e-02
#>    139 7.601364e-02 6.544141e-02 5.820801e-02 3.449246e-02 1.831288e-02
#>    142 3.700227e-02 3.244385e-02 2.892020e-02 1.688042e-02 8.950084e-03
#>    145 1.756662e-02 1.567228e-02 1.401291e-02 8.065319e-03 4.265771e-03
#>    148 8.144705e-03 7.387125e-03 6.630034e-03 3.767030e-03 1.985789e-03
#>    151 3.693060e-03 3.402336e-03 3.067002e-03 1.722095e-03 9.042043e-04
#>    154 1.639841e-03 1.533328e-03 1.388881e-03 7.714657e-04 4.032701e-04
#>    157 7.139719e-04 6.770561e-04 6.164480e-04 3.390618e-04 1.763951e-04
#>    160 3.051818e-04 2.932899e-04 2.684847e-04 1.463604e-04 7.576529e-05
#>    163 1.282162e-04 1.247891e-04 1.148750e-04 6.211694e-05 3.199250e-05
#>    166 5.300480e-05 5.221081e-05 4.833750e-05 2.594637e-05 1.329510e-05
#>    169 2.158395e-05 2.150399e-05 2.002369e-05 1.067679e-05 5.443068e-06
#>    172 8.666008e-06 8.727626e-06 8.173931e-06 4.332114e-06 2.197464e-06
#>    175 3.433872e-06 3.493899e-06 3.291161e-06 1.734729e-06 8.756246e-07
#>    178 1.344023e-06 1.380879e-06 1.308221e-06 6.861106e-07 3.446682e-07
#>    181 5.200493e-07 5.392656e-07 5.137936e-07 2.682423e-07 1.341277e-07
#>    184 1.990830e-07 2.082574e-07 1.995325e-07 1.037415e-07 5.164130e-08
#>    187 7.545586e-08 7.959339e-08 7.667942e-08 3.971692e-08 1.968543e-08
#>    190 2.833466e-08 3.012596e-08 2.918022e-08 1.506205e-08 7.434491e-09
#>    193 1.054840e-08 1.130007e-08 1.100346e-08 5.661750e-09 2.783482e-09
#>    196 3.895590e-09 4.203151e-09 4.114092e-09 2.110741e-09 1.033756e-09
#>    199 1.427922e-09 1.551213e-09 1.526073e-09 7.808718e-10 3.810447e-10
#>    202 5.198025e-10 5.683586e-10 5.619221e-10 2.868225e-10 1.394747e-10
#>    205 1.879880e-10 2.068295e-10 2.054825e-10 1.046482e-10 5.071930e-11
#>    208 6.759147e-11 7.480464e-11 7.467002e-11 3.794856e-11 1.833401e-11
#>    211 2.417566e-11 2.690701e-11 2.698325e-11 1.368728e-11 6.591042e-12
#>    214 8.601392e-12 9.622849e-12 9.692328e-12 4.909259e-12 2.358236e-12
#>    217 3.043365e-12 3.422859e-12 3.466456e-12 1.753025e-12 8.384863e-13
#>    220 1.076337e-12 1.215010e-12 1.233166e-12 6.223771e-13 2.975072e-13
#>    223 3.776415e-13 4.299676e-13 4.376389e-13 2.196783e-13 1.047516e-13
#>    226 1.304986e-13 1.495159e-13 1.533988e-13 7.704779e-14 3.683290e-14
#>    229 4.198133e-14 4.923468e-14 5.213274e-14 2.592391e-14 1.203028e-14
#>    232 1.964995e-14 2.069658e-14 2.017543e-14 1.020407e-14 4.920710e-15
#>    235 5.753197e-15 7.209464e-15 6.923195e-15 3.436771e-15 1.615797e-15
#>    238 1.546427e-15 2.017025e-15 2.587274e-15 1.263757e-15 5.539962e-16
#>       year
#> length           11           12           13           14           15
#>    1   2.954685e-58 1.440340e-58 1.431744e-58 1.837963e-58 1.832459e-58
#>    4   3.573666e-18 1.742079e-18 1.731682e-18 2.223001e-18 2.216343e-18
#>    7   2.614803e-04 1.274655e-04 1.267048e-04 1.626540e-04 1.621668e-04
#>    10  1.091555e+02 5.321074e+01 5.289318e+01 6.790021e+01 6.769686e+01
#>    13  1.306413e+04 6.368459e+03 6.330452e+03 8.126549e+03 8.102212e+03
#>    16  2.999136e+04 1.462006e+04 1.453123e+04 1.865366e+04 1.859865e+04
#>    19  6.302682e+03 3.069436e+03 2.850373e+03 3.607266e+03 3.704015e+03
#>    22  1.103597e+04 5.348414e+03 3.066133e+03 3.354376e+03 4.549275e+03
#>    25  2.290838e+04 1.120626e+04 6.351387e+03 6.876222e+03 9.380688e+03
#>    28  1.543157e+04 8.739379e+03 4.826846e+03 4.720152e+03 6.308416e+03
#>    31  9.820387e+03 9.346219e+03 4.857877e+03 3.289424e+03 3.963975e+03
#>    34  1.101457e+04 1.216820e+04 6.592711e+03 3.852168e+03 4.275425e+03
#>    37  1.104427e+04 1.058239e+04 7.011827e+03 3.835244e+03 3.746094e+03
#>    40  1.193783e+04 8.299737e+03 7.374816e+03 3.874998e+03 3.086850e+03
#>    43  1.489894e+04 7.759667e+03 7.427534e+03 4.165438e+03 2.946139e+03
#>    46  1.795614e+04 8.266077e+03 6.571833e+03 4.249335e+03 2.983194e+03
#>    49  1.867360e+04 9.428621e+03 5.689624e+03 4.043388e+03 3.037036e+03
#>    52  1.606590e+04 1.059922e+04 5.456793e+03 3.620014e+03 3.016709e+03
#>    55  1.178237e+04 1.075990e+04 5.780457e+03 3.212659e+03 2.857142e+03
#>    58  8.064329e+03 9.501981e+03 6.187845e+03 3.069261e+03 2.611890e+03
#>    61  5.703124e+03 7.377644e+03 6.180355e+03 3.183692e+03 2.408869e+03
#>    64  4.314746e+03 5.262597e+03 5.562212e+03 3.319681e+03 2.331938e+03
#>    67  3.354188e+03 3.653796e+03 4.522208e+03 3.237783e+03 2.343349e+03
#>    70  2.548103e+03 2.571053e+03 3.401292e+03 2.865943e+03 2.321023e+03
#>    73  1.841810e+03 1.835523e+03 2.437938e+03 2.300642e+03 2.163877e+03
#>    76  1.255864e+03 1.295565e+03 1.701703e+03 1.697839e+03 1.859153e+03
#>    79  8.073573e+02 8.804506e+02 1.163510e+03 1.173417e+03 1.469261e+03
#>    82  4.905803e+02 5.673467e+02 7.738721e+02 7.726759e+02 1.076558e+03
#>    85  2.829910e+02 3.448395e+02 4.952705e+02 4.904980e+02 7.397269e+02
#>    88  1.560166e+02 1.978865e+02 3.024627e+02 3.016382e+02 4.818932e+02
#>    91  8.307296e+01 1.077017e+02 1.755972e+02 1.796035e+02 3.001333e+02
#>    94  4.341511e+01 5.600463e+01 9.693394e+01 1.032344e+02 1.796338e+02
#>    97  2.278348e+01 2.811944e+01 5.104354e+01 5.711597e+01 1.035582e+02
#>    100 1.233151e+01 1.383711e+01 2.578418e+01 3.037260e+01 5.753956e+01
#>    103 7.033121e+00 6.807792e+00 1.259506e+01 1.552911e+01 3.081271e+01
#>    106 4.246739e+00 3.427018e+00 6.014029e+00 7.649439e+00 1.590520e+01
#>    109 2.675955e+00 1.800132e+00 2.845762e+00 3.642861e+00 7.919437e+00
#>    112 1.718040e+00 9.938740e-01 1.355499e+00 1.685222e+00 3.808660e+00
#>    115 1.099211e+00 5.718363e-01 6.595309e-01 7.618245e-01 1.772556e+00
#>    118 6.900838e-01 3.365282e-01 3.308205e-01 3.388869e-01 8.002128e-01
#>    121 4.213202e-01 1.986363e-01 1.711262e-01 1.494690e-01 3.513721e-01
#>    124 2.490779e-01 1.158333e-01 9.056482e-02 6.585703e-02 1.505119e-01
#>    127 1.423710e-01 6.610119e-02 4.844310e-02 2.917249e-02 6.309146e-02
#>    130 7.869028e-02 3.672481e-02 2.587613e-02 1.304535e-02 2.596305e-02
#>    133 4.209793e-02 1.982086e-02 1.367269e-02 5.896055e-03 1.052231e-02
#>    136 2.183027e-02 1.038714e-02 7.101436e-03 2.688817e-03 4.212827e-03
#>    139 1.099064e-02 5.288236e-03 3.612191e-03 1.232652e-03 1.671026e-03
#>    142 5.381303e-03 2.618357e-03 1.796167e-03 5.654515e-04 6.583097e-04
#>    145 2.566760e-03 1.262492e-03 8.726371e-04 2.583839e-04 2.581122e-04
#>    148 1.194615e-03 5.936594e-04 4.143114e-04 1.171649e-04 1.008747e-04
#>    151 5.433712e-04 2.726428e-04 1.923620e-04 5.257103e-05 3.933456e-05
#>    154 2.419012e-04 1.224694e-04 8.742065e-05 2.329512e-05 1.531008e-05
#>    157 1.055511e-04 5.388216e-05 3.892873e-05 1.018222e-05 5.948255e-06
#>    160 4.520069e-05 2.325018e-05 1.700473e-05 4.387606e-06 2.306018e-06
#>    163 1.902061e-05 9.851932e-06 7.294519e-06 1.863633e-06 8.915706e-07
#>    166 7.874205e-06 4.104395e-06 3.076283e-06 7.803931e-07 3.435467e-07
#>    169 3.210446e-06 1.683054e-06 1.276785e-06 3.222906e-07 1.318453e-07
#>    172 1.290460e-06 6.800286e-07 5.220478e-07 1.313357e-07 5.036594e-08
#>    175 5.118699e-07 2.709988e-07 2.104851e-07 5.284104e-08 1.914173e-08
#>    178 2.005397e-07 1.066163e-07 8.376229e-08 2.100342e-08 7.235076e-09
#>    181 7.766605e-08 4.144520e-08 3.292787e-08 8.253061e-09 2.718945e-09
#>    184 2.975737e-08 1.593218e-08 1.279733e-08 3.207896e-09 1.015622e-09
#>    187 1.128785e-08 6.061249e-09 4.921020e-09 1.234307e-09 3.772407e-10
#>    190 4.242107e-09 2.283729e-09 1.873580e-09 4.703763e-10 1.392873e-10
#>    193 1.580476e-09 8.527432e-10 7.067537e-10 1.776244e-10 5.105770e-11
#>    196 5.841156e-10 3.157648e-10 2.643294e-10 6.654966e-11 1.869925e-11
#>    199 2.142674e-10 1.160193e-10 9.806474e-11 2.471945e-11 6.761022e-12
#>    202 7.805556e-11 4.232259e-11 3.611305e-11 9.119544e-12 2.445355e-12
#>    205 2.825079e-11 1.533523e-11 1.320677e-11 3.339940e-12 8.708687e-13
#>    208 1.016479e-11 5.522525e-12 4.799100e-12 1.216093e-12 3.121076e-13
#>    211 3.637389e-12 1.977789e-12 1.733828e-12 4.404545e-13 1.128572e-13
#>    214 1.295378e-12 7.045455e-13 6.228740e-13 1.584804e-13 3.928502e-14
#>    217 4.584094e-13 2.494587e-13 2.226063e-13 5.677557e-14 1.401398e-14
#>    220 1.623210e-13 8.829420e-14 7.925050e-14 2.023005e-14 4.869346e-15
#>    223 5.702600e-14 3.117742e-14 2.815488e-14 7.169325e-15 1.689523e-15
#>    226 1.977975e-14 1.076412e-14 9.852409e-15 2.525590e-15 6.039799e-16
#>    229 6.363098e-15 3.425699e-15 3.340362e-15 8.703992e-16 1.845271e-16
#>    232 2.931151e-15 1.551752e-15 1.298895e-15 3.227107e-16 7.815957e-17
#>    235 8.522420e-16 5.587602e-16 4.579390e-16 1.089125e-16 2.366384e-17
#>    238 2.467805e-16 1.080610e-16 1.607984e-16 4.712337e-17 8.434257e-18
#>       year
#> length           16           17           18           19           20
#>    1   7.416759e-59 1.065139e-58 1.672770e-58 2.520063e-58 8.354651e-59
#>    4   8.970505e-19 1.288276e-18 2.023200e-18 3.047994e-18 1.010488e-18
#>    7   6.563597e-05 9.426140e-05 1.480348e-04 2.230176e-04 7.393602e-05
#>    10  2.739986e+01 3.934960e+01 6.179743e+01 9.309912e+01 3.086473e+01
#>    13  3.279318e+03 4.709506e+03 7.396145e+03 1.114245e+04 3.694006e+03
#>    16  7.529786e+03 1.081038e+04 1.697730e+04 2.557659e+04 8.482880e+03
#>    19  1.765350e+03 2.114921e+03 3.309182e+03 4.976361e+03 2.103491e+03
#>    22  4.824171e+03 2.218923e+03 3.345587e+03 4.939417e+03 6.721180e+03
#>    25  1.009351e+04 4.627726e+03 6.867916e+03 1.013215e+04 1.404933e+04
#>    28  7.073442e+03 3.902021e+03 4.642281e+03 6.817296e+03 9.469419e+03
#>    31  5.355806e+03 4.994128e+03 3.028332e+03 4.292780e+03 6.010561e+03
#>    34  6.242491e+03 6.854117e+03 3.615744e+03 4.614304e+03 6.458486e+03
#>    37  5.337572e+03 6.254666e+03 4.191218e+03 3.986289e+03 5.437961e+03
#>    40  4.036556e+03 5.206263e+03 4.984676e+03 3.292289e+03 4.043508e+03
#>    43  3.387177e+03 4.580734e+03 5.476850e+03 3.423815e+03 3.344082e+03
#>    46  2.944602e+03 3.816674e+03 5.192201e+03 3.945405e+03 2.912045e+03
#>    49  2.639438e+03 3.044288e+03 4.536408e+03 4.337394e+03 2.689830e+03
#>    52  2.516094e+03 2.486940e+03 3.808419e+03 4.299309e+03 2.691353e+03
#>    55  2.470832e+03 2.131742e+03 3.104937e+03 3.863145e+03 2.729701e+03
#>    58  2.392049e+03 1.913593e+03 2.522065e+03 3.246580e+03 2.631336e+03
#>    61  2.244680e+03 1.769346e+03 2.105414e+03 2.637221e+03 2.363294e+03
#>    64  2.069028e+03 1.645226e+03 1.826925e+03 2.135410e+03 1.996609e+03
#>    67  1.926789e+03 1.517627e+03 1.629438e+03 1.767901e+03 1.621147e+03
#>    70  1.837039e+03 1.391227e+03 1.465666e+03 1.511398e+03 1.293355e+03
#>    73  1.759784e+03 1.275040e+03 1.312321e+03 1.323360e+03 1.029197e+03
#>    76  1.635187e+03 1.164110e+03 1.164109e+03 1.167531e+03 8.201832e+02
#>    79  1.432865e+03 1.042368e+03 1.020468e+03 1.023264e+03 6.513771e+02
#>    82  1.168439e+03 8.979678e+02 8.784787e+02 8.822850e+02 5.114452e+02
#>    85  8.852244e+02 7.336394e+02 7.348961e+02 7.426897e+02 3.944493e+02
#>    88  6.260877e+02 5.645542e+02 5.908191e+02 6.057883e+02 2.976674e+02
#>    91  4.164764e+02 4.088808e+02 4.527033e+02 4.753419e+02 2.192897e+02
#>    94  2.626024e+02 2.795308e+02 3.291889e+02 3.567183e+02 1.573796e+02
#>    97  1.580226e+02 1.812226e+02 2.269911e+02 2.550929e+02 1.097658e+02
#>    100 9.123165e+01 1.119703e+02 1.486587e+02 1.735961e+02 7.420874e+01
#>    103 5.072128e+01 6.623267e+01 9.273389e+01 1.124817e+02 4.852330e+01
#>    106 2.722170e+01 3.764951e+01 5.528739e+01 6.952225e+01 3.064221e+01
#>    109 1.412621e+01 2.062759e+01 3.161081e+01 4.109590e+01 1.867764e+01
#>    112 7.096634e+00 1.091760e+01 1.738776e+01 2.330200e+01 1.099182e+01
#>    115 3.455334e+00 5.592078e+00 9.227278e+00 1.271229e+01 6.251003e+00
#>    118 1.632588e+00 2.776153e+00 4.735776e+00 6.692008e+00 3.439765e+00
#>    121 7.495987e-01 1.337647e+00 2.355721e+00 3.408504e+00 1.834306e+00
#>    124 3.350005e-01 6.264176e-01 1.137861e+00 1.683864e+00 9.494707e-01
#>    127 1.459808e-01 2.855113e-01 5.345944e-01 8.085997e-01 4.778142e-01
#>    130 6.214406e-02 1.268401e-01 2.446859e-01 3.781691e-01 2.341419e-01
#>    133 2.589452e-02 5.500759e-02 1.092658e-01 1.725502e-01 1.118871e-01
#>    136 1.058236e-02 2.332364e-02 4.767227e-02 7.693004e-02 5.221086e-02
#>    139 4.249899e-03 9.684081e-03 2.034925e-02 3.356137e-02 2.382221e-02
#>    142 1.680463e-03 3.943550e-03 8.509640e-03 1.434528e-02 1.064070e-02
#>    145 6.554335e-04 1.577431e-03 3.490743e-03 6.014872e-03 4.658247e-03
#>    148 2.525940e-04 6.207223e-04 1.406424e-03 2.476752e-03 2.000832e-03
#>    151 9.633745e-05 2.406324e-04 5.572336e-04 1.002632e-03 8.440802e-04
#>    154 3.641307e-05 9.202751e-05 2.173668e-04 3.994346e-04 3.500837e-04
#>    157 1.365663e-05 3.476587e-05 8.357510e-05 1.567531e-04 1.428853e-04
#>    160 5.087530e-06 1.298942e-05 3.170736e-05 6.065357e-05 5.744153e-05
#>    163 1.884169e-06 4.805285e-06 1.188210e-05 2.316075e-05 2.276501e-05
#>    166 6.941886e-07 1.761950e-06 4.402548e-06 8.735224e-06 8.901805e-06
#>    169 2.545683e-07 6.409514e-07 1.614352e-06 3.256672e-06 3.437213e-06
#>    172 9.295388e-08 2.315185e-07 5.863522e-07 1.201129e-06 1.311562e-06
#>    175 3.380427e-08 8.310134e-08 2.111274e-07 4.385728e-07 4.949319e-07
#>    178 1.224669e-08 2.966109e-08 7.542155e-08 1.586491e-07 1.848347e-07
#>    181 4.419932e-09 1.053383e-08 2.675017e-08 5.689410e-08 6.835901e-08
#>    184 1.589235e-09 3.723786e-09 9.425816e-09 2.023963e-08 2.505293e-08
#>    187 5.694748e-10 1.311327e-09 3.302058e-09 7.146908e-09 9.104238e-09
#>    190 2.033446e-10 4.599823e-10 1.150816e-09 2.506456e-09 3.282457e-09
#>    193 7.225636e-11 1.607687e-10 3.988830e-10 8.733799e-10 1.174756e-09
#>    196 2.570484e-11 5.611162e-11 1.379492e-10 3.027829e-10 4.176347e-10
#>    199 9.043082e-12 1.947270e-11 4.737908e-11 1.042858e-10 1.474952e-10
#>    202 3.195233e-12 6.764606e-12 1.625721e-11 3.579042e-11 5.181435e-11
#>    205 1.097722e-12 2.302272e-12 5.514711e-12 1.214320e-11 1.805420e-11
#>    208 3.863502e-13 7.982479e-13 1.884320e-12 4.135351e-12 6.280236e-12
#>    211 1.443204e-13 2.952173e-13 6.679861e-13 1.425776e-12 2.198940e-12
#>    214 4.573081e-14 9.153130e-14 2.160687e-13 4.756659e-13 7.476846e-13
#>    217 1.697541e-14 3.733108e-14 8.358748e-14 1.686084e-13 2.580499e-13
#>    220 5.400136e-15 9.972719e-15 2.292343e-14 5.165158e-14 8.763795e-14
#>    223 1.819192e-15 3.136726e-15 5.957660e-15 1.419471e-14 2.858632e-14
#>    226 6.286513e-16 1.105780e-15 2.257692e-15 5.746709e-15 1.015014e-14
#>    229 1.881348e-16 3.166601e-16 5.314388e-16 8.294103e-16 2.349174e-15
#>    232 1.035257e-16 1.552129e-16 2.428334e-16 5.514368e-16 1.763553e-15
#>    235 2.290640e-17 5.050106e-17 6.804201e-17 7.830417e-17 2.221339e-16
#>    238 5.542329e-18 8.635011e-18 2.178876e-17 1.733788e-17 2.019324e-17
#> 
#> $sim_length
#> function (age = NULL, length_age_key = FALSE) 
#> {
#>     pred_length <- Linf - (Linf - L0) * exp(-K * age)
#>     if (length_age_key) {
#>         breaks <- seq(0, ceiling(max(pred_length)) * 10, length_group)
#>         lak <- matrix(NA, ncol = length(pred_length), nrow = length(breaks) - 
#>             1, dimnames = list(length = group_lengths(breaks, 
#>             length_group)[-length(breaks)], age = age))
#>         for (i in seq_along(breaks)[-1]) {
#>             for (j in seq_along(pred_length)) {
#>                 lak[i - 1, j] <- stats::pnorm(log(breaks[i]), 
#>                   log(pred_length[j]), sd = log_sd) - stats::pnorm(log(breaks[i - 
#>                   1]), log(pred_length[j]), sd = log_sd)
#>             }
#>         }
#>         lak <- lak[rowSums(lak) > 0, ]
#>         if (plot) 
#>             graphics::image(x = as.numeric(colnames(lak)), y = as.numeric(rownames(lak)), 
#>                 z = t(lak), xlab = "Age", ylab = "Length", main = "P(Length | Age)", 
#>                 col = viridis::viridis(100))
#>         return(lak)
#>     }
#>     else {
#>         log_length <- stats::rnorm(length(age), log(pred_length), 
#>             sd = log_sd)
#>         length <- round(exp(log_length), digits)
#>         if (plot) 
#>             plot(age, length)
#>         return(length)
#>     }
#> }
#> <bytecode: 0x55d5ac817108>
#> <environment: 0x55d5b2e28ca0>
#> 
sim_abundance(years = 1:20,
              R = sim_R(log_mean = log(c(rep(100000, 10), rep(10000, 10))), plot = TRUE))

#> $ages
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $lengths
#>  [1]   1   4   7  10  13  16  19  22  25  28  31  34  37  40  43  46  49  52  55
#> [20]  58  61  64  67  70  73  76  79  82  85  88  91  94  97 100 103 106 109 112
#> [39] 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169
#> [58] 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226
#> [77] 229 232 235 238
#> 
#> $years
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $R
#>           1           2           3           4           5           6 
#> 86713.84204 64537.75333 47412.17142 35837.14000 56814.73477 39746.72690 
#>           7           8           9          10          11          12 
#> 24378.27328 22989.40894 10852.55303 12121.35631  1141.74725  1467.78690 
#>          13          14          15          16          17          18 
#>   704.45154   183.59560    93.19967    44.62296    36.80363    45.20333 
#>          19          20 
#>    48.78038    47.87159 
#> 
#> $N0
#>  [1] 86713.84204 69218.40190 52200.68559 40499.65580 31650.98585 22622.49443
#>  [7] 16889.39432 12333.08030  9478.11835  6537.44610  4414.87106  2684.15147
#> [13]  1653.34474  1003.67095   601.31528   456.07788   348.56513   243.49079
#> [19]   142.39336    70.62126
#> 
#> $Z
#>     year
#> age          1         2         3         4         5         6         7
#>   1  0.2253468 0.1977008 0.4118929 0.2324494 0.2527467 1.1995319 1.1717028
#>   2  0.2821711 0.2235109 0.3750137 0.2629118 0.2551036 0.8448435 0.9253508
#>   3  0.2538022 0.2495310 0.4828063 0.3631984 0.4029760 0.8432456 0.8887827
#>   4  0.2465242 0.2571345 0.5474886 0.2625136 0.3844399 0.8303113 1.1345331
#>   5  0.3358246 0.3701295 0.5164187 0.2100469 0.3174093 0.8398728 1.2222713
#>   6  0.2922589 0.3193082 0.6282605 0.2649887 0.3163578 0.6706523 1.1591663
#>   7  0.3144008 0.3128750 0.5746849 0.3065192 0.3418029 0.6647465 0.9153481
#>   8  0.2632993 0.3404990 0.5733246 0.2902439 0.3270326 0.5179156 0.6619689
#>   9  0.3714392 0.3519061 0.6889752 0.2971810 0.4054429 0.6758952 0.9559755
#>   10 0.3925680 0.3914121 0.7415130 0.3527237 0.3682302 0.6175371 0.8821929
#>   11 0.4976140 0.5280125 0.7902879 0.4264930 0.4807611 0.5492673 0.5988206
#>   12 0.4845643 0.5461690 0.7585891 0.5211258 0.5569208 0.6941300 0.5620055
#>   13 0.4991361 0.6597923 1.0452181 0.7870649 0.7413254 0.7388492 0.5430054
#>   14 0.5123001 0.7552449 0.8573021 0.8820478 1.0646263 0.8099964 0.5533625
#>   15 0.2764558 0.5301429 0.3500273 0.6293216 0.9111130 0.7599151 0.7462199
#>   16 0.2688385 0.6035617 0.3431197 0.5593546 0.4963755 0.7072137 0.7835432
#>   17 0.3587460 0.7293102 0.2638418 0.3793884 0.3574390 0.5314175 0.8600759
#>   18 0.5364858 0.8169472 0.2472661 0.3571212 0.3048029 0.5035250 0.6301592
#>   19 0.7012621 0.5866111 0.2740064 0.3449462 0.3555115 0.6224333 0.6931312
#>   20 0.6051751 0.6753183 0.3547243 0.4262719 0.2935962 0.4826568 0.4678476
#>     year
#> age          8         9        10        11        12        13        14
#>   1  0.6608443 0.8340297 1.1121633 0.7238378 0.4687613 0.9249969 0.7574716
#>   2  0.5270104 0.7044771 0.9212731 0.6131557 0.3566975 0.5873399 0.5506368
#>   3  0.6141484 1.0237127 0.7582386 0.4940632 0.2988406 0.6165154 0.4888871
#>   4  0.7915633 1.4162007 0.8562414 0.4107353 0.3344708 0.5461685 0.4999247
#>   5  0.7170622 1.5384764 0.7955113 0.4333743 0.3183346 0.4373786 0.5972428
#>   6  0.5463835 1.4334495 0.9165215 0.5567229 0.4255049 0.5682382 0.8616496
#>   7  0.5183489 1.5385855 0.8537367 0.5380748 0.3751762 0.4178743 0.6053398
#>   8  0.4842356 1.6738597 0.9725271 0.7124584 0.3275313 0.4646236 0.7810436
#>   9  0.7240292 2.2696304 0.9627207 0.7715354 0.4307631 0.4690287 0.7726675
#>   10 0.5809026 1.6971876 1.0214939 0.4354824 0.3215007 0.2945636 0.5022681
#>   11 0.4118148 1.7061243 1.3888228 0.5933996 0.3633468 0.2382169 0.3863341
#>   12 0.4113629 1.0568947 1.0929059 0.6392433 0.3627083 0.3045899 0.5438572
#>   13 0.4329271 1.1790212 0.9318990 0.9934357 0.4539452 0.4120011 0.6546617
#>   14 0.5464079 1.1708932 1.1100744 1.0302791 0.4836618 0.3598795 0.4326441
#>   15 0.4995991 0.7684269 0.8873435 0.6531245 0.3995757 0.2500717 0.2399068
#>   16 0.4829263 0.5947766 0.7153701 0.6089648 0.4119727 0.3656938 0.2957166
#>   17 0.4602311 0.6937620 0.6468063 0.5977990 0.4517579 0.4408744 0.3950179
#>   18 0.3426458 0.6450963 0.6025711 0.4999855 0.4753629 0.3798651 0.3337477
#>   19 0.3792651 0.4621712 0.5156620 0.3423016 0.4891617 0.3973259 0.4407591
#>   20 0.2710392 0.4072108 0.4549380 0.4074589 0.4832589 0.4359440 0.3517648
#>     year
#> age         15        16        17        18        19        20
#>   1  0.8655706 0.3795007 0.3816708 0.6112199 0.5978749 0.2982118
#>   2  0.7418438 0.3313777 0.5007048 0.8018619 0.5650843 0.3836050
#>   3  1.1242213 0.4419844 0.4792009 0.9382178 0.5121314 0.2975396
#>   4  1.1188182 0.3843312 0.3623915 0.9564781 0.3992394 0.3563071
#>   5  1.1902030 0.4245327 0.6173865 1.0494149 0.4590973 0.5169464
#>   6  1.9653103 0.5843572 0.5331344 0.6224527 0.3779646 0.4851477
#>   7  1.1217232 0.5474042 0.4459674 0.5164508 0.3374365 0.4562719
#>   8  1.1558428 0.7035135 0.5467220 0.6703107 0.3765421 0.4402292
#>   9  1.2264364 0.7421085 0.4761696 0.5935913 0.3531147 0.4641433
#>   10 0.8143545 0.9090708 0.4844963 0.6556857 0.4135979 0.4287704
#>   11 0.7206164 0.9136392 0.7227109 1.3291902 0.8147241 0.5488796
#>   12 0.7394061 0.7755388 0.9170768 1.2305504 0.9542057 0.7474217
#>   13 1.0340476 0.9268027 0.9818051 1.1052828 0.7963035 0.5908606
#>   14 0.9098031 0.9209819 0.8530542 1.0745509 0.6345305 0.5693838
#>   15 0.4421509 0.5620280 0.9398014 1.9258965 0.7984410 0.6471526
#>   16 0.5663548 0.5187015 1.0609771 2.0477702 0.9358353 0.7571553
#>   17 0.7324508 0.5390880 0.9445805 1.8961242 1.2837539 0.7052738
#>   18 0.5309455 0.4596819 0.6881942 1.4438157 1.5617077 0.8683472
#>   19 0.6528489 0.5583165 0.7973123 1.3425922 1.4825804 0.8150971
#>   20 0.5881619 0.5405031 0.8831415 0.9697538 1.5659010 0.8624473
#> 
#> $N
#>     year
#> age            1           2           3           4           5           6
#>   1  86713.84204 64537.75333 47412.17142 35837.14000 56814.73477 39746.72690
#>   2  69218.40190 69218.40190 52960.66936 31405.59652 28404.15364 44125.99080
#>   3  52200.68559 52200.68559 55354.38234 36398.80266 24144.92745 22008.56794
#>   4  40499.65580 40499.65580 40673.00657 34156.38544 25313.49130 16136.73523
#>   5  31650.98585 31650.98585 31316.93312 23525.29078 26270.21818 17234.23226
#>   6  22622.49443 22622.49443 21859.59167 18685.35817 19068.33646 19125.57748
#>   7  16889.39432 16889.39432 16438.67130 11662.50855 14335.67956 13896.97759
#>   8  12333.08030 12333.08030 12351.91209  9253.03555  8583.65782 10185.33164
#>   9   9478.11835  9478.11835  8773.94160  6962.13596  6922.02092  6189.33410
#>   10  6537.44610  6537.44610  6666.39785  4405.31151  5172.23712  4614.78288
#>   11  4414.87106  4414.87106  4419.97693  3175.82266  3095.92671  3578.97037
#>   12  2684.15147  2684.15147  2603.78490  2005.40617  2073.15944  1914.25055
#>   13  1653.34474  1653.34474  1554.56477  1219.42206  1190.91374  1187.85945
#>   14  1003.67095  1003.67095   854.71091   546.60846   555.05511   567.44890
#>   15   601.31528   601.31528   471.62051   362.65833   226.26004   191.41447
#>   16   456.07788   456.07788   353.88660   332.33630   193.27993    90.97384
#>   17   348.56513   348.56513   249.41094   251.10139   189.95607   117.65587
#>   18   243.49079   243.49079   168.09258   191.57131   171.82361   132.86770
#>   19   142.39336   142.39336   107.56893   131.26902   134.04009   126.68017
#>   20    70.62126    70.62126    79.20047    81.78759    92.97239    93.93729
#>     year
#> age            7           8           9           10          11         12
#>   1  24378.27328 22989.40894 10852.55303 12121.356306 1141.747247 1467.78690
#>   2  11977.08962  7553.33720 11872.07939  4713.216628 3986.069114  553.61929
#>   3  18957.61078  4747.62659  4459.24316  5869.164345 1875.916889 2159.01013
#>   4   9470.54318  7794.53480  2568.94792  1602.021667 2749.649954 1144.57610
#>   5   7034.22155  3045.46354  3531.98314   623.314401  680.467626 1823.46459
#>   6   7441.14600  2072.00281  1486.74753   758.344935  281.333204  441.15928
#>   7   9780.34040  2334.64197  1199.77277   354.566759  303.267985  161.22757
#>   8   7148.65994  3915.82570  1390.28619   257.572692  150.981893  177.06946
#>   9   6068.02372  3687.52687  2412.80663   260.709092   97.395002   74.04711
#>   10  3148.51937  2332.77259  1787.69447   249.364473   99.552433   45.02597
#>   11  2488.61840  1303.09131  1304.93718   327.502105   89.785333   64.40570
#>   12  2066.39968  1367.39449   863.22890   236.935012   81.668774   49.60155
#>   13   956.18509  1177.98139   906.23571   300.000830   79.430305   43.09592
#>   14   567.39685   555.54305   764.04790   278.739668  118.141871   29.41322
#>   15   252.43513   326.26061   321.67386   236.923503   91.854318   42.16570
#>   16    89.52572   119.69352   197.96640   149.173685   97.552802   47.80257
#>   17    44.85155    40.89398    73.84794   109.215246   72.947584   53.06030
#>   18    69.15473    18.97804    25.80973    36.901277   57.197741   40.12269
#>   19    80.30476    36.82538    13.47231    13.540096   20.199848   34.69269
#>   20    67.98127    40.15302    25.20197     8.486403    8.084862   14.34460
#>     year
#> age          13        14        15         16        17         18         19
#>   1   704.45154 183.59560  93.19967  44.622958 36.803631 45.2033291 48.7803830
#>   2   918.50722 279.33802  86.07887  39.219480 30.531158 25.1265659 24.5313246
#>   3   387.52477 510.50982 161.06141  40.993772 28.156996 18.5050363 11.2690921
#>   4  1601.28945 209.19448 313.10004  52.329722 26.349144 17.4370098  7.2414763
#>   5   819.19228 927.41026 126.89242 102.279020 35.631614 18.3392628  6.7000625
#>   6  1326.31401 528.97450 510.37882  38.595538 66.898186 19.2179897  6.4213564
#>   7   288.27101 751.38692 223.47301  71.510402 21.515626 39.2533776 10.3128848
#>   8   110.79046 189.81059 410.17377  72.789187 41.365149 13.7744035 23.4199146
#>   9   127.61409  69.61757  86.91956 129.119472 36.019263 23.9439747  7.0462908
#>   10   48.13158  79.83661  32.14798  25.496642 61.474942 22.3736578 13.2252178
#>   11   32.64654  35.85112  48.31365  14.239147 10.272557 37.8690191 11.6138525
#>   12   44.78419  25.72651  24.36239  23.502284  5.710781  4.9866536 10.0236083
#>   13   34.51223  33.02502  14.93436  11.630542 10.821759  2.2825175  1.4567598
#>   14   27.37098  22.85826  17.16039   5.310134  4.603569  4.0542017  0.7557808
#>   15   18.13389  19.09838  14.83024   6.908832  2.114113  1.9616338  1.3843115
#>   16   28.27651  14.12167  15.02472   9.530695  3.938392  0.8259953  0.2858984
#>   17   31.66167  19.61584  10.50650   8.527891  5.673556  1.3631462  0.1065718
#>   18   33.77332  20.37344  13.21457   5.050784  4.974148  2.2061207  0.2046757
#>   19   24.94265  23.09938  14.59216   7.770809  3.189492  2.4994230  0.5207006
#>   20   21.27148  16.76433  14.86556   7.596105  4.446235  1.4369881  0.6527688
#>     year
#> age           20
#>   1  47.87158633
#>   2  26.82819447
#>   3  13.94145243
#>   4   6.75263201
#>   5   4.85780020
#>   6   4.23345976
#>   7   4.40026507
#>   8   7.35924680
#>   9  16.07145407
#>   10  4.94999530
#>   11  8.74539756
#>   12  5.14216616
#>   13  3.86027127
#>   14  0.65698847
#>   15  0.40070316
#>   16  0.62298170
#>   17  0.11214595
#>   18  0.02951991
#>   19  0.04293635
#>   20  0.11822563
#> 
#> $N_at_length
#>       year
#> length            1            2            3            4            5
#>    1   5.268574e-58 3.921196e-58 2.880677e-58 2.177399e-58 3.451959e-58
#>    4   6.372294e-18 4.742652e-18 3.484153e-18 2.633545e-18 4.175115e-18
#>    7   4.662522e-04 3.470134e-04 2.549308e-04 1.926929e-04 3.054875e-04
#>    10  1.946379e+02 1.448614e+02 1.064213e+02 8.044003e+01 1.275263e+02
#>    13  2.329498e+04 1.733755e+04 1.273690e+04 9.627362e+03 1.526283e+04
#>    16  5.347492e+04 3.980194e+04 2.924051e+04 2.210056e+04 3.503415e+04
#>    19  1.080497e+04 8.374231e+03 6.191700e+03 4.518063e+03 6.761057e+03
#>    22  1.482260e+04 1.475791e+04 1.128745e+04 6.716320e+03 6.144733e+03
#>    25  3.071038e+04 3.070991e+04 2.358087e+04 1.400308e+04 1.261749e+04
#>    28  2.150975e+04 2.150975e+04 1.743197e+04 1.056435e+04 9.000026e+03
#>    31  1.629981e+04 1.629981e+04 1.603273e+04 1.036536e+04 7.347147e+03
#>    34  1.939538e+04 1.939538e+04 2.034700e+04 1.361805e+04 9.182900e+03
#>    37  1.800713e+04 1.800713e+04 1.877861e+04 1.332563e+04 9.244157e+03
#>    40  1.602849e+04 1.602849e+04 1.636696e+04 1.267593e+04 9.396880e+03
#>    43  1.546067e+04 1.546067e+04 1.554657e+04 1.253192e+04 1.013248e+04
#>    46  1.458824e+04 1.458824e+04 1.454336e+04 1.165008e+04 1.048856e+04
#>    49  1.345708e+04 1.345708e+04 1.331842e+04 1.052282e+04 1.044681e+04
#>    52  1.235276e+04 1.235276e+04 1.214364e+04 9.574909e+03 1.004012e+04
#>    55  1.124011e+04 1.124011e+04 1.099236e+04 8.688882e+03 9.302844e+03
#>    58  1.015800e+04 1.015800e+04 9.906907e+03 7.785325e+03 8.402267e+03
#>    61  9.149121e+03 9.149121e+03 8.919818e+03 6.902180e+03 7.461791e+03
#>    64  8.205543e+03 8.205543e+03 8.005792e+03 6.089463e+03 6.539336e+03
#>    67  7.305433e+03 7.305433e+03 7.131731e+03 5.356657e+03 5.674767e+03
#>    70  6.431115e+03 6.431115e+03 6.279211e+03 4.679410e+03 4.888976e+03
#>    73  5.573256e+03 5.573256e+03 5.442213e+03 4.032090e+03 4.176222e+03
#>    76  4.734821e+03 4.734821e+03 4.623905e+03 3.407416e+03 3.517965e+03
#>    79  3.931256e+03 3.931256e+03 3.836264e+03 2.814657e+03 2.902418e+03
#>    82  3.185031e+03 3.185031e+03 3.098645e+03 2.269494e+03 2.332392e+03
#>    85  2.517705e+03 2.517705e+03 2.432926e+03 1.786053e+03 1.820506e+03
#>    88  1.943628e+03 1.943628e+03 1.856920e+03 1.373079e+03 1.379990e+03
#>    91  1.467369e+03 1.467369e+03 1.379489e+03 1.032826e+03 1.017927e+03
#>    94  1.084672e+03 1.084672e+03 9.993842e+02 7.615870e+02 7.330854e+02
#>    97  7.854079e+02 7.854079e+02 7.073668e+02 5.513715e+02 5.173772e+02
#>    100 5.568185e+02 5.568185e+02 4.897774e+02 3.921254e+02 3.589469e+02
#>    103 3.859624e+02 3.859624e+02 3.318507e+02 2.737093e+02 2.452131e+02
#>    106 2.610526e+02 2.610526e+02 2.199023e+02 1.871278e+02 1.649125e+02
#>    109 1.719222e+02 1.719222e+02 1.423394e+02 1.249601e+02 1.089769e+02
#>    112 1.100321e+02 1.100321e+02 8.985967e+01 8.127585e+01 7.055266e+01
#>    115 6.833663e+01 6.833663e+01 5.524637e+01 5.136511e+01 4.460775e+01
#>    118 4.114746e+01 4.114746e+01 3.303883e+01 3.148853e+01 2.746698e+01
#>    121 2.401262e+01 2.401262e+01 1.920408e+01 1.870695e+01 1.643680e+01
#>    124 1.358340e+01 1.358340e+01 1.084606e+01 1.076730e+01 9.547491e+00
#>    127 7.452246e+00 7.452246e+00 5.952534e+00 6.006099e+00 5.380416e+00
#>    130 3.968652e+00 3.968652e+00 3.175972e+00 3.249159e+00 2.942080e+00
#>    133 2.053688e+00 2.053688e+00 1.648569e+00 1.706397e+00 1.561940e+00
#>    136 1.033905e+00 1.033905e+00 8.332779e-01 8.710443e-01 8.058342e-01
#>    139 5.070324e-01 5.070324e-01 4.105635e-01 4.327343e-01 4.044747e-01
#>    142 2.425329e-01 2.425329e-01 1.974105e-01 2.095158e-01 1.977648e-01
#>    145 1.133077e-01 1.133077e-01 9.274078e-02 9.899796e-02 9.431792e-02
#>    148 5.176896e-02 5.176896e-02 4.261863e-02 4.571338e-02 4.393504e-02
#>    151 2.316083e-02 2.316083e-02 1.918099e-02 2.065605e-02 2.001606e-02
#>    154 1.015895e-02 1.015895e-02 8.464282e-03 9.145291e-03 8.930235e-03
#>    157 4.373897e-03 4.373897e-03 3.666464e-03 3.972197e-03 3.906704e-03
#>    160 1.850566e-03 1.850566e-03 1.560688e-03 1.694568e-03 1.677821e-03
#>    163 7.702394e-04 7.702394e-04 6.535073e-04 7.108350e-04 7.082193e-04
#>    166 3.157016e-04 3.157016e-04 2.694535e-04 2.935091e-04 2.941385e-04
#>    169 1.275496e-04 1.275496e-04 1.095039e-04 1.194136e-04 1.203226e-04
#>    172 5.084314e-05 5.084314e-05 4.390160e-05 4.791568e-05 4.852647e-05
#>    175 2.001304e-05 2.001304e-05 1.737835e-05 1.897938e-05 1.931289e-05
#>    178 7.785335e-06 7.785335e-06 6.797773e-06 7.427353e-06 7.591557e-06
#>    181 2.995445e-06 2.995445e-06 2.629593e-06 2.873949e-06 2.949752e-06
#>    184 1.140727e-06 1.140727e-06 1.006675e-06 1.100381e-06 1.133826e-06
#>    187 4.302676e-07 4.302676e-07 3.816529e-07 4.171893e-07 4.314494e-07
#>    190 1.608470e-07 1.608470e-07 1.433860e-07 1.567251e-07 1.626420e-07
#>    193 5.963046e-08 5.963046e-08 5.341549e-08 5.837530e-08 6.077609e-08
#>    196 2.193648e-08 2.193648e-08 1.974305e-08 2.157105e-08 2.252696e-08
#>    199 8.011665e-09 8.011665e-09 7.243693e-09 7.912065e-09 8.286532e-09
#>    202 2.906606e-09 2.906606e-09 2.639720e-09 2.882249e-09 3.026900e-09
#>    205 1.047778e-09 1.047778e-09 9.557092e-10 1.043161e-09 1.098349e-09
#>    208 3.756261e-10 3.756261e-10 3.440616e-10 3.753724e-10 3.961932e-10
#>    211 1.340292e-10 1.340292e-10 1.232630e-10 1.343820e-10 1.421558e-10
#>    214 4.755508e-11 4.755508e-11 4.390572e-11 4.785784e-11 5.072946e-11
#>    217 1.679931e-11 1.679931e-11 1.557040e-11 1.695259e-11 1.800315e-11
#>    220 5.914882e-12 5.914882e-12 5.500767e-12 5.992358e-12 6.379215e-12
#>    223 2.062201e-12 2.062201e-12 1.927496e-12 2.100881e-12 2.246874e-12
#>    226 7.174666e-13 7.174666e-13 6.729369e-13 7.315688e-13 7.821147e-13
#>    229 2.235573e-13 2.235573e-13 2.159135e-13 2.339280e-13 2.540762e-13
#>    232 1.056938e-13 1.056938e-13 9.530524e-14 1.048977e-13 1.107712e-13
#>    235 3.148991e-14 3.148991e-14 2.952859e-14 3.273428e-14 3.552546e-14
#>    238 7.840535e-15 7.840535e-15 8.793019e-15 9.080246e-15 1.032201e-14
#>       year
#> length            6            7            8            9           10
#>    1   2.414938e-58 1.481179e-58 1.396794e-58 6.593812e-59 7.364714e-59
#>    4   2.920847e-18 1.791473e-18 1.689411e-18 7.975159e-19 8.907557e-19
#>    7   2.137144e-04 1.310797e-04 1.236119e-04 5.835316e-05 6.517539e-05
#>    10  8.921549e+01 5.471947e+01 5.160202e+01 2.435964e+01 2.720759e+01
#>    13  1.067764e+04 6.549029e+03 6.175921e+03 2.915452e+03 3.256306e+03
#>    16  2.451296e+04 1.503255e+04 1.417557e+04 6.693058e+03 7.474293e+03
#>    19  5.185529e+03 2.897104e+03 2.661772e+03 1.412561e+03 1.417166e+03
#>    22  9.402810e+03 2.593141e+03 1.656849e+03 2.530138e+03 1.027665e+03
#>    25  1.951578e+04 5.368216e+03 3.346344e+03 5.242743e+03 2.103877e+03
#>    28  1.299950e+04 4.348628e+03 2.287925e+03 3.404942e+03 1.610510e+03
#>    31  7.776660e+03 5.097871e+03 1.575939e+03 1.750950e+03 1.633844e+03
#>    34  8.247771e+03 6.768012e+03 1.917275e+03 1.666446e+03 2.054744e+03
#>    37  7.497658e+03 5.829641e+03 2.173604e+03 1.429370e+03 1.624151e+03
#>    40  6.658787e+03 4.397390e+03 2.471669e+03 1.175830e+03 9.853575e+02
#>    43  6.732822e+03 3.768388e+03 2.523583e+03 1.160043e+03 6.436194e+02
#>    46  7.068006e+03 3.466353e+03 2.127008e+03 1.220237e+03 4.696412e+02
#>    49  7.500851e+03 3.355758e+03 1.647458e+03 1.221038e+03 3.689350e+02
#>    52  7.898339e+03 3.468925e+03 1.349704e+03 1.117458e+03 3.212728e+02
#>    55  8.036927e+03 3.731238e+03 1.248499e+03 9.635207e+02 2.959402e+02
#>    58  7.819458e+03 4.019073e+03 1.298821e+03 8.493525e+02 2.688635e+02
#>    61  7.289261e+03 4.203447e+03 1.450649e+03 8.201580e+02 2.369891e+02
#>    64  6.562681e+03 4.200735e+03 1.636161e+03 8.678757e+02 2.086294e+02
#>    67  5.756719e+03 4.001860e+03 1.780522e+03 9.560130e+02 1.909112e+02
#>    70  4.952325e+03 3.652312e+03 1.830780e+03 1.040778e+03 1.853420e+02
#>    73  4.193173e+03 3.214914e+03 1.774167e+03 1.087468e+03 1.893755e+02
#>    76  3.495842e+03 2.745059e+03 1.632423e+03 1.080578e+03 1.988716e+02
#>    79  2.861974e+03 2.281827e+03 1.441132e+03 1.023212e+03 2.094189e+02
#>    82  2.290147e+03 1.848602e+03 1.231256e+03 9.286443e+02 2.168753e+02
#>    85  1.782849e+03 1.457969e+03 1.022154e+03 8.116469e+02 2.178173e+02
#>    88  1.346237e+03 1.116862e+03 8.240407e+02 6.843563e+02 2.101175e+02
#>    91  9.855470e+02 8.292558e+02 6.429971e+02 5.561307e+02 1.934370e+02
#>    94  7.008750e+02 5.962860e+02 4.838403e+02 4.345665e+02 1.693007e+02
#>    97  4.860012e+02 4.155825e+02 3.502296e+02 3.258054e+02 1.406151e+02
#>    100 3.300607e+02 2.813659e+02 2.436936e+02 2.340541e+02 1.107995e+02
#>    103 2.203968e+02 1.856137e+02 1.631359e+02 1.610884e+02 8.289663e+01
#>    106 1.450395e+02 1.196695e+02 1.052772e+02 1.063121e+02 5.898171e+01
#>    109 9.409192e+01 7.557902e+01 6.566483e+01 6.738732e+01 3.999201e+01
#>    112 6.007560e+01 4.681587e+01 3.969655e+01 4.111124e+01 2.590093e+01
#>    115 3.764432e+01 2.844366e+01 2.332007e+01 2.419563e+01 1.606233e+01
#>    118 2.307705e+01 1.693601e+01 1.334240e+01 1.376997e+01 9.561576e+00
#>    121 1.380087e+01 9.869327e+00 7.447778e+00 7.595250e+00 5.476943e+00
#>    124 8.034350e+00 5.620743e+00 4.061272e+00 4.069031e+00 3.025950e+00
#>    127 4.547166e+00 3.124661e+00 2.165302e+00 2.121413e+00 1.616155e+00
#>    130 2.500539e+00 1.694159e+00 1.129397e+00 1.078212e+00 8.362514e-01
#>    133 1.336151e+00 8.955187e-01 5.765290e-01 5.350620e-01 4.200550e-01
#>    136 6.941214e-01 4.614970e-01 2.881272e-01 2.596133e-01 2.052214e-01
#>    139 3.508690e-01 2.319479e-01 1.410199e-01 1.233134e-01 9.769389e-02
#>    142 1.727622e-01 1.137651e-01 6.762029e-02 5.740360e-02 4.539135e-02
#>    145 8.295980e-02 5.449788e-02 3.178149e-02 2.621535e-02 2.061702e-02
#>    148 3.890014e-02 2.552192e-02 1.464903e-02 1.175625e-02 9.167854e-03
#>    151 1.783439e-02 1.169655e-02 6.625981e-03 5.181566e-03 3.996680e-03
#>    154 8.004686e-03 5.251439e-03 2.943040e-03 2.246443e-03 1.710341e-03
#>    157 3.521701e-03 2.312314e-03 1.284592e-03 9.587780e-04 7.193553e-04
#>    160 1.520574e-03 9.996120e-04 5.514307e-04 4.031461e-04 2.976962e-04
#>    163 6.450794e-04 4.247091e-04 2.329778e-04 1.671285e-04 1.213480e-04
#>    166 2.691839e-04 1.775303e-04 9.695727e-05 6.835879e-05 4.876997e-05
#>    169 1.106042e-04 7.308069e-05 3.977698e-05 2.760552e-05 1.934355e-05
#>    172 4.479323e-05 2.965466e-05 1.609929e-05 1.101409e-05 7.578139e-06
#>    175 1.789697e-05 1.187230e-05 6.433334e-06 4.344458e-06 2.934851e-06
#>    178 7.060869e-06 4.693544e-06 2.540042e-06 1.695242e-06 1.124449e-06
#>    181 2.753032e-06 1.833767e-06 9.915886e-07 6.547897e-07 4.265168e-07
#>    184 1.061648e-06 7.085958e-07 3.830066e-07 2.504960e-07 1.602760e-07
#>    187 4.052178e-07 2.710076e-07 1.464712e-07 9.496768e-08 5.970541e-08
#>    190 1.531927e-07 1.026577e-07 5.549367e-08 3.569955e-08 2.206129e-08
#>    193 5.740006e-08 3.853958e-08 2.084184e-08 1.331322e-08 8.090256e-09
#>    196 2.132992e-08 1.434856e-08 7.764217e-09 4.928048e-09 2.946093e-09
#>    199 7.865084e-09 5.300546e-09 2.870305e-09 1.811353e-09 1.065826e-09
#>    202 2.879487e-09 1.944066e-09 1.053650e-09 6.614995e-10 3.832685e-10
#>    205 1.047102e-09 7.081508e-10 3.841217e-10 2.399779e-10 1.369997e-10
#>    208 3.784737e-10 2.563934e-10 1.392251e-10 8.662263e-11 4.874175e-11
#>    211 1.360612e-10 9.234405e-11 5.022552e-11 3.116872e-11 1.728316e-11
#>    214 4.863396e-11 3.304950e-11 1.798613e-11 1.111367e-11 6.089036e-12
#>    217 1.729311e-11 1.178039e-11 6.431382e-12 3.966297e-12 2.145128e-12
#>    220 6.135975e-12 4.179933e-12 2.276451e-12 1.396670e-12 7.455674e-13
#>    223 2.168637e-12 1.478728e-12 8.040479e-13 4.869023e-13 2.549892e-13
#>    226 7.548152e-13 5.151083e-13 2.820775e-13 1.720384e-13 9.068610e-14
#>    229 2.483039e-13 1.716466e-13 9.424472e-14 5.641403e-14 2.612694e-14
#>    232 1.054547e-13 7.079358e-14 3.703115e-14 2.264479e-14 1.275645e-14
#>    235 3.492259e-14 2.401049e-14 1.300420e-14 7.091688e-15 3.387613e-15
#>    238 1.042913e-14 7.547437e-15 4.457881e-15 2.797981e-15 9.421801e-16
#>       year
#> length           11           12           13           14           15
#>    1   6.937047e-60 8.918004e-60 4.280118e-60 1.115493e-60 5.662641e-61
#>    4   8.390298e-20 1.078625e-19 5.176766e-20 1.349179e-20 6.848915e-21
#>    7   6.139067e-06 7.892152e-06 3.787770e-06 9.871762e-07 5.011258e-07
#>    10  2.562766e+00 3.294594e+00 1.581212e+00 4.120986e-01 2.091959e-01
#>    13  3.067214e+02 3.943092e+02 1.892453e+02 4.932150e+01 2.503735e+01
#>    16  7.045524e+02 9.050670e+02 4.344760e+02 1.132399e+02 5.747635e+01
#>    19  2.000213e+02 1.712850e+02 9.446861e+01 2.537119e+01 1.183262e+01
#>    22  8.422382e+02 1.209865e+02 1.953592e+02 5.936305e+01 1.840010e+01
#>    25  1.762273e+03 2.551354e+02 4.058467e+02 1.255656e+02 3.871507e+01
#>    28  1.167433e+03 2.820716e+02 2.663523e+02 1.057340e+02 3.286092e+01
#>    31  6.822004e+02 5.316042e+02 1.509921e+02 1.344751e+02 4.332166e+01
#>    34  7.525558e+02 7.680075e+02 1.927461e+02 1.806552e+02 6.560693e+01
#>    37  8.136038e+02 6.774307e+02 3.060712e+02 1.548771e+02 8.014819e+01
#>    40  8.788845e+02 5.480258e+02 4.574393e+02 1.303098e+02 9.701635e+01
#>    43  8.525181e+02 5.437672e+02 5.302067e+02 1.648111e+02 1.046891e+02
#>    46  6.593258e+02 5.825304e+02 5.017893e+02 2.370014e+02 1.016270e+02
#>    49  4.372638e+02 5.761834e+02 4.631756e+02 2.975881e+02 1.090721e+02
#>    52  2.872096e+02 4.913853e+02 4.499199e+02 3.194794e+02 1.329402e+02
#>    55  2.058753e+02 3.626365e+02 4.279638e+02 3.131865e+02 1.579926e+02
#>    58  1.635300e+02 2.455281e+02 3.696773e+02 2.951171e+02 1.703939e+02
#>    61  1.388755e+02 1.655544e+02 2.850045e+02 2.668136e+02 1.687451e+02
#>    64  1.205534e+02 1.184268e+02 2.014821e+02 2.256899e+02 1.573364e+02
#>    67  1.047390e+02 9.114461e+01 1.376305e+02 1.767226e+02 1.389935e+02
#>    70  9.183532e+01 7.396437e+01 9.608019e+01 1.298713e+02 1.156198e+02
#>    73  8.306721e+01 6.218045e+01 7.097107e+01 9.252640e+01 9.050041e+01
#>    76  7.873454e+01 5.411859e+01 5.577688e+01 6.652248e+01 6.762046e+01
#>    79  7.806036e+01 4.909016e+01 4.627166e+01 4.990100e+01 4.962268e+01
#>    82  7.959643e+01 4.640123e+01 4.024024e+01 3.966420e+01 3.701475e+01
#>    85  8.158861e+01 4.517619e+01 3.644474e+01 3.331339e+01 2.883041e+01
#>    88  8.229216e+01 4.447334e+01 3.396841e+01 2.915698e+01 2.364351e+01
#>    91  8.033755e+01 4.342574e+01 3.201416e+01 2.610922e+01 2.019808e+01
#>    94  7.507480e+01 4.137578e+01 2.993595e+01 2.347099e+01 1.760462e+01
#>    97  6.672118e+01 3.799951e+01 2.732548e+01 2.082338e+01 1.532169e+01
#>    100 5.621968e+01 3.336566e+01 2.406160e+01 1.798761e+01 1.308426e+01
#>    103 4.487883e+01 2.787892e+01 2.028526e+01 1.498463e+01 1.082911e+01
#>    106 3.396615e+01 2.212193e+01 1.630557e+01 1.196660e+01 8.619044e+00
#>    109 2.441297e+01 1.666744e+01 1.247563e+01 9.132074e+00 6.568798e+00
#>    112 1.669967e+01 1.193645e+01 9.085710e+00 6.651852e+00 4.784971e+00
#>    115 1.089852e+01 8.140147e+00 6.305133e+00 4.625801e+00 3.330870e+00
#>    118 6.803098e+00 5.298049e+00 4.176636e+00 3.074577e+00 2.217651e+00
#>    121 4.072271e+00 3.299083e+00 2.646541e+00 1.956408e+00 1.414277e+00
#>    124 2.343408e+00 1.970430e+00 1.607883e+00 1.194173e+00 8.655425e-01
#>    127 1.299551e+00 1.131639e+00 9.388290e-01 7.007061e-01 5.093818e-01
#>    130 6.961153e-01 6.264587e-01 5.280817e-01 3.961112e-01 2.888813e-01
#>    133 3.609679e-01 3.350645e-01 2.868120e-01 2.162009e-01 1.582111e-01
#>    136 1.815772e-01 1.735319e-01 1.507420e-01 1.141776e-01 8.384892e-02
#>    139 8.877954e-02 8.720773e-02 7.682904e-02 5.846236e-02 4.308946e-02
#>    142 4.226943e-02 4.260997e-02 3.804817e-02 2.907989e-02 2.151249e-02
#>    145 1.963160e-02 2.027922e-02 1.834311e-02 1.407781e-02 1.045317e-02
#>    148 8.908564e-03 9.417314e-03 8.623958e-03 6.644524e-03 4.952126e-03
#>    151 3.955897e-03 4.274080e-03 3.960511e-03 3.062630e-03 2.291019e-03
#>    154 1.721425e-03 1.898700e-03 1.779416e-03 1.380701e-03 1.036631e-03
#>    157 7.350516e-04 8.267675e-04 7.832726e-04 6.096918e-04 4.594127e-04
#>    160 3.083745e-04 3.533455e-04 3.382555e-04 2.640693e-04 1.996881e-04
#>    163 1.272563e-04 1.484030e-04 1.434902e-04 1.123251e-04 8.523589e-05
#>    166 5.171272e-05 6.132197e-05 5.986311e-05 4.697920e-05 3.577091e-05
#>    169 2.071473e-05 2.495691e-05 2.458874e-05 1.934152e-05 1.477608e-05
#>    172 8.187351e-06 1.001399e-05 9.954130e-06 7.846700e-06 6.014005e-06
#>    175 3.195819e-06 3.965321e-06 3.975407e-06 3.139940e-06 2.414180e-06
#>    178 1.233001e-06 1.550925e-06 1.567710e-06 1.240490e-06 9.567006e-07
#>    181 4.705780e-07 5.996624e-07 6.109782e-07 4.842585e-07 3.745912e-07
#>    184 1.777914e-07 2.293857e-07 2.355092e-07 1.869496e-07 1.450326e-07
#>    187 6.654329e-08 8.687368e-08 8.985410e-08 7.142741e-08 5.556873e-08
#>    190 2.468868e-08 3.259657e-08 3.395634e-08 2.702759e-08 2.108442e-08
#>    193 9.085700e-09 1.212545e-08 1.271871e-08 1.013543e-08 7.927757e-09
#>    196 3.318492e-09 4.474372e-09 4.724706e-09 3.769148e-09 2.955770e-09
#>    199 1.203589e-09 1.638783e-09 1.741680e-09 1.390804e-09 1.093402e-09
#>    202 4.337094e-10 5.960730e-10 6.374735e-10 5.095080e-10 4.015303e-10
#>    205 1.553272e-10 2.154125e-10 2.317769e-10 1.854030e-10 1.464566e-10
#>    208 5.533013e-11 7.738812e-11 8.375711e-11 6.704897e-11 5.308547e-11
#>    211 1.961839e-11 2.765124e-11 3.009704e-11 2.410990e-11 1.913143e-11
#>    214 6.922816e-12 9.834405e-12 1.076129e-11 8.625184e-12 6.858788e-12
#>    217 2.429703e-12 3.475270e-12 3.823753e-12 3.067181e-12 2.444471e-12
#>    220 8.520612e-13 1.227850e-12 1.357717e-12 1.089102e-12 8.694121e-13
#>    223 2.937214e-13 4.308346e-13 4.792418e-13 3.852462e-13 3.078818e-13
#>    226 1.016312e-13 1.496211e-13 1.668898e-13 1.342055e-13 1.074682e-13
#>    229 3.057996e-14 4.693486e-14 5.497370e-14 4.416074e-14 3.600427e-14
#>    232 1.622109e-14 2.171326e-14 2.345763e-14 1.855829e-14 1.460967e-14
#>    235 4.037834e-15 7.036803e-15 7.492408e-15 6.286975e-15 4.920872e-15
#>    238 8.975999e-16 1.592570e-15 2.361609e-15 1.861214e-15 1.650408e-15
#>       year
#> length           16           17           18           19           20
#>    1   2.711209e-61 2.236121e-61 2.746471e-61 2.963807e-61 2.908590e-61
#>    4   3.279184e-21 2.704569e-21 3.321833e-21 3.584698e-21 3.517914e-21
#>    7   2.399334e-07 1.978897e-07 2.430540e-07 2.622875e-07 2.574010e-07
#>    10  1.001607e-01 8.260942e-02 1.014634e-01 1.094924e-01 1.074525e-01
#>    13  1.198760e+01 9.887002e+00 1.214351e+01 1.310446e+01 1.286032e+01
#>    16  2.751874e+01 2.269633e+01 2.787448e+01 3.007988e+01 2.951989e+01
#>    19  5.627859e+00 4.607574e+00 5.426753e+00 5.807655e+00 5.751185e+00
#>    22  8.386548e+00 6.534318e+00 5.420653e+00 5.305113e+00 5.786022e+00
#>    25  1.746283e+01 1.357383e+01 1.114588e+01 1.084487e+01 1.186897e+01
#>    28  1.291296e+01 9.812912e+00 7.780577e+00 7.165648e+00 7.938420e+00
#>    31  1.196620e+01 8.397337e+00 5.826876e+00 4.095408e+00 4.843432e+00
#>    34  1.588249e+01 1.058175e+01 6.990965e+00 4.199511e+00 5.092361e+00
#>    37  1.720754e+01 1.039639e+01 6.822110e+00 3.695840e+00 4.265771e+00
#>    40  2.003540e+01 1.038490e+01 6.670779e+00 3.089815e+00 3.170980e+00
#>    43  2.545754e+01 1.183385e+01 7.112505e+00 2.938251e+00 2.672143e+00
#>    46  3.079859e+01 1.417445e+01 7.583951e+00 2.923120e+00 2.398774e+00
#>    49  3.352024e+01 1.733587e+01 8.261698e+00 3.012013e+00 2.223996e+00
#>    52  3.291269e+01 2.044749e+01 9.386367e+00 3.312901e+00 2.177201e+00
#>    55  3.152948e+01 2.217583e+01 1.092043e+01 3.942021e+00 2.282724e+00
#>    58  3.232629e+01 2.221713e+01 1.249704e+01 4.949891e+00 2.600707e+00
#>    61  3.574792e+01 2.159459e+01 1.362114e+01 6.179412e+00 3.177412e+00
#>    64  4.011161e+01 2.148725e+01 1.414361e+01 7.300130e+00 3.960047e+00
#>    67  4.319765e+01 2.212564e+01 1.434844e+01 8.023909e+00 4.772594e+00
#>    70  4.339875e+01 2.281727e+01 1.453626e+01 8.268175e+00 5.390392e+00
#>    73  4.034308e+01 2.267697e+01 1.466609e+01 8.116380e+00 5.655692e+00
#>    76  3.490697e+01 2.125442e+01 1.441670e+01 7.673644e+00 5.536073e+00
#>    79  2.859385e+01 1.871004e+01 1.350241e+01 6.991797e+00 5.098381e+00
#>    82  2.273336e+01 1.560609e+01 1.190688e+01 6.101292e+00 4.449315e+00
#>    85  1.802802e+01 1.255577e+01 9.882122e+00 5.066399e+00 3.694330e+00
#>    88  1.456713e+01 9.963470e+00 7.785512e+00 3.993677e+00 2.923121e+00
#>    91  1.208592e+01 7.954436e+00 5.908256e+00 2.996466e+00 2.205831e+00
#>    94  1.022473e+01 6.450513e+00 4.393432e+00 2.155118e+00 1.589655e+00
#>    97  8.684192e+00 5.292748e+00 3.249032e+00 1.500586e+00 1.096789e+00
#>    100 7.281561e+00 4.336435e+00 2.407908e+00 1.022455e+00 7.270722e-01
#>    103 5.946164e+00 3.493733e+00 1.785871e+00 6.880268e-01 4.650368e-01
#>    106 4.685465e+00 2.733533e+00 1.314754e+00 4.597307e-01 2.882187e-01
#>    109 3.543349e+00 2.060066e+00 9.508134e-01 3.052480e-01 1.737758e-01
#>    112 2.565014e+00 1.488824e+00 6.693195e-01 2.007398e-01 1.022540e-01
#>    115 1.776169e+00 1.030059e+00 4.557145e-01 1.300452e-01 5.885646e-02
#>    118 1.177167e+00 6.822438e-01 2.990226e-01 8.252382e-02 3.318491e-02
#>    121 7.476911e-01 4.330415e-01 1.888098e-01 5.105763e-02 1.834015e-02
#>    124 4.559289e-01 2.638419e-01 1.147209e-01 3.070001e-02 9.936563e-03
#>    127 2.674387e-01 1.546069e-01 6.713391e-02 1.790696e-02 5.276780e-03
#>    130 1.512192e-01 8.731551e-02 3.789114e-02 1.012540e-02 2.745936e-03
#>    133 8.259508e-02 4.762692e-02 2.066184e-02 5.550988e-03 1.399943e-03
#>    136 4.366754e-02 2.514315e-02 1.090514e-02 2.952574e-03 6.991898e-04
#>    139 2.239151e-02 1.287274e-02 5.581306e-03 1.525328e-03 3.421228e-04
#>    142 1.115715e-02 6.403928e-03 2.775132e-03 7.663187e-04 1.640516e-04
#>    145 5.411940e-03 3.101297e-03 1.342924e-03 3.749201e-04 7.711949e-05
#>    148 2.559907e-03 1.464585e-03 6.335536e-04 1.788833e-04 3.555994e-05
#>    151 1.182677e-03 6.755676e-04 2.918680e-04 8.335298e-05 1.609313e-05
#>    154 5.344872e-04 3.048398e-04 1.315013e-04 3.798386e-05 7.153247e-06
#>    157 2.366224e-04 1.347557e-04 5.802884e-05 1.695080e-05 3.125145e-06
#>    160 1.027548e-04 5.843593e-05 2.511430e-05 7.417484e-06 1.342999e-06
#>    163 4.382491e-05 2.488960e-05 1.067377e-05 3.186650e-06 5.681458e-07
#>    166 1.837906e-05 1.042495e-05 4.460222e-06 1.345648e-06 2.367902e-07
#>    169 7.587312e-06 4.298615e-06 1.834534e-06 5.591512e-07 9.730286e-08
#>    172 3.086487e-06 1.746751e-06 7.435056e-07 2.288659e-07 3.945276e-08
#>    175 1.238438e-06 7.001696e-07 2.972087e-07 9.236662e-08 1.579585e-08
#>    178 4.905835e-07 2.771022e-07 1.172898e-07 3.679033e-08 6.249367e-09
#>    181 1.920223e-07 1.083706e-07 4.573596e-08 1.447491e-08 2.444893e-09
#>    184 7.432564e-08 4.191459e-08 1.763631e-08 5.630127e-09 9.464665e-10
#>    187 2.847092e-08 1.604454e-08 6.730425e-09 2.166585e-09 3.627886e-10
#>    190 1.080059e-08 6.082798e-09 2.543740e-09 8.254748e-10 1.377752e-10
#>    193 4.060368e-09 2.285499e-09 9.527762e-10 3.115995e-10 5.186892e-11
#>    196 1.513660e-09 8.515916e-10 3.538936e-10 1.166110e-10 1.937016e-11
#>    199 5.598738e-10 3.148523e-10 1.304290e-10 4.328970e-11 7.178372e-12
#>    202 2.055848e-10 1.155709e-10 4.772431e-11 1.595087e-11 2.641582e-12
#>    205 7.498128e-11 4.213749e-11 1.734530e-11 5.836669e-12 9.654567e-13
#>    208 2.717688e-11 1.526874e-11 6.265253e-12 2.122046e-12 3.507832e-13
#>    211 9.793577e-12 5.501050e-12 2.250388e-12 7.670174e-13 1.267976e-13
#>    214 3.511416e-12 1.971871e-12 8.040094e-13 2.756831e-13 4.557644e-14
#>    217 1.251221e-12 7.024555e-13 2.856013e-13 9.860330e-14 1.629675e-14
#>    220 4.449498e-13 2.499335e-13 1.013205e-13 3.510212e-14 5.796034e-15
#>    223 1.575670e-13 8.843435e-14 3.582626e-14 1.247726e-14 2.038210e-15
#>    226 5.518748e-14 3.093838e-14 1.242882e-14 4.367985e-15 7.190520e-16
#>    229 1.834841e-14 1.036039e-14 4.067037e-15 1.485983e-15 2.454815e-16
#>    232 7.346238e-15 4.222239e-15 1.757138e-15 5.731737e-16 9.156524e-17
#>    235 2.549407e-15 1.341367e-15 5.965671e-16 2.027532e-16 3.101826e-17
#>    238 8.433371e-16 4.936313e-16 1.595377e-16 7.247189e-17 1.312568e-17
#> 
#> $sim_length
#> function (age = NULL, length_age_key = FALSE) 
#> {
#>     pred_length <- Linf - (Linf - L0) * exp(-K * age)
#>     if (length_age_key) {
#>         breaks <- seq(0, ceiling(max(pred_length)) * 10, length_group)
#>         lak <- matrix(NA, ncol = length(pred_length), nrow = length(breaks) - 
#>             1, dimnames = list(length = group_lengths(breaks, 
#>             length_group)[-length(breaks)], age = age))
#>         for (i in seq_along(breaks)[-1]) {
#>             for (j in seq_along(pred_length)) {
#>                 lak[i - 1, j] <- stats::pnorm(log(breaks[i]), 
#>                   log(pred_length[j]), sd = log_sd) - stats::pnorm(log(breaks[i - 
#>                   1]), log(pred_length[j]), sd = log_sd)
#>             }
#>         }
#>         lak <- lak[rowSums(lak) > 0, ]
#>         if (plot) 
#>             graphics::image(x = as.numeric(colnames(lak)), y = as.numeric(rownames(lak)), 
#>                 z = t(lak), xlab = "Age", ylab = "Length", main = "P(Length | Age)", 
#>                 col = viridis::viridis(100))
#>         return(lak)
#>     }
#>     else {
#>         log_length <- stats::rnorm(length(age), log(pred_length), 
#>             sd = log_sd)
#>         length <- round(exp(log_length), digits)
#>         if (plot) 
#>             plot(age, length)
#>         return(length)
#>     }
#> }
#> <bytecode: 0x55d5ac817108>
#> <environment: 0x55d5a97dea78>
#> 

Z_fun <- sim_Z(log_mean = log(0.5), log_sd = 0.1, phi_age = 0.9, phi_year = 0.9, plot = TRUE)
Z_fun(years = 1:100, ages = 1:20)

#>     year
#> age          1         2         3         4         5         6         7
#>   1  0.8531611 0.9954385 1.3324898 1.4667208 1.7543929 1.2266068 0.9483955
#>   2  0.7169459 0.9674619 1.1737899 1.1999725 1.3666491 1.2869163 1.0740715
#>   3  0.6000222 0.8213243 0.9487519 0.8172446 1.0610970 1.0230193 0.8576112
#>   4  0.6317804 0.8822431 0.9910958 0.8555282 1.1780197 1.1307558 0.8591721
#>   5  0.5277715 0.6946487 0.9174367 0.6984040 0.9305839 0.8474290 0.5637508
#>   6  0.5080529 0.6294783 0.8885576 0.7873258 1.0715104 1.2630143 0.7150468
#>   7  0.6699715 0.7590614 1.1467582 1.1275642 1.7583643 1.6574218 0.8151064
#>   8  0.5965700 0.6365609 0.9961610 0.9339865 1.2507521 1.3014533 0.5886151
#>   9  0.3202357 0.3263688 0.5211629 0.6126456 0.9903322 1.1131722 0.5634974
#>   10 0.2316121 0.2374199 0.3392051 0.3984012 0.5823965 0.6451724 0.3408475
#>   11 0.2629228 0.2563715 0.3261218 0.3880843 0.5342689 0.6045947 0.3294936
#>   12 0.2724178 0.2738210 0.3600415 0.4031034 0.5993116 0.6821641 0.4085816
#>   13 0.3124062 0.2494148 0.3253687 0.3450623 0.4273914 0.4587850 0.3222722
#>   14 0.2451530 0.2253261 0.2747165 0.2839443 0.3567563 0.3487429 0.3214905
#>   15 0.3266872 0.2727115 0.2773981 0.2711850 0.3122402 0.2856701 0.2579532
#>   16 0.2666149 0.2146018 0.2236895 0.1919103 0.2418443 0.2157612 0.2322641
#>   17 0.2412426 0.1988434 0.2340616 0.2190072 0.2342677 0.2236210 0.2200339
#>   18 0.2048467 0.1789185 0.1956078 0.1903779 0.1867713 0.1830896 0.1743455
#>   19 0.1925990 0.1813908 0.1897599 0.1853908 0.1838902 0.2191963 0.2075311
#>   20 0.2884201 0.2680932 0.2791414 0.2631355 0.2792618 0.3311199 0.2401627
#>     year
#> age          8         9        10        11        12        13        14
#>   1  0.7507266 0.8878855 0.9760946 1.1534464 1.2846606 1.0889594 0.7900187
#>   2  0.9098309 1.0490808 1.0676011 1.1512473 1.2120784 1.0334289 0.7349163
#>   3  0.7901072 0.7987272 0.8538496 0.8325004 0.8685705 0.6825943 0.5496721
#>   4  0.8356838 0.7432752 0.7867249 0.7852706 0.9053986 0.8200864 0.6181774
#>   5  0.5190019 0.4720582 0.4594109 0.5152293 0.4738969 0.4105885 0.3057180
#>   6  0.7533585 0.5607698 0.5824705 0.6092838 0.5366823 0.4372850 0.3822732
#>   7  0.8750296 0.6736247 0.5951314 0.6815131 0.5988580 0.5574251 0.4943173
#>   8  0.6150163 0.5039012 0.3896989 0.4508873 0.4861735 0.4503507 0.3898964
#>   9  0.6078339 0.4672339 0.2921577 0.3418820 0.2953173 0.2825473 0.2745499
#>   10 0.3473505 0.2841317 0.1984847 0.2459122 0.2212457 0.2118424 0.2204291
#>   11 0.3056256 0.2319850 0.1644481 0.1974428 0.1612829 0.1548036 0.1824497
#>   12 0.3152150 0.2422610 0.1684372 0.1711759 0.1649108 0.1846488 0.2025918
#>   13 0.3154054 0.2334490 0.1636610 0.1684482 0.1939315 0.2506038 0.2998181
#>   14 0.2689404 0.2270800 0.1481041 0.1607415 0.2056601 0.2810780 0.2814239
#>   15 0.2468246 0.2522906 0.1636395 0.1896255 0.2299975 0.2408577 0.2244157
#>   16 0.2673624 0.3078312 0.2071048 0.2552188 0.3833077 0.3159795 0.3414513
#>   17 0.2545711 0.2657938 0.1682637 0.2063181 0.3239366 0.2875403 0.2714283
#>   18 0.1751669 0.1953284 0.1277484 0.1611375 0.2170983 0.2233785 0.2215503
#>   19 0.2147117 0.2618552 0.1708535 0.2312576 0.3128040 0.3545733 0.3231785
#>   20 0.2508586 0.2637840 0.1889275 0.2594810 0.3464791 0.3401831 0.3779987
#>     year
#> age         15        16        17        18        19        20        21
#>   1  0.7492586 0.6823658 0.7686306 0.8009456 0.9543403 0.8323231 0.7389052
#>   2  0.6882464 0.5871994 0.8053933 0.9404568 0.9743359 0.8644096 0.7907432
#>   3  0.4532850 0.4260935 0.5579476 0.6536254 0.7624701 0.6696137 0.7200175
#>   4  0.5150622 0.5897362 0.7629993 0.8047817 0.8558465 0.7109557 0.7339871
#>   5  0.2676667 0.3400876 0.4332721 0.4935433 0.6545549 0.5422948 0.6209355
#>   6  0.3211476 0.4256281 0.5014429 0.7447153 0.8510537 0.7387908 0.8321581
#>   7  0.4215481 0.4355554 0.5527366 0.6913584 0.8126534 0.6429011 0.5837727
#>   8  0.3593505 0.4191012 0.5282929 0.6627276 0.7803705 0.5063741 0.4814943
#>   9  0.2325983 0.2863205 0.4177729 0.5175746 0.5497221 0.3661567 0.3631161
#>   10 0.1932206 0.2358326 0.3441312 0.4216089 0.4909080 0.3644105 0.3935804
#>   11 0.1541284 0.2086634 0.2609343 0.3308043 0.3406169 0.2426694 0.2262912
#>   12 0.1674346 0.1779441 0.2397952 0.3567535 0.3958763 0.2665546 0.2363054
#>   13 0.2876462 0.3103060 0.4057705 0.5558907 0.6019815 0.3887841 0.2982409
#>   14 0.3002658 0.3240575 0.4369828 0.5509499 0.5748162 0.3969599 0.3249908
#>   15 0.2490804 0.2522687 0.2777248 0.3865354 0.4392508 0.3163146 0.3490303
#>   16 0.3015064 0.3535034 0.3354706 0.3967645 0.4567404 0.3095703 0.3383421
#>   17 0.2706586 0.2927508 0.2914128 0.2876746 0.3193254 0.2199774 0.2468722
#>   18 0.2081969 0.2900480 0.2527500 0.2348043 0.2264774 0.1687580 0.1954351
#>   19 0.3272572 0.4409483 0.3915654 0.3734934 0.4005848 0.3013630 0.4173058
#>   20 0.3857595 0.5688759 0.5217216 0.5403422 0.7100780 0.5512141 0.7309205
#>     year
#> age         22        23        24        25        26        27        28
#>   1  0.8058218 0.7860846 0.9513698 1.0408789 1.4753425 1.4215088 0.9937459
#>   2  0.8210756 0.7846007 0.9732683 1.0300824 1.3734886 1.1716834 0.8835622
#>   3  0.6790832 0.7818274 0.7601521 0.8910736 1.1377095 0.9178760 0.6838422
#>   4  0.7618608 0.7529371 0.7331431 0.8489965 0.8873222 0.7484567 0.5282544
#>   5  0.6988612 0.7768261 0.7800368 0.9713747 0.8947926 0.8318590 0.5957936
#>   6  0.9876443 1.1582394 1.2359027 1.4265506 1.1758722 0.9652253 0.7550956
#>   7  0.7167610 0.9187343 0.9456736 1.3014279 1.1186596 0.8580694 0.6593722
#>   8  0.6599781 0.7895606 0.8933051 1.2820756 1.0019859 0.6808152 0.5618350
#>   9  0.4834492 0.5497237 0.6115388 0.8832683 0.6865043 0.5667144 0.5495284
#>   10 0.4248575 0.4114981 0.4509775 0.6260111 0.5147946 0.4429186 0.3987513
#>   11 0.2717522 0.2891110 0.3577677 0.4753212 0.4832318 0.4621251 0.3564613
#>   12 0.3167695 0.3327262 0.3814160 0.4106918 0.3877094 0.4005674 0.3390076
#>   13 0.3841552 0.3490431 0.3348015 0.3822718 0.4221658 0.4178256 0.3393330
#>   14 0.4317739 0.4903939 0.4453129 0.4917083 0.5398327 0.5425597 0.3858469
#>   15 0.5255533 0.6423180 0.5415733 0.6226362 0.7380739 0.7170698 0.5785180
#>   16 0.4229794 0.6285415 0.6147854 0.7052031 0.7441761 0.7406146 0.5207453
#>   17 0.2639959 0.4087481 0.4843162 0.5337708 0.6456724 0.5742143 0.4537441
#>   18 0.2864658 0.3943004 0.4196006 0.4583166 0.5980829 0.5328836 0.3745152
#>   19 0.5702929 0.8129791 1.0275304 1.1341536 1.1783349 0.9804039 0.7063926
#>   20 0.8644834 0.8130836 0.9201820 0.9061831 0.8676627 0.7374027 0.6604657
#>     year
#> age         29        30        31        32        33        34        35
#>   1  1.3104610 1.1361963 0.7955484 0.8006986 0.6815739 0.8729638 1.1675829
#>   2  1.1266246 0.8944533 0.6352378 0.6445024 0.5511625 0.7959574 1.2016193
#>   3  0.9608072 0.9227591 0.7445076 0.6166659 0.4798207 0.6482217 0.9659876
#>   4  0.7702674 0.7991549 0.5716909 0.4702673 0.4276906 0.5856424 0.8673132
#>   5  0.8814804 0.8829067 0.7979082 0.7409886 0.7500659 0.8844051 1.1654946
#>   6  1.1455851 1.1545601 1.2135499 1.1458526 1.1071408 1.2122665 1.4031577
#>   7  1.1145212 1.0478052 1.1646421 1.2258161 1.2365264 1.1709941 1.4247932
#>   8  0.7778498 0.6857184 0.6808699 0.9396176 0.8968372 0.7512382 0.9563613
#>   9  0.7560762 0.6107305 0.6825990 0.9579488 0.9623190 0.6818574 0.7842371
#>   10 0.5773903 0.4354493 0.5272068 0.6390036 0.5951589 0.5309559 0.6027750
#>   11 0.6483182 0.5831143 0.6597554 0.8307924 1.0520615 0.8243202 0.7822123
#>   12 0.7401119 0.7375050 0.9552909 1.1085898 1.1349874 0.8014517 0.6815935
#>   13 0.8198302 0.8601695 0.9841659 1.1003799 1.3169599 1.0157741 0.9960183
#>   14 0.7271040 0.8256381 0.9048561 0.9416262 1.3915361 0.9113542 1.0704583
#>   15 1.0960999 1.2453588 1.3452952 1.3321367 1.8675829 1.2381959 1.4938417
#>   16 0.8975118 1.1165077 1.3026765 1.1240980 1.3504704 0.8959726 1.0929594
#>   17 0.6663335 0.8875547 1.0058326 0.9644984 1.1147217 0.7730890 1.0712877
#>   18 0.4831472 0.6211215 0.8832919 0.8590756 1.0402072 0.9456890 1.1641565
#>   19 0.8446375 0.8831365 1.2691680 1.2463504 1.4857787 1.4088909 1.7250719
#>   20 0.7875016 0.7970489 1.2195081 1.3212130 1.5497271 1.3287844 1.4755671
#>     year
#> age         36        37        38        39        40        41        42
#>   1  1.1514528 0.9680692 0.7436350 0.6144376 0.5523145 0.5274507 0.6161209
#>   2  1.2671782 1.1069677 0.8508596 0.6599579 0.5904104 0.5153035 0.6114380
#>   3  1.0736052 0.8300539 0.6739347 0.4520202 0.4058081 0.3937726 0.4439553
#>   4  0.9842306 0.6683397 0.6211575 0.3158601 0.2798002 0.2419750 0.2935864
#>   5  1.3641063 1.1040210 1.0059874 0.5007893 0.4472863 0.3682477 0.4521389
#>   6  1.3601052 1.0630233 0.9381816 0.4305396 0.3461967 0.2846353 0.4085300
#>   7  1.2666706 0.9642535 0.8323371 0.4784701 0.3865103 0.2780586 0.4227944
#>   8  1.1931019 0.8624188 0.7966909 0.5070042 0.3946190 0.3059343 0.3973910
#>   9  0.8202779 0.6586677 0.6473521 0.3704755 0.3132165 0.2668238 0.3302220
#>   10 0.6704798 0.5850391 0.5648460 0.4055352 0.3921671 0.3265770 0.4098637
#>   11 0.8116819 0.7625317 0.7382961 0.5910840 0.6002603 0.4749818 0.5208945
#>   12 0.6669834 0.5888658 0.5598788 0.4765993 0.4872173 0.4107262 0.4042569
#>   13 0.9809365 0.8530206 0.7891643 0.6102582 0.5110952 0.4371363 0.4526928
#>   14 1.0258193 0.9036791 0.6959418 0.5103727 0.4929288 0.4536781 0.4372476
#>   15 1.3021951 1.0789618 0.7836221 0.6554025 0.6525568 0.5627005 0.5217199
#>   16 1.0280592 0.8963484 0.6035455 0.5447046 0.6190320 0.5191114 0.4859712
#>   17 1.0413745 0.9507098 0.6105098 0.4527420 0.5124112 0.3594770 0.3706070
#>   18 1.1218095 0.9226264 0.6836801 0.5471399 0.5776296 0.5109667 0.4889942
#>   19 1.5976114 1.0838151 0.9403081 0.7691008 0.7809128 0.6863173 0.7012960
#>   20 1.2826901 0.8942680 0.8992545 0.7832332 0.8589190 1.0529300 0.9831674
#>     year
#> age         43        44        45        46        47        48        49
#>   1  0.5750436 0.4234545 0.3801121 0.3730090 0.2787154 0.2044231 0.2535486
#>   2  0.6614208 0.4820913 0.4168460 0.4469940 0.3226642 0.2286596 0.2867699
#>   3  0.4402673 0.3358363 0.2833250 0.2919825 0.2475163 0.1738059 0.2366697
#>   4  0.2482071 0.1786953 0.1509768 0.1384353 0.1304792 0.1174280 0.1562417
#>   5  0.3655772 0.3139876 0.2665331 0.2571616 0.2665565 0.2097047 0.2663533
#>   6  0.3529396 0.2874164 0.2440635 0.2575561 0.2637436 0.2227626 0.2883618
#>   7  0.3857586 0.3061363 0.2901883 0.3420213 0.3158797 0.2921924 0.3803849
#>   8  0.4098053 0.2881578 0.2813387 0.3023019 0.2909293 0.2477426 0.3482033
#>   9  0.4118336 0.2579635 0.2971704 0.3677245 0.3771000 0.2664386 0.3430510
#>   10 0.4363866 0.3022990 0.2852192 0.4089738 0.4056446 0.3406797 0.3460885
#>   11 0.5552099 0.3736917 0.3494404 0.4855595 0.4648906 0.4215791 0.4576212
#>   12 0.4247031 0.3523821 0.3317740 0.4262778 0.4375797 0.3978081 0.3789502
#>   13 0.5048699 0.3833667 0.4062088 0.4736107 0.4759850 0.4181391 0.4146211
#>   14 0.4731560 0.3792747 0.4384081 0.4198450 0.4840097 0.4813337 0.5228814
#>   15 0.6121207 0.4693069 0.5171591 0.5219655 0.6201704 0.6948067 0.8308159
#>   16 0.5996165 0.5506682 0.7305178 0.6172956 0.7797494 0.8020719 0.7889500
#>   17 0.4183399 0.4141238 0.6653279 0.6549041 0.7492479 0.7963353 0.7193323
#>   18 0.4844844 0.4358945 0.7714313 0.8590386 0.9465128 1.0078486 1.0422786
#>   19 0.6873857 0.5416978 0.8282630 1.0827130 0.8994153 0.9653520 0.8344982
#>   20 1.0104166 0.7136781 0.9606430 1.1212915 1.1111287 0.9940608 0.8925203
#>     year
#> age         50        51        52        53        54        55        56
#>   1  0.2602265 0.3469582 0.3138217 0.3398386 0.4149907 0.4778625 0.3469990
#>   2  0.2797423 0.4315577 0.3636744 0.4219790 0.4042959 0.5049603 0.3878871
#>   3  0.2391366 0.3315058 0.2907597 0.3348046 0.3450784 0.4261697 0.3697519
#>   4  0.1401185 0.1840004 0.1653211 0.2088364 0.1789114 0.2379076 0.2271460
#>   5  0.1894409 0.2208060 0.1718715 0.2195815 0.1800746 0.2381510 0.2569316
#>   6  0.2036755 0.2581321 0.1694793 0.2514922 0.2398868 0.3493829 0.3559204
#>   7  0.2776800 0.3234132 0.2084554 0.3176309 0.2833226 0.4181613 0.4560909
#>   8  0.2825563 0.3055798 0.2084700 0.3114978 0.2493907 0.3228901 0.3396497
#>   9  0.2381911 0.2688332 0.2199552 0.3288091 0.2574983 0.2864018 0.3189792
#>   10 0.2830565 0.3360497 0.2910152 0.4441359 0.3788220 0.3968867 0.5101220
#>   11 0.4241701 0.5243750 0.4419790 0.5799708 0.4208195 0.3627288 0.4330609
#>   12 0.3951497 0.4824500 0.3829085 0.5301655 0.3774701 0.3594311 0.4364769
#>   13 0.4911836 0.5010834 0.5226473 0.7838806 0.5196150 0.5455740 0.6914477
#>   14 0.5529802 0.6085470 0.5873519 0.7883781 0.6192790 0.5579198 0.6968411
#>   15 0.9091908 1.1298169 1.1037574 1.2389925 0.8898531 0.6857599 0.6882644
#>   16 0.9333091 0.9719903 1.1564149 1.4263769 0.9595427 0.8334660 0.7597328
#>   17 0.7763679 0.8902493 1.2985457 1.5576411 0.9180424 0.8511554 0.7068864
#>   18 0.9718138 1.0966449 1.3681853 1.6900815 1.0813534 0.8491491 0.7747252
#>   19 0.8901538 1.2530561 1.5204981 1.4799992 0.9079598 0.6988525 0.5597461
#>   20 1.1843929 1.5843374 1.7950124 1.5166038 0.8834381 0.7045959 0.5446698
#>     year
#> age         57        58        59        60        61        62        63
#>   1  0.2992564 0.2311960 0.2731154 0.3327523 0.2645297 0.1924762 0.3653768
#>   2  0.3978113 0.2794847 0.3590086 0.4966374 0.4131913 0.2516939 0.4050040
#>   3  0.3632393 0.2501447 0.3321573 0.4105239 0.3228666 0.1808205 0.2430721
#>   4  0.2425268 0.1683585 0.1983806 0.2393364 0.1890461 0.1141252 0.1696412
#>   5  0.2807109 0.1804972 0.2052156 0.2721841 0.2177539 0.1799002 0.2770940
#>   6  0.3788905 0.2835287 0.3218289 0.3625675 0.2733509 0.3081164 0.3679117
#>   7  0.4587665 0.2999948 0.3405954 0.3361686 0.2545667 0.3016246 0.4245321
#>   8  0.4265253 0.3040905 0.3392031 0.3187938 0.2391976 0.3373427 0.4401274
#>   9  0.3429510 0.2837763 0.3047694 0.2817595 0.2212028 0.3149673 0.4453618
#>   10 0.4906870 0.3924216 0.3696264 0.3491653 0.2464233 0.3360722 0.4371257
#>   11 0.4460612 0.4129781 0.3589536 0.3607613 0.3212489 0.4819882 0.7060313
#>   12 0.4495772 0.4585306 0.3830737 0.4479595 0.3936986 0.5757224 0.8318989
#>   13 0.6713237 0.5402225 0.4337391 0.5080629 0.4885088 0.7416788 1.1707357
#>   14 0.7028739 0.5506994 0.4454142 0.5292410 0.5269086 0.8603566 1.3072861
#>   15 0.6764223 0.6770912 0.5101037 0.5712617 0.6090873 0.9112454 1.6256706
#>   16 0.8975214 0.9146514 0.6892328 0.7368031 0.7800696 1.0882242 1.9443345
#>   17 0.7817129 0.7931487 0.7163466 0.8326444 0.8343396 1.0930348 1.9641798
#>   18 0.9617784 1.0756181 0.9159574 1.1536374 1.2100278 1.3630676 2.2929114
#>   19 0.6596800 0.7050919 0.6761957 0.8715405 1.0063059 0.9691785 1.4883893
#>   20 0.7429306 0.7378043 0.6997964 0.8603355 0.9476124 1.0154552 1.2462351
#>     year
#> age         64        65        66        67        68        69        70
#>   1  0.5836658 0.5407643 0.4908137 0.4708571 0.6568216 0.8147719 1.1716488
#>   2  0.6502279 0.6334460 0.6244792 0.6190247 0.6999681 0.9704683 1.3249638
#>   3  0.3293145 0.3303561 0.3617580 0.3838564 0.4269360 0.6395944 0.8023358
#>   4  0.2664454 0.3616895 0.3862582 0.3824587 0.4239224 0.5366642 0.6842745
#>   5  0.3857307 0.6299420 0.6071152 0.6481454 0.7068056 0.8413485 1.1114661
#>   6  0.4264350 0.6840864 0.6282466 0.7314104 0.8361776 0.9622734 1.2521198
#>   7  0.4795664 0.7778222 0.7118924 0.8356001 0.9103748 0.9011546 1.1929145
#>   8  0.5638695 0.7736271 0.8071648 0.8670325 0.9543753 0.9994017 1.2159760
#>   9  0.4824118 0.7047241 0.7920480 0.7283131 0.9312571 0.7387291 0.8901837
#>   10 0.4744147 0.5768846 0.6947640 0.6286174 0.8298300 0.6898613 0.8293276
#>   11 0.6281206 0.6853601 0.8498539 0.7555316 0.8947547 0.7192730 0.7975028
#>   12 0.8148564 0.8172050 1.2575423 1.2453395 1.4472961 1.2109100 1.1392296
#>   13 1.3065792 1.3415539 1.7121859 1.6194197 1.6812744 1.5802387 1.5790728
#>   14 1.4921105 1.4892385 1.7795451 1.7079211 1.7620873 1.4799151 1.4714033
#>   15 1.6310623 1.4269883 1.4157487 1.2671262 1.3708370 1.0883631 1.0403322
#>   16 1.6888793 1.6686932 1.3089074 1.2909507 1.3706986 1.1757768 1.0402515
#>   17 1.4419007 1.5478551 1.1081503 1.1950412 1.4514384 1.2397794 0.9501496
#>   18 1.4926204 1.2976553 1.1245031 1.2440383 1.4188389 1.3049528 0.9129747
#>   19 1.1359440 1.2152213 1.0988770 1.1520029 1.1178240 1.0410258 0.8024227
#>   20 1.0010179 0.9973879 0.7727187 0.9950199 1.1455591 1.1968190 0.8675148
#>     year
#> age         71        72        73        74        75        76        77
#>   1  1.7479822 1.5768361 1.6536673 1.4231585 1.4815807 1.6173049 1.0631793
#>   2  1.8505932 1.7636031 1.4463560 1.2758604 1.4211563 1.7630661 1.4848839
#>   3  0.9185088 1.0502445 0.9502211 0.8131417 0.8854103 1.2460610 0.9094067
#>   4  0.8189295 0.7556951 0.6496008 0.6112108 0.7049325 0.9454407 0.7362685
#>   5  1.2850390 0.9171035 0.7584344 0.7829880 0.8117905 0.9423125 0.8611213
#>   6  1.3197891 1.0613448 0.8710765 0.8318700 0.7866422 0.8386203 0.7132318
#>   7  1.0779492 0.8445699 0.6008971 0.6036083 0.5061337 0.5801715 0.4319796
#>   8  1.1645455 0.9373195 0.6561900 0.7072274 0.6105255 0.7097987 0.5834039
#>   9  0.7601954 0.6360973 0.5727384 0.6237074 0.6183253 0.6871548 0.5688637
#>   10 0.7398116 0.6631959 0.6521695 0.7018197 0.7214287 0.6953954 0.7289829
#>   11 0.6254392 0.4993270 0.5841152 0.5002525 0.5634100 0.5428484 0.5448638
#>   12 0.8779113 0.6830942 0.7527235 0.6311802 0.7959599 0.7992719 1.0111280
#>   13 1.2976686 1.0060276 1.0358338 0.8496849 0.9652998 0.9908599 1.1509200
#>   14 1.3260550 1.1824101 1.2950433 1.0045489 1.0056313 1.0439639 1.2606708
#>   15 1.0528316 0.8650916 0.9603016 0.7240836 0.6755182 0.7821923 0.9107523
#>   16 1.1021808 1.0362606 1.0443290 0.7423351 0.7524125 0.7806284 0.8312167
#>   17 0.9821359 0.9504407 1.1954797 0.9642250 1.0276295 1.1003182 1.0236021
#>   18 0.9451820 0.8311327 1.0936086 0.8377362 0.9001028 0.8945882 0.9645987
#>   19 0.9350599 0.7823321 0.8034860 0.7055774 0.6763463 0.6725623 0.8929189
#>   20 0.8692685 0.7767395 0.8505507 0.7788846 0.6482697 0.7305866 0.8413169
#>     year
#> age         78        79        80        81        82        83        84
#>   1  0.8284960 0.7803419 0.8105416 0.7312825 0.9190057 0.8046978 0.6411951
#>   2  1.1420501 0.9553388 0.8137586 0.5991221 0.7468258 0.6423316 0.5494773
#>   3  0.6940748 0.5775634 0.4741008 0.3667469 0.3839191 0.3682932 0.3447015
#>   4  0.5646477 0.4517684 0.3326071 0.2950825 0.3042149 0.3074883 0.2936135
#>   5  0.6706419 0.6509649 0.5658207 0.4424309 0.4004664 0.4069590 0.4066559
#>   6  0.6346100 0.6421070 0.5765890 0.4387902 0.4059946 0.4182298 0.3972428
#>   7  0.3679474 0.4208369 0.3595173 0.3050121 0.2764028 0.3274793 0.3263783
#>   8  0.3902274 0.4497061 0.3704992 0.2747087 0.2578091 0.2826559 0.3092928
#>   9  0.3713461 0.4438432 0.4400090 0.3440950 0.3985813 0.4351163 0.5673761
#>   10 0.4956858 0.5764791 0.6000987 0.5483244 0.5833658 0.6049919 0.7361349
#>   11 0.4821220 0.5257301 0.5997848 0.4764070 0.5807542 0.5508929 0.6626219
#>   12 1.0507239 0.9220260 0.9721960 0.6569265 0.7681749 0.6662676 0.7631069
#>   13 1.3391474 1.0156570 1.0600934 0.7169266 0.6928068 0.6489231 0.7643171
#>   14 1.3017488 1.0674125 1.1385668 0.7529144 0.7660686 0.5977976 0.8503138
#>   15 1.1380721 0.9209407 1.1696924 0.8944753 0.8581028 0.6135569 0.9305841
#>   16 1.0611405 0.9686528 1.1876513 0.9013243 0.8516244 0.6518388 0.9806645
#>   17 1.3769468 1.1077785 1.2871677 0.7664961 0.6934803 0.5247536 0.7363333
#>   18 1.7088867 1.0153297 1.0181518 0.6709518 0.5991774 0.5155080 0.6796435
#>   19 1.4825070 0.9446344 1.0624561 0.7311417 0.7239024 0.6516636 0.6710248
#>   20 1.3068582 0.9079979 0.8874006 0.6963642 0.6399760 0.7207619 0.6233985
#>     year
#> age         85        86        87        88        89        90        91
#>   1  0.6777756 0.6161335 1.0402932 1.0240126 0.9404645 0.9414807 1.2570140
#>   2  0.6275834 0.5276929 0.8505340 0.8478258 0.7323939 0.5865961 0.7688386
#>   3  0.3487545 0.2704045 0.3896281 0.4052838 0.3806985 0.3275919 0.5017691
#>   4  0.2362514 0.1762159 0.2221434 0.1810164 0.1749914 0.1630574 0.2707395
#>   5  0.3403231 0.2519393 0.3174022 0.2769160 0.2246689 0.2132891 0.3101195
#>   6  0.3579533 0.2564426 0.3185544 0.3009488 0.2442297 0.2517334 0.3583172
#>   7  0.3490588 0.2711009 0.2933701 0.3037908 0.2430659 0.2353561 0.3407898
#>   8  0.3117040 0.2751481 0.3284631 0.3230469 0.2700075 0.2861440 0.3953210
#>   9  0.5198052 0.4637029 0.5067736 0.5624908 0.4830868 0.3901115 0.4514404
#>   10 0.6068974 0.6357015 0.6981875 0.6423844 0.4941543 0.4230469 0.5329453
#>   11 0.4782125 0.6230693 0.7317896 0.6252138 0.5693016 0.4964784 0.5416850
#>   12 0.6825507 0.9800256 1.1453554 0.8815340 0.7270464 0.6381692 0.5981021
#>   13 0.6795181 1.0149055 1.1204128 0.9157121 0.8303826 0.7967207 0.8002920
#>   14 0.8384794 1.0651254 1.0869036 1.0595878 0.8928542 0.8231593 0.8703375
#>   15 0.9105349 1.1061058 1.1651844 1.1589714 0.9259089 0.7273367 0.6190631
#>   16 0.8007992 1.0483157 0.9521406 0.7816691 0.7008821 0.6084495 0.6716565
#>   17 0.6443728 0.8769745 0.8207859 0.7279438 0.5816457 0.4815028 0.5798396
#>   18 0.5951354 0.7050205 0.6178350 0.5790010 0.6814688 0.5484270 0.6692542
#>   19 0.6542050 0.8438057 0.6809417 0.7657521 0.8783918 0.6298697 0.7356442
#>   20 0.5539969 0.6983194 0.5599473 0.6235386 0.7624484 0.5475222 0.6253300
#>     year
#> age         92        93        94        95        96        97        98
#>   1  1.1146215 1.1146899 0.6401124 0.4755362 0.4690280 0.3246159 0.3332383
#>   2  0.6912621 0.6882659 0.5028608 0.3938648 0.3895824 0.3009373 0.3348413
#>   3  0.4289353 0.4079369 0.3169340 0.3051470 0.3512212 0.3021207 0.3250133
#>   4  0.3262150 0.3186028 0.2930485 0.3152880 0.3051670 0.2986472 0.3373758
#>   5  0.4218013 0.3590211 0.3239859 0.3476424 0.3356925 0.3254341 0.3352556
#>   6  0.4497013 0.3884584 0.3231021 0.3466085 0.3688272 0.3064404 0.3628168
#>   7  0.3809818 0.3586475 0.2951374 0.3054924 0.3512001 0.3377017 0.4290584
#>   8  0.4876614 0.4852416 0.3722473 0.3922293 0.4622950 0.4885381 0.6209153
#>   9  0.5971641 0.6616958 0.4847151 0.5100198 0.6118831 0.6352477 0.7369226
#>   10 0.5694117 0.6599594 0.5376135 0.5592800 0.7013913 0.7458840 0.6089276
#>   11 0.5789093 0.6678303 0.5188198 0.6430654 0.7880302 0.8019797 0.7551951
#>   12 0.6553777 0.7417255 0.6278173 0.6886101 0.7868816 0.8175910 0.7940052
#>   13 0.7160339 0.9633211 0.7398053 0.7318840 1.0827380 1.0015609 0.9203200
#>   14 0.7648436 1.1074499 0.7526219 0.6456968 0.9697388 0.9598073 0.8772249
#>   15 0.6435119 0.8864405 0.7566530 0.7165389 1.0423062 1.0328405 0.8375643
#>   16 0.6513420 1.0235224 0.7127188 0.6735598 1.2296178 1.3465813 1.2198214
#>   17 0.6122685 0.9218762 0.6066729 0.6191557 0.9187835 1.0497268 1.0296306
#>   18 0.6733154 0.8724631 0.5788016 0.5601258 0.7719762 0.8837778 0.8763479
#>   19 0.7089043 0.8291436 0.4566469 0.5599256 0.6912838 0.7853816 0.8826853
#>   20 0.6392990 0.8626969 0.5219506 0.5446358 0.6871764 0.6499009 0.6348420
#>     year
#> age         99       100
#>   1  0.4631012 0.4322344
#>   2  0.3897342 0.3932660
#>   3  0.4178768 0.4537402
#>   4  0.3797136 0.4322111
#>   5  0.3618697 0.3803610
#>   6  0.3782650 0.4717009
#>   7  0.5622089 0.6389442
#>   8  0.7808833 0.8919858
#>   9  0.8691099 0.9611942
#>   10 0.7239227 0.9138490
#>   11 0.8825981 1.1909773
#>   12 0.7393714 0.8627155
#>   13 0.6829360 0.7924210
#>   14 0.5995405 0.6765407
#>   15 0.5865859 0.5895904
#>   16 0.8577248 0.7674236
#>   17 0.6926796 0.5694652
#>   18 0.5718607 0.5318013
#>   19 0.5658812 0.5618053
#>   20 0.4030125 0.3920009
sim_abundance(Z = sim_Z(log_mean = log(0.5), log_sd = 0.1, plot = TRUE))

#> $ages
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $lengths
#>  [1]   1   4   7  10  13  16  19  22  25  28  31  34  37  40  43  46  49  52  55
#> [20]  58  61  64  67  70  73  76  79  82  85  88  91  94  97 100 103 106 109 112
#> [39] 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169
#> [58] 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226
#> [77] 229 232 235 238
#> 
#> $years
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $R
#>           1           2           3           4           5           6 
#>  31811503.1  36127210.4  62287054.6 129325193.1  79081739.6 147436291.9 
#>           7           8           9          10          11          12 
#>  84558451.9 109526748.8  39750560.3  21466011.6  11789384.2  20518418.8 
#>          13          14          15          16          17          18 
#>  13366562.1   6302591.2   3172410.9   1884903.5   2077158.3   1722063.6 
#>          19          20 
#>    807445.3   2175682.3 
#> 
#> $N0
#>  [1] 3.181150e+07 1.619414e+07 8.463508e+06 4.550339e+06 2.643012e+06
#>  [6] 1.490112e+06 8.762509e+05 4.964089e+05 2.832285e+05 1.541510e+05
#> [11] 8.948768e+04 4.800849e+04 2.821873e+04 1.471533e+04 7.857113e+03
#> [16] 4.515306e+03 2.484811e+03 1.360663e+03 6.895039e+02 3.945434e+02
#> 
#> $Z
#>     year
#> age          1         2         3         4         5         6         7
#>   1  0.6751784 0.4355594 0.6326553 0.6948314 0.6370722 0.5068339 0.4423961
#>   2  0.6488859 0.4175398 0.4970945 0.6323405 0.5839201 0.5243383 0.4814071
#>   3  0.6205620 0.5208235 0.6205137 0.6282890 0.5854255 0.5598718 0.4863245
#>   4  0.5432824 0.4560826 0.6589653 0.7630335 0.6038329 0.4629835 0.4746787
#>   5  0.5730683 0.5346225 0.6668465 0.8993300 0.6257832 0.4558842 0.5015140
#>   6  0.5309538 0.5090253 0.5630151 0.7018599 0.5689257 0.3956384 0.4536997
#>   7  0.5682525 0.5912861 0.6181190 0.8473185 0.5955469 0.3949183 0.4464810
#>   8  0.5611461 0.5693969 0.6517874 0.8589279 0.6021011 0.4251426 0.5150917
#>   9  0.6083215 0.4567471 0.5943920 0.7133412 0.5875401 0.4374911 0.4680126
#>   10 0.5438315 0.4330751 0.5151302 0.5494927 0.6265952 0.5000885 0.5839765
#>   11 0.6227231 0.5474996 0.5381743 0.5537651 0.7515145 0.6180133 0.7270037
#>   12 0.5313918 0.5523518 0.5364853 0.6554627 0.7879864 0.6731767 0.7057666
#>   13 0.6510962 0.6207775 0.5069643 0.6527957 0.8162132 0.6470738 0.7955612
#>   14 0.6274706 0.6848423 0.5361424 0.6623181 0.7192191 0.5907145 0.8072253
#>   15 0.5539463 0.6197916 0.4912746 0.6741678 0.7283867 0.7092226 0.8038737
#>   16 0.5972765 0.7068106 0.4899900 0.6222518 0.6310539 0.5950579 0.7989629
#>   17 0.6022247 0.8185267 0.5177329 0.6210834 0.6273827 0.5473431 0.8267587
#>   18 0.6797547 0.7989863 0.5610865 0.6468328 0.5628438 0.4855810 0.6788268
#>   19 0.5582431 0.6550536 0.4937910 0.6966153 0.5206306 0.4026965 0.6165435
#>   20 0.5035615 0.6307469 0.4784346 0.6309839 0.4970583 0.4600119 0.5075467
#>     year
#> age          8         9        10        11        12        13        14
#>   1  0.3946038 0.5439661 0.3568134 0.2685257 0.3991823 0.5062003 0.4353699
#>   2  0.4324970 0.5879612 0.3998915 0.2626370 0.3399263 0.4506130 0.5217752
#>   3  0.4728257 0.6092662 0.4493956 0.2978954 0.3137122 0.4022621 0.4407865
#>   4  0.4761520 0.6654117 0.4264071 0.2663879 0.2928145 0.3708029 0.5041040
#>   5  0.4263460 0.5767525 0.4651089 0.2655890 0.2928550 0.2954274 0.4225754
#>   6  0.3593701 0.4917737 0.4668945 0.3212856 0.2590485 0.2850740 0.5774223
#>   7  0.3372840 0.5182286 0.4494313 0.3607189 0.2715030 0.3056033 0.5553252
#>   8  0.3295449 0.5755391 0.4468572 0.3916428 0.3300257 0.2919323 0.5731108
#>   9  0.3607069 0.5725956 0.4653850 0.4129390 0.3932880 0.3092428 0.5021425
#>   10 0.4464873 0.6488464 0.4969878 0.4846615 0.3714013 0.3607810 0.6104154
#>   11 0.5190930 0.6777594 0.5289977 0.5643350 0.4998214 0.5633336 0.7787938
#>   12 0.4725457 0.6886425 0.6018802 0.5108465 0.5105511 0.5738657 0.8326038
#>   13 0.5383639 0.9117405 0.7550566 0.6133573 0.4838445 0.4435307 0.6150515
#>   14 0.5475351 0.8831441 0.6775727 0.5383712 0.5020101 0.4745304 0.5823007
#>   15 0.5408333 0.9531227 0.7977986 0.6845127 0.4891046 0.4634329 0.6315319
#>   16 0.5139452 0.8284774 0.6917285 0.7210231 0.5252513 0.4424280 0.6067197
#>   17 0.5860983 0.9385127 0.6824524 0.7485425 0.5876387 0.4428966 0.6069783
#>   18 0.6275824 0.8053537 0.7593515 0.7379517 0.5794795 0.4489408 0.6228942
#>   19 0.4906796 0.7693817 0.6390553 0.6079541 0.6034160 0.4236168 0.5998022
#>   20 0.4189528 0.7643751 0.5920271 0.6597367 0.5741838 0.4286930 0.6191660
#>     year
#> age         15        16        17        18        19        20
#>   1  0.5089082 0.4625495 0.5211935 0.4041093 0.4736046 0.6111009
#>   2  0.5984421 0.5463184 0.5328273 0.3990691 0.5284271 0.6276787
#>   3  0.5913146 0.5348138 0.5565270 0.4071905 0.6058638 0.6242974
#>   4  0.6733331 0.6168389 0.6430128 0.4626613 0.7130720 0.5500529
#>   5  0.4470258 0.4940692 0.6099769 0.4302861 0.5876172 0.5606183
#>   6  0.4618117 0.4658713 0.5622091 0.4501756 0.6822465 0.7157500
#>   7  0.4894061 0.4787309 0.5577907 0.4139844 0.5849271 0.6979959
#>   8  0.5113603 0.5078613 0.5834373 0.4053783 0.6102776 0.6846794
#>   9  0.4745305 0.5035440 0.4831858 0.4034210 0.5580017 0.6499799
#>   10 0.6664589 0.5696831 0.4921022 0.3820006 0.5698673 0.7257208
#>   11 0.8165427 0.6431962 0.5201713 0.4364333 0.6040220 0.7113344
#>   12 0.8041433 0.7558008 0.5431826 0.4702655 0.5677050 0.6982605
#>   13 0.7718173 0.8054958 0.6568889 0.5473069 0.5440834 0.6062819
#>   14 0.7800905 0.7635357 0.6241862 0.5775114 0.5741791 0.5849163
#>   15 1.0667719 0.9184452 0.7510370 0.6527045 0.5648968 0.6139344
#>   16 0.7276331 0.8769941 0.7472252 0.5475719 0.5157247 0.5349086
#>   17 0.6471715 0.8444614 0.6773750 0.5239807 0.5413723 0.5223794
#>   18 0.8613691 0.9950393 0.7789430 0.5102552 0.6139537 0.5222797
#>   19 0.8445885 0.8117487 0.6393778 0.5645978 0.5704738 0.4875534
#>   20 0.6791419 0.7034217 0.6784010 0.7157568 0.7300959 0.5770648
#> 
#> $N
#>     year
#> age             1            2            3            4            5
#>   1  3.181150e+07 3.612721e+07 6.228705e+07 1.293252e+08 7.908174e+07
#>   2  1.619414e+07 1.619414e+07 2.337079e+07 3.308560e+07 6.455379e+07
#>   3  8.463508e+06 8.463508e+06 1.066652e+07 1.421635e+07 1.757993e+07
#>   4  4.550339e+06 4.550339e+06 5.027587e+06 5.735048e+06 7.584475e+06
#>   5  2.643012e+06 2.643012e+06 2.883830e+06 2.601205e+06 2.673966e+06
#>   6  1.490112e+06 1.490112e+06 1.548516e+06 1.480341e+06 1.058280e+06
#>   7  8.762509e+05 8.762509e+05 8.956780e+05 8.818633e+05 7.337497e+05
#>   8  4.964089e+05 4.964089e+05 4.851055e+05 4.827322e+05 3.779336e+05
#>   9  2.832285e+05 2.832285e+05 2.809012e+05 2.527950e+05 2.044931e+05
#>   10 1.541510e+05 1.541510e+05 1.793801e+05 1.550288e+05 1.238706e+05
#>   11 8.948768e+04 8.948768e+04 9.996872e+04 1.071657e+05 8.948924e+04
#>   12 4.800849e+04 4.800849e+04 5.175916e+04 5.836306e+04 6.159690e+04
#>   13 2.821873e+04 2.821873e+04 2.763342e+04 3.026876e+04 3.030220e+04
#>   14 1.471533e+04 1.471533e+04 1.516831e+04 1.664420e+04 1.575756e+04
#>   15 7.857113e+03 7.857113e+03 7.419024e+03 8.873472e+03 8.582658e+03
#>   16 4.515306e+03 4.515306e+03 4.227571e+03 4.539300e+03 4.521747e+03
#>   17 2.484811e+03 2.484811e+03 2.227016e+03 2.589948e+03 2.436399e+03
#>   18 1.360663e+03 1.360663e+03 1.096003e+03 1.327012e+03 1.391739e+03
#>   19 6.895039e+02 6.895039e+02 6.120052e+02 6.253669e+02 6.949583e+02
#>   20 3.945434e+02 3.945434e+02 3.581381e+02 3.735119e+02 3.116009e+02
#>     year
#> age             6            7            8            9           10
#>   1  1.474363e+08 8.455845e+07 1.095267e+08 3.975056e+07 2.146601e+07
#>   2  4.182147e+07 8.881559e+07 5.432839e+07 7.381523e+07 2.307288e+07
#>   3  3.600215e+07 2.475609e+07 5.488034e+07 3.525298e+07 4.100130e+07
#>   4  9.789715e+06 2.056739e+07 1.522208e+07 3.420355e+07 1.916880e+07
#>   5  4.146525e+06 6.161676e+06 1.279466e+07 9.455485e+06 1.758274e+07
#>   6  1.430150e+06 2.628429e+06 3.731592e+06 8.353512e+06 5.311331e+06
#>   7  5.991276e+05 9.628486e+05 1.669771e+06 2.605083e+06 5.108513e+06
#>   8  4.044876e+05 4.036532e+05 6.161036e+05 1.191726e+06 1.551521e+06
#>   9  2.069790e+05 2.644041e+05 2.411609e+05 4.431332e+05 6.702287e+05
#>   10 1.136353e+05 1.336369e+05 1.655819e+05 1.681334e+05 2.499534e+05
#>   11 6.619749e+04 6.891718e+04 7.452613e+04 1.059512e+05 8.787463e+04
#>   12 4.220775e+04 3.568139e+04 3.331147e+04 4.434752e+04 5.379708e+04
#>   13 2.801178e+04 2.152957e+04 1.761697e+04 2.076681e+04 2.227387e+04
#>   14 1.339668e+04 1.466628e+04 9.716894e+03 1.028307e+04 8.344609e+03
#>   15 7.676021e+03 7.420844e+03 6.542543e+03 5.619996e+03 4.251852e+03
#>   16 4.142738e+03 3.776806e+03 3.321509e+03 3.809480e+03 2.166707e+03
#>   17 2.405709e+03 2.284847e+03 1.698789e+03 1.986698e+03 1.663652e+03
#>   18 1.301007e+03 1.391666e+03 9.995404e+02 9.453665e+02 7.772145e+02
#>   19 7.927166e+02 8.005609e+02 7.058691e+02 5.336356e+02 4.225125e+02
#>   20 4.129065e+02 5.299429e+02 4.321485e+02 4.321403e+02 2.472331e+02
#>     year
#> age            11           12           13           14           15
#>   1  1.178938e+07 2.051842e+07 1.336656e+07 6.302591e+06 3172410.9422
#>   2  1.502413e+07 9.013052e+06 1.376516e+07 8.057118e+06 4077935.8124
#>   3  1.546789e+07 1.155387e+07 6.415696e+06 8.771674e+06 4781626.0397
#>   4  2.615939e+07 1.148304e+07 8.442752e+06 4.290852e+06 5644835.8060
#>   5  1.251436e+07 2.004180e+07 8.568190e+06 5.827018e+06 2591874.3029
#>   6  1.104313e+07 9.595436e+06 1.495380e+07 6.376562e+06 3818775.9299
#>   7  3.329919e+06 8.008658e+06 7.405619e+06 1.124464e+07 3579441.3321
#>   8  3.259185e+06 2.321536e+06 6.104464e+06 5.455563e+06 6453135.2783
#>   9  9.924078e+05 2.203032e+06 1.668965e+06 4.558930e+06 3075676.8724
#>   10 4.208321e+05 6.566789e+05 1.486681e+06 1.225024e+06 2759213.0036
#>   11 1.520618e+05 2.591929e+05 4.529555e+05 1.036413e+06  665341.4835
#>   12 5.177531e+04 8.648335e+04 1.572365e+05 2.578712e+05  475671.1764
#>   13 2.946901e+04 3.106454e+04 5.190425e+04 8.857816e+04  112152.1551
#>   14 1.046836e+04 1.595834e+04 1.914846e+04 3.331041e+04   47886.5096
#>   15 4.237794e+03 6.110366e+03 9.659787e+03 1.191374e+04   18607.5851
#>   16 1.914691e+03 2.137272e+03 3.746724e+03 6.077167e+03    6335.4460
#>   17 1.084891e+03 9.310270e+02 1.263997e+03 2.407175e+03    3312.8835
#>   18 8.407700e+02 5.132138e+02 5.173138e+02 8.117055e+02    1311.8991
#>   19 3.637129e+02 4.019656e+02 2.874972e+02 3.302034e+02     435.3905
#>   20 2.229982e+02 1.980285e+02 2.198511e+02 1.882171e+02     181.2553
#>     year
#> age            16           17           18           19           20
#>   1  1884903.5425 2077158.2995 1722063.5610  807445.2687 2175682.2908
#>   2  1907099.8182 1186878.9283 1233440.3020 1149599.9787  502839.3220
#>   3  2241508.0588 1104359.1999  696630.4985  827569.7869  677725.4327
#>   4  2647103.5059 1313026.8977  633014.6126  463619.7318  451524.4941
#>   5  2878899.1638 1428503.1299  690266.3888  398549.7058  227236.7994
#>   6  1657574.6124 1756527.3412  776196.3171  448896.1126  221454.0214
#>   7  2406367.1384 1040274.0270 1001130.3089  494837.7437  226908.0667
#>   8  2194162.8704 1490910.8900  595528.2199  661758.3778  275697.1155
#>   9  3869811.3305 1320406.0777  831894.1587  397053.2678  359467.2016
#>   10 1913615.7615 2338855.5904  814446.5273  555730.9066  227254.0924
#>   11 1416921.5796 1082541.3837 1429835.7568  555855.4194  314321.6576
#>   12  294052.3138  744747.8181  643482.8558  924156.5950  303835.4413
#>   13  212849.1148  138097.0709  432621.4187  402071.4714  523834.9034
#>   14   51833.6288   95115.0996   71598.0586  250273.9549  233351.6280
#>   15   21949.4783   24155.2899   50952.8931   40187.5236  140946.0255
#>   16    6403.1967    8760.8957   11398.3250   26527.9004   22843.3432
#>   17    3060.3435    2663.9321    4149.8531    6592.2488   15838.9529
#>   18    1734.3756    1315.3013    1353.1406    2457.3714    3836.3531
#>   19     554.3864     641.2141     603.5797     812.3477    1329.9463
#>   20     187.1022     246.1924     338.3178     343.1886     459.1857
#> 
#> $N_at_length
#>       year
#> length            1            2            3            4            5
#>    1   1.932809e-55 2.195023e-55 3.784447e-55 7.857562e-55 4.804862e-55
#>    4   2.337715e-15 2.654861e-15 4.577256e-15 9.503652e-15 5.811438e-15
#>    7   1.710475e-01 1.942526e-01 3.349116e-01 6.953694e-01 4.252151e-01
#>    10  7.140409e+04 8.109113e+04 1.398095e+05 2.902833e+05 1.775069e+05
#>    13  8.545906e+06 9.705287e+06 1.673292e+07 3.474218e+07 2.124468e+07
#>    16  1.961624e+07 2.227715e+07 3.840743e+07 7.974219e+07 4.876855e+07
#>    19  3.791076e+06 4.264125e+06 7.266335e+06 1.479693e+07 9.880785e+06
#>    22  3.501089e+06 3.513677e+06 5.100257e+06 7.340265e+06 1.381536e+07
#>    25  7.164722e+06 7.164814e+06 1.033178e+07 1.462257e+07 2.847122e+07
#>    28  4.794938e+06 4.794938e+06 6.821953e+06 9.601697e+06 1.809240e+07
#>    31  2.936562e+06 2.936562e+06 3.878006e+06 5.282334e+06 7.971094e+06
#>    34  3.106552e+06 3.106552e+06 3.910279e+06 5.190326e+06 6.596486e+06
#>    37  2.646551e+06 2.646551e+06 3.242454e+06 4.190343e+06 5.253342e+06
#>    40  2.024969e+06 2.024969e+06 2.364439e+06 2.875442e+06 3.659443e+06
#>    43  1.703038e+06 1.703038e+06 1.910155e+06 2.159997e+06 2.742893e+06
#>    46  1.438187e+06 1.438187e+06 1.584344e+06 1.676094e+06 2.033728e+06
#>    49  1.184701e+06 1.184701e+06 1.290934e+06 1.283041e+06 1.425650e+06
#>    52  9.740026e+05 9.740026e+05 1.048904e+06 1.001437e+06 9.977643e+05
#>    55  7.967290e+05 7.967290e+05 8.463194e+05 7.993642e+05 7.199034e+05
#>    58  6.457126e+05 6.457126e+05 6.762058e+05 6.428063e+05 5.381455e+05
#>    61  5.190970e+05 5.190970e+05 5.366065e+05 5.153129e+05 4.152572e+05
#>    64  4.135155e+05 4.135155e+05 4.230830e+05 4.090101e+05 3.258385e+05
#>    67  3.256059e+05 3.256059e+05 3.310688e+05 3.203461e+05 2.555141e+05
#>    70  2.529749e+05 2.529749e+05 2.570531e+05 2.477447e+05 1.985906e+05
#>    73  1.937473e+05 1.937473e+05 1.979772e+05 1.897401e+05 1.531349e+05
#>    76  1.461928e+05 1.461928e+05 1.509864e+05 1.442786e+05 1.176401e+05
#>    79  1.086296e+05 1.086296e+05 1.136379e+05 1.089393e+05 9.017995e+04
#>    82  7.944448e+04 7.944448e+04 8.406519e+04 8.144586e+04 6.877731e+04
#>    85  5.714183e+04 5.714183e+04 6.090971e+04 6.000683e+04 5.185591e+04
#>    88  4.038476e+04 4.038476e+04 4.312433e+04 4.335596e+04 3.837565e+04
#>    91  2.801526e+04 2.801526e+04 2.980221e+04 3.060189e+04 2.771081e+04
#>    94  1.905494e+04 1.905494e+04 2.009909e+04 2.105161e+04 1.945030e+04
#>    97  1.269383e+04 1.269383e+04 1.323161e+04 1.409983e+04 1.324676e+04
#>    100 8.274081e+03 8.274081e+03 8.505589e+03 9.193107e+03 8.751066e+03
#>    103 5.272287e+03 5.272287e+03 5.340082e+03 5.836358e+03 5.610673e+03
#>    106 3.281591e+03 3.281591e+03 3.274621e+03 3.609221e+03 3.494336e+03
#>    109 1.993784e+03 1.993784e+03 1.961072e+03 2.174794e+03 2.116028e+03
#>    112 1.181784e+03 1.181784e+03 1.146722e+03 1.277201e+03 1.246937e+03
#>    115 6.831083e+02 6.831083e+02 6.545863e+02 7.311644e+02 7.155228e+02
#>    118 3.849750e+02 3.849750e+02 3.647215e+02 4.080946e+02 4.000290e+02
#>    121 2.115183e+02 2.115183e+02 1.983502e+02 2.221231e+02 2.179973e+02
#>    124 1.133179e+02 1.133179e+02 1.053013e+02 1.179365e+02 1.158515e+02
#>    127 5.921390e+01 5.921390e+01 5.458598e+01 6.110906e+01 6.007011e+01
#>    130 3.019486e+01 3.019486e+01 2.764099e+01 3.091688e+01 3.040656e+01
#>    133 1.503471e+01 1.503471e+01 1.367994e+01 1.528244e+01 1.503516e+01
#>    136 7.315205e+00 7.315205e+00 6.621431e+00 7.386015e+00 7.267653e+00
#>    139 3.480813e+00 3.480813e+00 3.136701e+00 3.492949e+00 3.436916e+00
#>    142 1.621206e+00 1.621206e+00 1.455431e+00 1.617729e+00 1.591471e+00
#>    145 7.397692e-01 7.397692e-01 6.620198e-01 7.344021e-01 7.222162e-01
#>    148 3.310264e-01 3.310264e-01 2.954518e-01 3.270904e-01 3.214901e-01
#>    151 1.453945e-01 1.453945e-01 1.294853e-01 1.430547e-01 1.405071e-01
#>    154 6.274238e-02 6.274238e-02 5.577700e-02 6.149370e-02 6.034711e-02
#>    157 2.662594e-02 2.662594e-02 2.363581e-02 2.600406e-02 2.549387e-02
#>    160 1.112176e-02 1.112176e-02 9.861432e-03 1.082715e-02 1.060283e-02
#>    163 4.576680e-03 4.576680e-03 4.054418e-03 4.442425e-03 4.345005e-03
#>    166 1.856973e-03 1.856973e-03 1.643958e-03 1.797700e-03 1.755923e-03
#>    169 7.435249e-04 7.435249e-04 6.579137e-04 7.180451e-04 7.003554e-04
#>    172 2.940102e-04 2.940102e-04 2.600720e-04 2.833060e-04 2.759098e-04
#>    175 1.149037e-04 1.149037e-04 1.016206e-04 1.104965e-04 1.074421e-04
#>    178 4.441429e-05 4.441429e-05 3.927688e-05 4.263186e-05 4.138574e-05
#>    181 1.699131e-05 1.699131e-05 1.502622e-05 1.628188e-05 1.577940e-05
#>    184 6.437683e-06 6.437683e-06 5.693720e-06 6.159360e-06 5.959005e-06
#>    187 2.417149e-06 2.417149e-06 2.138177e-06 2.309378e-06 2.230344e-06
#>    190 8.999174e-07 8.999174e-07 7.962349e-07 8.586801e-07 8.278220e-07
#>    193 3.324010e-07 3.324010e-07 2.941831e-07 3.167911e-07 3.048584e-07
#>    196 1.218854e-07 1.218854e-07 1.079062e-07 1.160363e-07 1.114646e-07
#>    199 4.438275e-08 4.438275e-08 3.930540e-08 4.221008e-08 4.047334e-08
#>    202 1.606010e-08 1.606010e-08 1.422818e-08 1.526002e-08 1.460560e-08
#>    205 5.774043e-09 5.774043e-09 5.117078e-09 5.481344e-09 5.236740e-09
#>    208 2.065806e-09 2.065806e-09 1.831534e-09 1.959626e-09 1.868781e-09
#>    211 7.366122e-10 7.366122e-10 6.535341e-10 6.985018e-10 6.649258e-10
#>    214 2.605897e-10 2.605897e-10 2.312207e-10 2.468285e-10 2.345599e-10
#>    217 9.220148e-11 9.220148e-11 8.187506e-11 8.737690e-11 8.288617e-11
#>    220 3.225726e-11 3.225726e-11 2.863409e-11 3.050226e-11 2.889105e-11
#>    223 1.115817e-11 1.115817e-11 9.904639e-12 1.053465e-11 9.954393e-12
#>    226 3.903315e-12 3.903315e-12 3.472081e-12 3.692012e-12 3.474762e-12
#>    229 1.201918e-12 1.201918e-12 1.069408e-12 1.130005e-12 1.051247e-12
#>    232 5.669832e-13 5.669832e-13 4.961411e-13 5.349961e-13 5.163937e-13
#>    235 1.641566e-13 1.641566e-13 1.474689e-13 1.523660e-13 1.463452e-13
#>    238 4.380312e-14 4.380312e-14 3.976132e-14 4.146815e-14 3.459465e-14
#>       year
#> length            6            7            8            9           10
#>    1   8.957959e-55 5.137617e-55 6.654644e-55 2.415171e-55 1.304236e-55
#>    4   1.083457e-14 6.213902e-15 8.048735e-15 2.921129e-15 1.577461e-15
#>    7   7.927511e-01 4.546628e-01 5.889150e-01 2.137350e-01 1.154207e-01
#>    10  3.309355e+05 1.897999e+05 2.458437e+05 8.922410e+04 4.818260e+04
#>    13  3.960758e+07 2.271595e+07 2.942349e+07 1.067867e+07 5.766673e+06
#>    16  9.091014e+07 5.214890e+07 6.753833e+07 2.451973e+07 1.323860e+07
#>    19  1.694620e+07 1.093682e+07 1.302583e+07 5.743624e+06 2.786312e+06
#>    22  9.233415e+06 1.893705e+07 1.175636e+07 1.565114e+07 4.921556e+06
#>    25  1.858142e+07 3.917440e+07 2.418074e+07 3.263747e+07 1.036530e+07
#>    28  1.327522e+07 2.492984e+07 1.775752e+07 2.164849e+07 8.660195e+06
#>    31  1.080676e+07 1.113887e+07 1.590200e+07 1.268143e+07 1.084813e+07
#>    34  1.269080e+07 9.623790e+06 1.929440e+07 1.351892e+07 1.457322e+07
#>    37  9.965011e+06 8.694698e+06 1.525884e+07 1.300103e+07 1.244770e+07
#>    40  6.041685e+06 7.654164e+06 9.484303e+06 1.213086e+07 9.248658e+06
#>    43  3.942419e+06 6.754721e+06 6.740499e+06 1.104059e+07 7.935646e+06
#>    46  2.816517e+06 5.195885e+06 5.626617e+06 8.608366e+06 7.268533e+06
#>    49  2.012379e+06 3.557710e+06 4.773318e+06 6.111042e+06 6.442515e+06
#>    52  1.425285e+06 2.389205e+06 3.799579e+06 4.513052e+06 5.328723e+06
#>    55  9.974596e+05 1.639196e+06 2.773052e+06 3.557130e+06 4.131690e+06
#>    58  6.920385e+05 1.135905e+06 1.899903e+06 2.802498e+06 3.132527e+06
#>    61  4.854459e+05 7.847171e+05 1.270885e+06 2.101392e+06 2.394425e+06
#>    64  3.499838e+05 5.401045e+05 8.495566e+05 1.488563e+06 1.823568e+06
#>    67  2.594998e+05 3.732042e+05 5.693188e+05 1.010959e+06 1.344771e+06
#>    70  1.956863e+05 2.611287e+05 3.813271e+05 6.701232e+05 9.454203e+05
#>    73  1.480920e+05 1.855054e+05 2.553706e+05 4.385471e+05 6.345007e+05
#>    76  1.114696e+05 1.331357e+05 1.715270e+05 2.847353e+05 4.106198e+05
#>    79  8.314910e+04 9.569571e+04 1.157342e+05 1.837806e+05 2.591330e+05
#>    82  6.142188e+04 6.836467e+04 7.826254e+04 1.181007e+05 1.608455e+05
#>    85  4.490600e+04 4.832624e+04 5.277537e+04 7.564174e+04 9.871550e+04
#>    88  3.243380e+04 3.374486e+04 3.531009e+04 4.828007e+04 6.006783e+04
#>    91  2.307110e+04 2.326451e+04 2.336232e+04 3.066540e+04 3.627971e+04
#>    94  1.610627e+04 1.582624e+04 1.526412e+04 1.934125e+04 2.175096e+04
#>    97  1.100058e+04 1.060896e+04 9.845087e+03 1.208833e+04 1.293636e+04
#>    100 7.333433e+03 6.993426e+03 6.266766e+03 7.473674e+03 7.624765e+03
#>    103 4.764449e+03 4.522783e+03 3.933538e+03 4.563991e+03 4.448674e+03
#>    106 3.014196e+03 2.863123e+03 2.430964e+03 2.748959e+03 2.566496e+03
#>    109 1.856222e+03 1.770829e+03 1.476280e+03 1.630488e+03 1.462447e+03
#>    112 1.112657e+03 1.068590e+03 8.791251e+02 9.507111e+02 8.221501e+02
#>    115 6.492545e+02 6.285637e+02 5.124045e+02 5.440186e+02 4.554236e+02
#>    118 3.688828e+02 3.602307e+02 2.918895e+02 3.050251e+02 2.482583e+02
#>    121 2.041360e+02 2.011156e+02 1.623430e+02 1.673656e+02 1.329997e+02
#>    124 1.100742e+02 1.093969e+02 8.810933e+01 8.978836e+01 6.994272e+01
#>    127 5.786341e+01 5.799803e+01 4.665710e+01 4.707391e+01 3.607111e+01
#>    130 2.967117e+01 2.998473e+01 2.410990e+01 2.411490e+01 1.823065e+01
#>    133 1.485170e+01 1.512702e+01 1.216290e+01 1.207277e+01 9.026123e+00
#>    136 7.262112e+00 7.452560e+00 5.993852e+00 5.909096e+00 4.377359e+00
#>    139 3.471826e+00 3.588581e+00 2.887512e+00 2.829340e+00 2.079702e+00
#>    142 1.624227e+00 1.690423e+00 1.360982e+00 1.326216e+00 9.683355e-01
#>    145 7.442694e-01 7.797039e-01 6.281738e-01 6.090629e-01 4.420955e-01
#>    148 3.343628e-01 3.524851e-01 2.841904e-01 2.742886e-01 1.980408e-01
#>    151 1.474088e-01 1.563316e-01 1.261396e-01 1.212393e-01 8.710881e-02
#>    154 6.383482e-02 6.808702e-02 5.498157e-02 5.264599e-02 3.765153e-02
#>    157 2.717861e-02 2.914771e-02 2.355662e-02 2.247860e-02 1.600568e-02
#>    160 1.138753e-02 1.227636e-02 9.929750e-03 9.445923e-03 6.697301e-03
#>    163 4.699498e-03 5.091568e-03 4.121751e-03 3.909945e-03 2.760719e-03
#>    166 1.911911e-03 2.081275e-03 1.686243e-03 1.595572e-03 1.122015e-03
#>    169 7.674302e-04 8.392065e-04 6.804826e-04 6.424467e-04 4.499638e-04
#>    172 3.041667e-04 3.340574e-04 2.710950e-04 2.554316e-04 1.781956e-04
#>    175 1.191291e-04 1.313779e-04 1.067010e-04 1.003590e-04 6.974013e-05
#>    178 4.613968e-05 5.108510e-05 4.152199e-05 3.899374e-05 2.699280e-05
#>    181 1.768415e-05 1.965366e-05 1.598659e-05 1.499302e-05 1.033930e-05
#>    184 6.711717e-06 7.486195e-06 6.093852e-06 5.708503e-06 3.921900e-06
#>    187 2.524056e-06 2.825056e-06 2.301260e-06 2.153617e-06 1.474148e-06
#>    190 9.411072e-07 1.056826e-06 8.614664e-07 8.055301e-07 5.493891e-07
#>    193 3.480912e-07 3.921351e-07 3.198560e-07 2.988815e-07 2.031159e-07
#>    196 1.277993e-07 1.444060e-07 1.178630e-07 1.100752e-07 7.454730e-08
#>    199 4.659097e-08 5.279951e-08 4.312038e-08 4.025321e-08 2.716668e-08
#>    202 1.687725e-08 1.917974e-08 1.567252e-08 1.462592e-08 9.838122e-09
#>    205 6.074188e-09 6.921893e-09 5.659482e-09 5.280092e-09 3.539563e-09
#>    208 2.175151e-09 2.485090e-09 2.032861e-09 1.896392e-09 1.267252e-09
#>    211 7.760700e-10 8.887527e-10 7.272263e-10 6.784682e-10 4.520703e-10
#>    214 2.748165e-10 3.154501e-10 2.583214e-10 2.410320e-10 1.600356e-10
#>    217 9.728025e-11 1.118668e-10 9.168094e-11 8.548801e-11 5.662396e-11
#>    220 3.407049e-11 3.930291e-11 3.219978e-11 3.004684e-11 1.983661e-11
#>    223 1.182145e-11 1.369811e-11 1.122500e-11 1.044467e-11 6.888508e-12
#>    226 4.132947e-12 4.785612e-12 3.921608e-12 3.667780e-12 2.417806e-12
#>    229 1.275789e-12 1.510230e-12 1.240068e-12 1.157551e-12 7.405439e-13
#>    232 5.955102e-13 6.852791e-13 5.555744e-13 5.113109e-13 3.447951e-13
#>    235 1.796929e-13 2.065511e-13 1.743235e-13 1.551999e-13 1.018051e-13
#>    238 4.584183e-14 5.883548e-14 4.797812e-14 4.797721e-14 2.744839e-14
#>       year
#> length           11           12           13           14           15
#>    1   7.163014e-56 1.246662e-55 8.121278e-56 3.829339e-56 1.927499e-56
#>    4   8.663603e-16 1.507826e-15 9.822615e-16 4.631552e-16 2.331293e-16
#>    7   6.339041e-02 1.103256e-01 7.187075e-02 3.388844e-02 1.705776e-02
#>    10  2.646245e+04 4.605564e+04 3.000258e+04 1.414679e+04 7.120793e+03
#>    13  3.167124e+06 5.512109e+06 3.590820e+06 1.693141e+06 8.522430e+05
#>    16  7.271143e+06 1.265226e+07 8.243387e+06 3.887148e+06 1.956600e+06
#>    19  1.574457e+06 2.418344e+06 1.723683e+06 8.421770e+05 4.243306e+05
#>    22  3.197208e+06 1.957468e+06 2.935995e+06 1.714584e+06 8.677829e+05
#>    25  6.688239e+06 4.024987e+06 6.085546e+06 3.589339e+06 1.818536e+06
#>    28  4.932821e+06 3.102045e+06 4.027400e+06 2.673783e+06 1.375451e+06
#>    31  4.555049e+06 3.234933e+06 2.337315e+06 2.511328e+06 1.363556e+06
#>    34  6.209226e+06 4.343954e+06 2.543470e+06 3.146553e+06 1.829176e+06
#>    37  7.190656e+06 4.378547e+06 2.691251e+06 2.700256e+06 1.898559e+06
#>    40  8.324829e+06 4.572882e+06 2.978382e+06 2.095152e+06 1.935495e+06
#>    43  8.715860e+06 5.420048e+06 3.392062e+06 1.999588e+06 1.919349e+06
#>    46  7.696930e+06 6.330145e+06 3.765153e+06 2.195913e+06 1.707151e+06
#>    49  6.365235e+06 6.759400e+06 4.277030e+06 2.523566e+06 1.532733e+06
#>    52  5.377725e+06 6.432798e+06 4.861293e+06 2.935854e+06 1.551048e+06
#>    55  4.575997e+06 5.590779e+06 5.192596e+06 3.399753e+06 1.716731e+06
#>    58  3.764390e+06 4.643591e+06 5.063773e+06 3.811857e+06 1.947773e+06
#>    61  2.958488e+06 3.773244e+06 4.537528e+06 4.006262e+06 2.181440e+06
#>    64  2.249738e+06 2.989025e+06 3.813692e+06 3.881923e+06 2.349560e+06
#>    67  1.679403e+06 2.290282e+06 3.057883e+06 3.474084e+06 2.383041e+06
#>    70  1.231487e+06 1.697609e+06 2.356336e+06 2.903278e+06 2.250142e+06
#>    73  8.779066e+05 1.222344e+06 1.748024e+06 2.291704e+06 1.975157e+06
#>    76  6.023878e+05 8.561868e+05 1.250008e+06 1.722200e+06 1.619054e+06
#>    79  3.965879e+05 5.816902e+05 8.634485e+05 1.237690e+06 1.247118e+06
#>    82  2.513084e+05 3.816967e+05 5.770426e+05 8.529393e+05 9.079386e+05
#>    85  1.542506e+05 2.413518e+05 3.731821e+05 5.648438e+05 6.277883e+05
#>    88  9.232568e+04 1.471799e+05 2.333959e+05 3.601528e+05 4.140169e+05
#>    91  5.419152e+04 8.685230e+04 1.411134e+05 2.214969e+05 2.614649e+05
#>    94  3.131898e+04 4.982987e+04 8.254272e+04 1.316175e+05 1.587475e+05
#>    97  1.786857e+04 2.793106e+04 4.680926e+04 7.570483e+04 9.301369e+04
#>    100 1.007977e+04 1.536105e+04 2.581480e+04 4.224093e+04 5.278003e+04
#>    103 5.626458e+03 8.315790e+03 1.389413e+04 2.292124e+04 2.909774e+04
#>    106 3.108519e+03 4.441009e+03 7.323629e+03 1.212949e+04 1.562908e+04
#>    109 1.699575e+03 2.342559e+03 3.791802e+03 6.277208e+03 8.198695e+03
#>    112 9.191536e+02 1.221084e+03 1.932702e+03 3.185186e+03 4.209105e+03
#>    115 4.913285e+02 6.289850e+02 9.712253e+02 1.588132e+03 2.118436e+03
#>    118 2.593455e+02 3.200595e+02 4.815521e+02 7.793341e+02 1.046707e+03
#>    121 1.350330e+02 1.608045e+02 2.356333e+02 3.767933e+02 5.082625e+02
#>    124 6.927466e+01 7.972505e+01 1.137768e+02 1.795847e+02 2.427458e+02
#>    127 3.498063e+01 3.898286e+01 5.419694e+01 8.439321e+01 1.140941e+02
#>    130 1.737035e+01 1.878928e+01 2.546021e+01 3.910265e+01 5.279511e+01
#>    133 8.476442e+00 8.923092e+00 1.179227e+01 1.786121e+01 2.405825e+01
#>    136 4.062935e+00 4.173942e+00 5.383980e+00 8.042058e+00 1.079866e+01
#>    139 1.912433e+00 1.922697e+00 2.422976e+00 3.569004e+00 4.775292e+00
#>    142 8.839905e-01 8.721074e-01 1.074861e+00 1.561217e+00 2.080902e+00
#>    145 4.013308e-01 3.895261e-01 4.700823e-01 6.732467e-01 8.937984e-01
#>    148 1.790192e-01 1.713456e-01 2.027280e-01 2.862738e-01 3.785291e-01
#>    151 7.849521e-02 7.424811e-02 8.623879e-02 1.200674e-01 1.581207e-01
#>    154 3.385160e-02 3.170429e-02 3.619905e-02 4.969074e-02 6.517588e-02
#>    157 1.436760e-02 1.334588e-02 1.499939e-02 2.030150e-02 2.652100e-02
#>    160 6.005582e-03 5.540824e-03 6.137960e-03 8.192105e-03 1.065881e-02
#>    163 2.474002e-03 2.269972e-03 2.481709e-03 3.266648e-03 4.233158e-03
#>    166 1.005155e-03 9.181640e-04 9.918931e-04 1.287895e-03 1.662208e-03
#>    169 4.030591e-04 3.668747e-04 3.920858e-04 5.023012e-04 6.456597e-04
#>    172 1.596312e-04 1.448981e-04 1.533620e-04 1.939053e-04 2.482293e-04
#>    175 6.248629e-05 5.659856e-05 5.938701e-05 7.412908e-05 9.450691e-05
#>    178 2.419171e-05 2.187749e-05 2.277838e-05 2.807969e-05 3.565079e-05
#>    181 9.269338e-06 8.373049e-06 8.658054e-06 1.054442e-05 1.333177e-05
#>    184 3.517270e-06 3.174707e-06 3.262812e-06 3.927224e-06 4.944650e-06
#>    187 1.322543e-06 1.193184e-06 1.219738e-06 1.451559e-06 1.819919e-06
#>    190 4.930662e-07 4.447414e-07 4.524978e-07 5.326178e-07 6.650092e-07
#>    193 1.823572e-07 1.644770e-07 1.666484e-07 1.940860e-07 2.412919e-07
#>    196 6.695252e-08 6.040027e-08 6.098568e-08 7.031768e-08 8.706663e-08
#>    199 2.440636e-08 2.202218e-08 2.216365e-08 2.530265e-08 3.119255e-08
#>    202 8.841442e-09 7.981027e-09 8.011149e-09 9.061440e-09 1.112460e-08
#>    205 3.181251e-09 2.872105e-09 2.875313e-09 3.220787e-09 3.936827e-09
#>    208 1.139296e-09 1.029207e-09 1.028468e-09 1.142395e-09 1.390776e-09
#>    211 4.067785e-10 3.682653e-10 3.678035e-10 4.062060e-10 4.931474e-10
#>    214 1.438907e-10 1.300646e-10 1.296185e-10 1.417013e-10 1.708900e-10
#>    217 5.097161e-11 4.627054e-11 4.628925e-11 5.023884e-11 6.068520e-11
#>    220 1.785240e-11 1.612007e-11 1.598311e-11 1.719577e-11 2.055392e-11
#>    223 6.196984e-12 5.596263e-12 5.483199e-12 5.780629e-12 6.910749e-12
#>    226 2.154176e-12 1.954387e-12 1.931094e-12 2.053864e-12 2.447409e-12
#>    229 6.757474e-13 6.092416e-13 6.000502e-13 5.919943e-13 6.810998e-13
#>    232 3.226514e-13 2.781459e-13 2.677208e-13 2.888151e-13 3.630665e-13
#>    235 8.989579e-14 8.859830e-14 8.073535e-14 7.845254e-14 8.858482e-14
#>    238 2.475777e-14 2.198558e-14 2.440838e-14 2.089630e-14 2.012338e-14
#>       year
#> length           16           17           18           19           20
#>    1   1.145233e-56 1.262043e-56 1.046294e-56 4.905889e-57 1.321905e-56
#>    4   1.385149e-16 1.526430e-16 1.265484e-16 5.933631e-17 1.598832e-16
#>    7   1.013495e-02 1.116868e-02 9.259374e-03 4.341557e-03 1.169844e-02
#>    10  4.230854e+03 4.662389e+03 3.865343e+03 1.812391e+03 4.883536e+03
#>    13  5.063643e+05 5.580120e+05 4.626186e+05 2.169137e+05 5.844797e+05
#>    16  1.162447e+06 1.280878e+06 1.061946e+06 4.980125e+05 1.341522e+06
#>    19  2.424289e+05 2.499735e+05 2.119257e+05 1.100987e+05 2.479239e+05
#>    22  4.070009e+05 2.559038e+05 2.646243e+05 2.443287e+05 1.122177e+05
#>    25  8.504997e+05 5.277413e+05 5.459758e+05 5.098186e+05 2.247570e+05
#>    28  6.435848e+05 3.821365e+05 3.685405e+05 3.547189e+05 1.751221e+05
#>    31  6.389511e+05 3.298693e+05 2.367362e+05 2.608462e+05 1.872519e+05
#>    34  8.581633e+05 4.248065e+05 2.643132e+05 3.015222e+05 2.464257e+05
#>    37  8.987725e+05 4.441957e+05 2.539081e+05 2.617731e+05 2.229943e+05
#>    40  9.587211e+05 4.758884e+05 2.454295e+05 2.072525e+05 1.841198e+05
#>    43  1.063024e+06 5.348800e+05 2.617338e+05 1.880157e+05 1.621526e+05
#>    46  1.111611e+06 5.839019e+05 2.815414e+05 1.825492e+05 1.384434e+05
#>    49  1.107789e+06 6.344695e+05 3.069342e+05 1.855450e+05 1.184660e+05
#>    52  1.076394e+06 6.828098e+05 3.399899e+05 1.980634e+05 1.099855e+05
#>    55  1.060483e+06 7.126322e+05 3.762677e+05 2.178013e+05 1.111562e+05
#>    58  1.103406e+06 7.261849e+05 4.097947e+05 2.424207e+05 1.187998e+05
#>    61  1.207800e+06 7.437362e+05 4.365540e+05 2.692142e+05 1.312870e+05
#>    64  1.340227e+06 7.832687e+05 4.594350e+05 2.953081e+05 1.473229e+05
#>    67  1.452698e+06 8.434049e+05 4.863047e+05 3.196448e+05 1.652565e+05
#>    70  1.498283e+06 9.027264e+05 5.209442e+05 3.434417e+05 1.835910e+05
#>    73  1.447365e+06 9.318377e+05 5.565315e+05 3.673545e+05 2.014210e+05
#>    76  1.300444e+06 9.083688e+05 5.779377e+05 3.880054e+05 2.177327e+05
#>    79  1.086283e+06 8.271374e+05 5.704135e+05 3.978889e+05 2.302333e+05
#>    82  8.465916e+05 7.010700e+05 5.278299e+05 3.892507e+05 2.352727e+05
#>    85  6.189305e+05 5.537488e+05 4.553474e+05 3.587697e+05 2.293732e+05
#>    88  4.270061e+05 4.091355e+05 3.660878e+05 3.095766e+05 2.112483e+05
#>    91  2.796229e+05 2.841871e+05 2.750294e+05 2.497008e+05 1.827670e+05
#>    94  1.747440e+05 1.865892e+05 1.938854e+05 1.885537e+05 1.482768e+05
#>    97  1.047278e+05 1.164272e+05 1.288790e+05 1.337284e+05 1.129009e+05
#>    100 6.046202e+04 6.939436e+04 8.118032e+04 8.944601e+04 8.088415e+04
#>    103 3.375899e+04 3.969553e+04 4.869161e+04 5.667094e+04 5.470835e+04
#>    106 1.829367e+04 2.188595e+04 2.793693e+04 3.416181e+04 3.506930e+04
#>    109 9.650116e+03 1.167517e+04 1.539804e+04 1.967678e+04 2.138891e+04
#>    112 4.968304e+03 6.046639e+03 8.184656e+03 1.087291e+04 1.245981e+04
#>    115 2.501924e+03 3.049403e+03 4.210291e+03 5.785431e+03 6.958148e+03
#>    118 1.234577e+03 1.501369e+03 2.102692e+03 2.974480e+03 3.737972e+03
#>    121 5.978450e+02 7.232562e+02 1.022393e+03 1.482260e+03 1.937895e+03
#>    124 2.844536e+02 3.415396e+02 4.852041e+02 7.179549e+02 9.724267e+02
#>    127 1.331091e+02 1.583490e+02 2.252421e+02 3.388631e+02 4.735727e+02
#>    130 6.130696e+01 7.217424e+01 1.024766e+02 1.562003e+02 2.243803e+02
#>    133 2.780857e+01 3.237527e+01 4.576892e+01 7.045884e+01 1.036614e+02
#>    136 1.242856e+01 1.430543e+01 2.009596e+01 3.115658e+01 4.679046e+01
#>    139 5.475248e+00 6.231217e+00 8.685093e+00 1.352689e+01 2.067254e+01
#>    142 2.378333e+00 2.677365e+00 3.698532e+00 5.773951e+00 8.954434e+00
#>    145 1.018969e+00 1.135391e+00 1.553363e+00 2.426035e+00 3.808308e+00
#>    148 4.307275e-01 4.754438e-01 6.439521e-01 1.004459e+00 1.592411e+00
#>    151 1.796953e-01 1.966814e-01 2.636809e-01 4.101943e-01 6.554383e-01
#>    154 7.401389e-02 8.041176e-02 1.067144e-01 1.653627e-01 2.658506e-01
#>    157 3.010887e-02 3.250448e-02 4.271058e-02 6.585815e-02 1.063668e-01
#>    160 1.210195e-02 1.299589e-02 1.691396e-02 2.593042e-02 4.201768e-02
#>    163 4.808191e-03 5.141379e-03 6.630808e-03 1.009993e-02 1.640134e-02
#>    166 1.889164e-03 2.013427e-03 2.574550e-03 3.894012e-03 6.331142e-03
#>    169 7.343825e-04 7.808161e-04 9.904741e-04 1.486932e-03 2.418524e-03
#>    172 2.825845e-04 2.999811e-04 3.777271e-04 5.626406e-04 9.148974e-04
#>    175 1.076857e-04 1.142212e-04 1.428521e-04 2.110752e-04 3.429391e-04
#>    178 4.065986e-05 4.312089e-05 5.359756e-05 7.854517e-05 1.274489e-04
#>    181 1.521881e-05 1.614696e-05 1.995837e-05 2.900541e-05 4.698587e-05
#>    184 5.649367e-06 5.999619e-06 7.378713e-06 1.063411e-05 1.719216e-05
#>    187 2.080988e-06 2.213085e-06 2.709657e-06 3.872478e-06 6.246603e-06
#>    190 7.609067e-07 8.107113e-07 9.886672e-07 1.401292e-06 2.254790e-06
#>    193 2.762917e-07 2.949477e-07 3.584754e-07 5.039047e-07 8.088702e-07
#>    196 9.973512e-08 1.067547e-07 1.293528e-07 1.803497e-07 2.885906e-07
#>    199 3.575386e-08 3.835608e-08 4.635990e-08 6.411751e-08 1.023711e-07
#>    202 1.275655e-08 1.372467e-08 1.655164e-08 2.271989e-08 3.615559e-08
#>    205 4.513015e-09 4.868862e-09 5.856326e-09 7.967159e-09 1.266228e-08
#>    208 1.594633e-09 1.726074e-09 2.072834e-09 2.800635e-09 4.436011e-09
#>    211 5.652807e-10 6.169338e-10 7.372982e-10 1.000525e-09 1.568437e-09
#>    214 1.959071e-10 2.131508e-10 2.555291e-10 3.402040e-10 5.343265e-10
#>    217 6.965826e-11 7.605627e-11 9.274434e-11 1.202364e-10 1.945066e-10
#>    220 2.358017e-11 2.579977e-11 3.062061e-11 4.049980e-11 6.241576e-11
#>    223 7.953658e-12 8.687808e-12 1.027945e-11 1.307156e-11 2.076322e-11
#>    226 2.776200e-12 3.042463e-12 3.652483e-12 4.641874e-12 7.550424e-12
#>    229 7.918841e-13 8.954424e-13 1.056806e-12 1.281305e-12 1.883193e-12
#>    232 4.402880e-13 4.524030e-13 5.096153e-13 6.818100e-13 1.027107e-12
#>    235 1.030943e-13 1.258548e-13 1.421324e-13 1.663919e-13 2.496134e-13
#>    238 2.077251e-14 2.733284e-14 3.756082e-14 3.810159e-14 5.097985e-14
#> 
#> $sim_length
#> function (age = NULL, length_age_key = FALSE) 
#> {
#>     pred_length <- Linf - (Linf - L0) * exp(-K * age)
#>     if (length_age_key) {
#>         breaks <- seq(0, ceiling(max(pred_length)) * 10, length_group)
#>         lak <- matrix(NA, ncol = length(pred_length), nrow = length(breaks) - 
#>             1, dimnames = list(length = group_lengths(breaks, 
#>             length_group)[-length(breaks)], age = age))
#>         for (i in seq_along(breaks)[-1]) {
#>             for (j in seq_along(pred_length)) {
#>                 lak[i - 1, j] <- stats::pnorm(log(breaks[i]), 
#>                   log(pred_length[j]), sd = log_sd) - stats::pnorm(log(breaks[i - 
#>                   1]), log(pred_length[j]), sd = log_sd)
#>             }
#>         }
#>         lak <- lak[rowSums(lak) > 0, ]
#>         if (plot) 
#>             graphics::image(x = as.numeric(colnames(lak)), y = as.numeric(rownames(lak)), 
#>                 z = t(lak), xlab = "Age", ylab = "Length", main = "P(Length | Age)", 
#>                 col = viridis::viridis(100))
#>         return(lak)
#>     }
#>     else {
#>         log_length <- stats::rnorm(length(age), log(pred_length), 
#>             sd = log_sd)
#>         length <- round(exp(log_length), digits)
#>         if (plot) 
#>             plot(age, length)
#>         return(length)
#>     }
#> }
#> <bytecode: 0x55d5ac817108>
#> <environment: 0x55d5addafd90>
#> 
Za_dev <- c(-0.2, -0.1, 0, 0.1, 0.2, 0.3, 0.3, 0.2, 0.1, 0)
Zy_dev <- c(-0.2, -0.2, -0.2, -0.2, -0.2, 2, 2, 2, 2, 0.2, 0.2, 0.2, 0.2, 0.2, 0, 0, 0, 0, 0, 0)
Z_mat <- outer(Za_dev, Zy_dev, "+") + 0.5
sim_abundance(ages = 1:10, years = 1:20,
              Z = sim_Z(log_mean = log(Z_mat), plot = TRUE))

#> $ages
#>  [1]  1  2  3  4  5  6  7  8  9 10
#> 
#> $lengths
#>  [1]   1   4   7  10  13  16  19  22  25  28  31  34  37  40  43  46  49  52  55
#> [20]  58  61  64  67  70  73  76  79  82  85  88  91  94  97 100 103 106 109 112
#> [39] 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169
#> [58] 172 175 178
#> 
#> $years
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $R
#>        1        2        3        4        5        6        7        8 
#> 18930216 42177231 42248101 21357632 12659348 20985025 14687421 16027451 
#>        9       10       11       12       13       14       15       16 
#> 15793094 18154384 25918951 40041072 20271193 10257009  6711630  3955270 
#>       17       18       19       20 
#>  5948252  3359923  2950939  1205509 
#> 
#> $N0
#>  [1] 18930216 17739142 15893849 13320111  9987333  6776283  4201419  2711731
#>  [9]  1861503  1352050
#> 
#> $Z
#>     year
#> age           1          2          3          4          5        6        7
#>   1  0.06498575 0.03513255 0.07320156 0.06407158 0.06758933 1.725206 3.326751
#>   2  0.10984143 0.07447006 0.15203619 0.12843773 0.13213119 2.804685 5.464193
#>   3  0.17665719 0.10724262 0.15817761 0.19846460 0.15106806 2.753886 4.187559
#>   4  0.28795745 0.16334015 0.18028574 0.26628862 0.16973439 2.171618 4.180683
#>   5  0.38788887 0.29836498 0.32600061 0.49615579 0.26806488 2.814761 6.591889
#>   6  0.47800638 0.40513414 0.32945621 0.56034002 0.49168711 1.802634 4.897711
#>   7  0.43783510 0.36214829 0.39473685 0.68861891 0.58684710 2.013343 4.314968
#>   8  0.37620314 0.25195984 0.20770431 0.35925479 0.35376139 1.759957 3.709472
#>   9  0.31976231 0.14396120 0.21342874 0.32838597 0.29000255 1.544200 4.156409
#>   10 0.25065123 0.11853537 0.14919778 0.26352952 0.25414713 1.930230 4.308570
#>     year
#> age         8        9        10        11        12        13        14
#>   1  2.623237 3.862195 0.7612495 0.6813028 0.2973969 0.2004983 0.5441864
#>   2  3.567549 5.155966 0.7800170 0.5923335 0.2593687 0.2709471 0.5576180
#>   3  2.237163 4.123695 0.6340584 0.5805593 0.2349043 0.2657620 0.4174881
#>   4  2.361202 5.292371 0.9137507 0.8462492 0.2863158 0.2521175 0.2997271
#>   5  2.693766 5.744003 1.2241372 1.0740757 0.3614188 0.3241097 0.5041453
#>   6  2.124376 3.251020 0.8205818 1.2368417 0.4588548 0.2948186 0.5614836
#>   7  2.170959 3.230231 1.1877230 1.3660071 0.4547890 0.3628085 0.5600349
#>   8  2.024480 2.703867 0.9813606 1.0092420 0.4182668 0.4684818 0.7981111
#>   9  2.397754 3.222906 1.0002720 0.8749280 0.2826204 0.3259227 0.7901227
#>   10 1.700722 2.076511 0.6811151 0.5806319 0.3400246 0.4000005 0.8728025
#>     year
#> age         15        16        17        18        19        20
#>   1  0.2088844 0.2047386 0.2234322 0.2356348 0.3778939 0.2338191
#>   2  0.2492142 0.1940438 0.2536129 0.2380377 0.4302435 0.2607520
#>   3  0.3367355 0.2357774 0.3162318 0.2754187 0.4972888 0.3713821
#>   4  0.3880707 0.3177254 0.3371306 0.3651432 1.0404782 0.6162301
#>   5  0.7063658 0.5045761 0.4305644 0.4355164 1.4695748 0.8218089
#>   6  1.0129414 0.6513329 0.6065822 0.6214582 1.5218568 0.9636354
#>   7  0.9198338 0.6493769 0.5601522 0.6288560 1.6359754 1.2671234
#>   8  0.9479613 0.5003260 0.7461876 0.7988216 1.0207217 0.8354175
#>   9  1.1001309 0.7058767 0.5711939 0.7547238 0.7865478 0.6493038
#>   10 0.7032600 0.5158823 0.4859872 0.4576317 0.4554345 0.3825941
#> 
#> $N
#>     year
#> age         1        2        3        4        5        6          7
#>   1  18930216 42177231 42248101 21357632 12659348 20985025 14687421.3
#>   2  17739142 17739142 40721165 39265954 20032132 11831987  3738194.0
#>   3  15893849 15893849 16466097 34977737 34533163 17552675   716140.6
#>   4  13320111 13320111 14277567 14057077 28681353 29691240  1117753.2
#>   5   9987333  9987333 11312800 11922219 10770785 24203876  3384593.7
#>   6   6776283  6776283  7410905  8165633  7259043  8238122  1450272.6
#>   7   4201419  4201419  4519017  5330774  4662698  4439585  1358170.2
#>   8   2711731  2711731  2924940  3045173  2677484  2592823   592869.1
#>   9   1861503  1861503  2107763  2376360  2126129  1879707   446101.2
#>   10  1352050  1352050  1611915  1702672  1711181  1590901   401284.6
#>     year
#> age             8            9           10           11           12
#>   1  16027450.936 15793094.389 1.815438e+07 2.591895e+07 4.004107e+07
#>   2    527419.133  1163073.568 3.319994e+05 8.479594e+06 1.311389e+07
#>   3     15834.085    14886.383 6.705012e+03 1.521879e+05 4.689514e+06
#>   4     10873.379     1690.462 2.409301e+02 3.556571e+03 8.516213e+04
#>   5     17088.275     1025.434 8.502716e+00 9.661715e+01 1.525844e+03
#>   6      4641.791     1155.608 3.283362e+00 2.499894e+00 3.300571e+01
#>   7     10824.325      554.729 4.476209e+01 1.445255e+00 7.257184e-01
#>   8     18154.622     1234.711 2.193863e+01 1.364862e+01 3.687187e-01
#>   9     14519.626     2397.544 8.265908e+01 8.222617e+00 4.974857e+00
#>   10     6987.596     1320.153 9.551601e+01 3.040031e+01 3.427944e+00
#>     year
#> age            13           14           15           16           17
#>   1  2.027119e+07 1.025701e+07 6.711630e+06 3.955270e+06 5.948252e+06
#>   2  2.974047e+07 1.658838e+07 5.952283e+06 5.446414e+06 3.222993e+06
#>   3  1.011787e+07 2.268177e+07 9.498031e+06 4.639287e+06 4.485785e+06
#>   4  3.707748e+06 7.756575e+06 1.494047e+07 6.782522e+06 3.664835e+06
#>   5  6.395892e+04 2.881489e+06 5.747781e+06 1.013508e+07 4.936337e+06
#>   6  1.063036e+03 4.625323e+04 1.740482e+06 2.836151e+06 6.119172e+06
#>   7  2.085984e+01 7.916073e+02 2.638110e+04 6.320547e+05 1.478629e+06
#>   8  4.605278e-01 1.451260e+01 4.521575e+02 1.051512e+04 3.301671e+05
#>   9  2.426857e-01 2.882682e-01 6.533261e+00 1.752247e+02 6.375662e+03
#>   10 3.750076e+00 1.751854e-01 1.308130e-01 2.174449e+00 8.650417e+01
#>     year
#> age           18         19        20
#>   1  3359922.524 2950939.42 1205509.0
#>   2  4757227.936 2654571.16 2022288.2
#>   3  2501016.960 3749518.36 1726402.3
#>   4  3269646.431 1898907.48 2280372.1
#>   5  2616016.115 2269452.50  670856.9
#>   6  3209320.392 1692380.62  522026.9
#>   7  3336240.372 1723920.48  369457.1
#>   8   844477.561 1778888.11  335754.7
#>   9   156555.631  379895.63  640995.3
#>   10    3601.297   73603.13  173009.9
#> 
#> $N_at_length
#>       year
#> length            1            2            3            4            5
#>    1   1.150165e-55 2.562611e-55 2.566917e-55 1.297651e-55 7.691588e-56
#>    4   1.391115e-15 3.099456e-15 3.104664e-15 1.569497e-15 9.302909e-16
#>    7   1.017860e-01 2.267830e-01 2.271641e-01 1.148380e-01 6.806812e-02
#>    10  4.249076e+04 9.467100e+04 9.483008e+04 4.793934e+04 2.841517e+04
#>    13  5.085452e+06 1.133058e+07 1.134962e+07 5.737558e+06 3.400833e+06
#>    16  1.167433e+07 2.600760e+07 2.605471e+07 1.317418e+07 7.808275e+06
#>    19  2.408168e+06 4.956296e+06 5.395751e+06 3.078596e+06 1.763887e+06
#>    22  3.789352e+06 3.857157e+06 8.693130e+06 8.327864e+06 4.255408e+06
#>    25  7.884037e+06 7.884537e+06 1.798908e+07 1.744990e+07 8.993362e+06
#>    28  5.671738e+06 5.671740e+06 1.175375e+07 1.253903e+07 7.453744e+06
#>    31  4.764210e+06 4.764210e+06 6.295839e+06 1.043518e+07 9.225036e+06
#>    34  5.917637e+06 5.917637e+06 6.300108e+06 1.248361e+07 1.271771e+07
#>    37  5.611643e+06 5.611643e+06 5.890722e+06 1.031346e+07 1.209321e+07
#>    40  5.133519e+06 5.133519e+06 5.466247e+06 7.236283e+06 1.074417e+07
#>    43  5.005340e+06 5.005340e+06 5.411938e+06 5.882892e+06 9.665470e+06
#>    46  4.684922e+06 4.684922e+06 5.138945e+06 5.324200e+06 7.793334e+06
#>    49  4.242230e+06 4.242230e+06 4.703825e+06 4.920515e+06 5.858987e+06
#>    52  3.793717e+06 3.793717e+06 4.216250e+06 4.497524e+06 4.537520e+06
#>    55  3.328314e+06 3.328314e+06 3.680982e+06 4.000439e+06 3.708798e+06
#>    58  2.863103e+06 2.863103e+06 3.143675e+06 3.469647e+06 3.113150e+06
#>    61  2.427698e+06 2.427698e+06 2.651213e+06 2.954011e+06 2.621609e+06
#>    64  2.035467e+06 2.035467e+06 2.219979e+06 2.478286e+06 2.194999e+06
#>    67  1.685416e+06 1.685416e+06 1.844563e+06 2.050465e+06 1.822489e+06
#>    70  1.368573e+06 1.368573e+06 1.509028e+06 1.665786e+06 1.492426e+06
#>    73  1.076661e+06 1.076661e+06 1.198871e+06 1.314514e+06 1.190791e+06
#>    76  8.093438e+05 8.093438e+05 9.106473e+05 9.932626e+05 9.110149e+05
#>    79  5.744231e+05 5.744231e+05 6.526691e+05 7.091497e+05 6.585083e+05
#>    82  3.817673e+05 3.817673e+05 4.374816e+05 4.739329e+05 4.451385e+05
#>    85  2.365696e+05 2.365696e+05 2.730307e+05 2.950346e+05 2.799213e+05
#>    88  1.365317e+05 1.365317e+05 1.584932e+05 1.708716e+05 1.635374e+05
#>    91  7.347427e+04 7.347427e+04 8.569443e+04 9.218678e+04 8.888665e+04
#>    94  3.696710e+04 3.696710e+04 4.327888e+04 4.646283e+04 4.508101e+04
#>    97  1.744999e+04 1.744999e+04 2.049185e+04 2.195779e+04 2.141733e+04
#>    100 7.758580e+03 7.758580e+03 9.133581e+03 9.770076e+03 9.571893e+03
#>    103 3.262501e+03 3.262501e+03 3.848419e+03 4.110207e+03 4.041842e+03
#>    106 1.302760e+03 1.302760e+03 1.539255e+03 1.641689e+03 1.619442e+03
#>    109 4.959446e+02 4.959446e+02 5.867685e+02 6.250537e+02 6.182108e+02
#>    112 1.806694e+02 1.806694e+02 2.139954e+02 2.277146e+02 2.257232e+02
#>    115 6.320510e+01 6.320510e+01 7.493359e+01 7.966334e+01 7.911540e+01
#>    118 2.130444e+01 2.130444e+01 2.527743e+01 2.685117e+01 2.670907e+01
#>    121 6.940214e+00 6.940214e+00 8.239859e+00 8.746720e+00 8.712241e+00
#>    124 2.191277e+00 2.191277e+00 2.603059e+00 2.761501e+00 2.753798e+00
#>    127 6.723382e-01 6.723382e-01 7.990575e-01 8.472474e-01 8.457195e-01
#>    130 2.009563e-01 2.009563e-01 2.389269e-01 2.532205e-01 2.529780e-01
#>    133 5.864279e-02 5.864279e-02 6.974704e-02 7.389030e-02 7.387331e-02
#>    136 1.674274e-02 1.674274e-02 1.991886e-02 2.109486e-02 2.110324e-02
#>    139 4.685626e-03 4.685626e-03 5.575895e-03 5.903326e-03 5.908871e-03
#>    142 1.287665e-03 1.287665e-03 1.532654e-03 1.622233e-03 1.624519e-03
#>    145 3.480490e-04 3.480490e-04 4.143458e-04 4.384633e-04 4.392600e-04
#>    148 9.266758e-05 9.266758e-05 1.103370e-04 1.167361e-04 1.169897e-04
#>    151 2.433736e-05 2.433736e-05 2.898199e-05 3.065748e-05 3.073359e-05
#>    154 6.312701e-06 6.312701e-06 7.518399e-06 7.951839e-06 7.973772e-06
#>    157 1.619325e-06 1.619325e-06 1.928793e-06 2.039717e-06 2.045794e-06
#>    160 4.111536e-07 4.111536e-07 4.897815e-07 5.178906e-07 5.195476e-07
#>    163 1.033698e-07 1.033698e-07 1.231509e-07 1.302013e-07 1.306482e-07
#>    166 2.593164e-08 2.593164e-08 3.089096e-08 3.266353e-08 3.276857e-08
#>    169 6.304522e-09 6.304522e-09 7.516257e-09 7.939451e-09 7.979128e-09
#>    172 1.651184e-09 1.651184e-09 1.968544e-09 2.079380e-09 2.089772e-09
#>    175 3.002153e-10 3.002153e-10 3.579170e-10 3.780691e-10 3.799585e-10
#>    178 1.501077e-10 1.501077e-10 1.789585e-10 1.890345e-10 1.899792e-10
#>       year
#> length            6            7            8            9           10
#>    1   1.275012e-55 8.923808e-56 9.737985e-56 9.595595e-56 1.103027e-55
#>    4   1.542115e-15 1.079327e-15 1.177801e-15 1.160579e-15 1.334102e-15
#>    7   1.128345e-01 7.897288e-02 8.617810e-02 8.491798e-02 9.761441e-02
#>    10  4.710298e+04 3.296738e+04 3.597521e+04 3.544918e+04 4.074932e+04
#>    13  5.637459e+06 3.945658e+06 4.305647e+06 4.242689e+06 4.877030e+06
#>    16  1.294037e+07 9.056292e+06 9.882030e+06 9.737628e+06 1.119339e+07
#>    19  2.522440e+06 1.680120e+06 1.766691e+06 1.752943e+06 1.996156e+06
#>    22  2.552571e+06 8.294746e+05 1.577249e+05 2.907910e+05 1.228088e+05
#>    25  5.296745e+06 1.647291e+06 2.322506e+05 5.116332e+05 1.463526e+05
#>    28  4.225243e+06 1.028765e+06 1.397470e+05 3.069032e+05 8.776139e+04
#>    31  4.852025e+06 3.954818e+05 3.572067e+04 7.410328e+04 2.171275e+04
#>    34  7.014920e+06 3.060810e+05 9.286264e+03 1.296897e+04 4.515969e+03
#>    37  8.210059e+06 3.367986e+05 5.540793e+03 4.315678e+03 1.789160e+03
#>    40  9.751874e+06 4.501631e+05 4.753720e+03 1.920719e+03 7.192325e+02
#>    43  1.084179e+07 6.630876e+05 5.033438e+03 9.366873e+02 2.334066e+02
#>    46  1.047246e+07 9.046836e+05 5.516364e+03 6.168501e+02 7.654301e+01
#>    49  9.189222e+06 1.052158e+06 5.620065e+03 5.183093e+02 2.843065e+01
#>    52  7.474694e+06 1.034516e+06 5.257460e+03 4.910722e+02 1.255117e+01
#>    55  5.668036e+06 9.082958e+05 4.922282e+03 4.881795e+02 9.365505e+00
#>    58  4.143129e+06 7.651547e+05 5.136343e+03 5.047635e+02 1.177784e+01
#>    61  3.050799e+06 6.428358e+05 5.892226e+03 5.554074e+02 1.643800e+01
#>    64  2.317289e+06 5.378653e+05 6.743189e+03 6.416216e+02 2.181400e+01
#>    67  1.811621e+06 4.426159e+05 7.195432e+03 7.334722e+02 2.693674e+01
#>    70  1.432877e+06 3.557532e+05 6.984387e+03 7.837379e+02 3.060890e+01
#>    73  1.120788e+06 2.778697e+05 6.140266e+03 7.592592e+02 3.156540e+01
#>    76  8.477044e+05 2.090164e+05 4.901616e+03 6.604474e+02 2.926472e+01
#>    79  6.087858e+05 1.495801e+05 3.568944e+03 5.163342e+02 2.433246e+01
#>    82  4.101158e+05 1.007126e+05 2.381940e+03 3.647651e+02 1.819554e+01
#>    85  2.575024e+05 6.333421e+04 1.464423e+03 2.344739e+02 1.230757e+01
#>    88  1.503844e+05 3.708400e+04 8.334446e+02 1.381349e+02 7.582850e+00
#>    91  8.176354e+04 2.022072e+04 4.412248e+02 7.510482e+01 4.286399e+00
#>    94  4.149690e+04 1.029103e+04 2.183110e+02 3.793404e+01 2.238813e+00
#>    97  1.973156e+04 4.905556e+03 1.014219e+02 1.790690e+01 1.087678e+00
#>    100 8.826553e+03 2.199162e+03 4.443946e+01 7.944492e+00 4.945679e-01
#>    103 3.730459e+03 9.311666e+02 1.844370e+01 3.329621e+00 2.116742e-01
#>    106 1.495939e+03 3.739835e+02 7.280134e+00 1.324502e+00 8.572248e-02
#>    109 5.715033e+02 1.430615e+02 2.743566e+00 5.022486e-01 3.300520e-02
#>    112 2.088131e+02 5.232822e+01 9.907131e-01 1.822719e-01 1.213469e-02
#>    115 7.323317e+01 1.836896e+01 3.439599e-01 6.353927e-02 4.277288e-03
#>    118 2.473654e+01 6.209422e+00 1.151773e-01 2.134742e-02 1.450731e-03
#>    121 8.072617e+00 2.027728e+00 3.730787e-02 6.933801e-03 4.750436e-04
#>    124 2.552671e+00 6.415494e-01 1.172176e-02 2.183509e-03 1.506379e-04
#>    127 7.842314e-01 1.971893e-01 3.581309e-03 6.683949e-04 4.638773e-05
#>    130 2.346582e-01 5.902673e-02 1.066505e-03 1.993666e-04 1.390757e-05
#>    133 6.854218e-02 1.724725e-02 3.102394e-04 5.807338e-05 4.069093e-06
#>    136 1.958492e-02 4.929595e-03 8.833103e-05 1.655373e-05 1.164331e-06
#>    139 5.484870e-03 1.380911e-03 2.466129e-05 4.626233e-06 3.264722e-07
#>    142 1.508219e-03 3.798031e-04 6.763127e-06 1.269778e-06 8.986579e-08
#>    145 4.078770e-04 1.027320e-04 1.824724e-06 3.428423e-07 2.432463e-08
#>    148 1.086462e-04 2.736923e-05 4.850611e-07 9.119448e-08 6.484361e-09
#>    151 2.854516e-05 7.191879e-06 1.272155e-07 2.393029e-08 1.704800e-09
#>    154 7.406756e-06 1.866352e-06 3.295715e-08 6.202674e-09 4.426225e-10
#>    157 1.900498e-06 4.789341e-07 8.445523e-09 1.589981e-09 1.136197e-10
#>    160 4.826837e-07 1.216513e-07 2.142309e-09 4.035143e-10 2.887254e-11
#>    163 1.213895e-07 3.059719e-08 5.380380e-10 1.013819e-10 7.264632e-12
#>    166 3.044371e-08 7.672816e-09 1.351064e-10 2.544866e-11 1.821103e-12
#>    169 7.418269e-09 1.871165e-09 3.258272e-11 6.155790e-12 4.453851e-13
#>    172 1.942880e-09 4.900669e-10 8.533569e-12 1.612231e-12 1.166485e-13
#>    175 3.532509e-10 8.910308e-11 1.551558e-12 2.931329e-13 2.120882e-14
#>    178 1.766255e-10 4.455154e-11 7.757790e-13 1.465664e-13 1.060441e-14
#>       year
#> length           11           12           13           14           15
#>    1   1.574788e-55 2.432822e-55 1.231641e-55 6.231971e-56 4.077863e-56
#>    4   1.904692e-15 2.942477e-15 1.489659e-15 7.537514e-16 4.932140e-16
#>    7   1.393638e-01 2.152971e-01 1.089963e-01 5.515097e-02 3.608780e-02
#>    10  5.817767e+04 8.987618e+04 4.550072e+04 2.302288e+04 1.506492e+04
#>    13  6.962919e+06 1.075671e+07 5.445695e+06 2.755464e+06 1.803026e+06
#>    16  1.598195e+07 2.468984e+07 1.250291e+07 6.326567e+06 4.139034e+06
#>    19  3.000279e+06 4.635268e+06 2.780582e+06 1.435876e+06 8.474758e+05
#>    22  1.859828e+06 2.876588e+06 6.317915e+06 3.522602e+06 1.272966e+06
#>    25  3.728471e+06 5.790440e+06 1.312758e+07 7.415034e+06 2.668175e+06
#>    28  2.240279e+06 3.745726e+06 8.462736e+06 5.796403e+06 2.167724e+06
#>    31  5.501993e+05 1.868708e+06 4.134347e+06 6.221741e+06 2.593388e+06
#>    34  1.088647e+05 1.663190e+06 3.722278e+06 7.984883e+06 3.750157e+06
#>    37  4.077695e+04 1.143870e+06 2.927028e+06 6.481665e+06 4.257545e+06
#>    40  1.587047e+04 4.783188e+05 1.898527e+06 4.203328e+06 4.770883e+06
#>    43  4.776011e+03 1.403390e+05 1.252151e+06 2.928361e+06 4.817896e+06
#>    46  1.357558e+03 3.700531e+04 7.472838e+05 2.089711e+06 3.968402e+06
#>    49  4.296157e+02 1.071235e+04 3.517549e+05 1.387801e+06 2.852913e+06
#>    52  1.412138e+02 3.274764e+03 1.301673e+05 8.436162e+05 1.935250e+06
#>    55  4.491115e+01 9.580033e+02 4.029148e+04 4.563222e+05 1.248635e+06
#>    58  1.484390e+01 2.672955e+02 1.132155e+04 2.127879e+05 7.487321e+05
#>    61  6.650452e+00 7.422230e+01 3.093373e+03 8.492533e+04 4.102580e+05
#>    64  5.323462e+00 2.128796e+01 8.461840e+02 2.946332e+04 2.034007e+05
#>    67  6.001842e+00 6.750726e+00 2.310088e+02 9.135957e+03 9.072704e+04
#>    70  6.926006e+00 2.834083e+00 6.262034e+01 2.614340e+03 3.639788e+04
#>    73  7.348240e+00 1.779278e+00 1.712321e+01 7.115166e+02 1.320759e+04
#>    76  7.008759e+00 1.386902e+00 4.994388e+00 1.885136e+02 4.380027e+03
#>    79  5.994916e+00 1.086873e+00 1.731405e+00 4.932113e+01 1.345171e+03
#>    82  4.611256e+00 7.896683e-01 7.764645e-01 1.282927e+01 3.881433e+02
#>    85  3.205542e+00 5.228670e-01 4.232688e-01 3.328023e+00 1.067394e+02
#>    88  2.026218e+00 3.160610e-01 2.450710e-01 8.634085e-01 2.834207e+01
#>    91  1.172389e+00 1.755317e-01 1.382471e-01 2.250335e-01 7.345995e+00
#>    94  6.251897e-01 9.020509e-02 7.348255e-02 5.931973e-02 1.874104e+00
#>    97  3.093098e-01 4.318614e-02 3.649620e-02 1.594862e-02 4.733108e-01
#>    100 1.428776e-01 1.938201e-02 1.695402e-02 4.410040e-03 1.187533e-01
#>    103 6.198599e-02 8.200631e-03 7.396610e-03 1.261066e-03 2.965869e-02
#>    106 2.539568e-02 3.287856e-03 3.045516e-03 3.729282e-04 7.380961e-03
#>    109 9.875275e-03 1.254911e-03 1.189314e-03 1.133760e-04 1.831325e-03
#>    112 3.661531e-03 4.579124e-04 4.425489e-04 3.508275e-05 4.531632e-04
#>    115 1.299953e-03 1.603591e-04 1.575879e-04 1.092970e-05 1.118650e-04
#>    118 4.436203e-04 5.408459e-05 5.391252e-05 3.395800e-06 2.755395e-05
#>    121 1.460271e-04 1.762459e-05 1.778355e-05 1.044853e-06 6.773457e-06
#>    124 4.651359e-05 5.565557e-06 5.674485e-06 3.169201e-07 1.662056e-06
#>    127 1.437856e-05 1.707713e-06 1.756726e-06 9.451353e-08 4.071014e-07
#>    130 4.325080e-06 5.104038e-07 5.290862e-07 2.768094e-08 9.954460e-08
#>    133 1.269028e-06 1.489338e-07 1.554052e-07 7.959312e-09 2.427107e-08
#>    136 3.640087e-07 4.251691e-08 4.461699e-08 2.248221e-09 5.915234e-09
#>    139 1.022819e-07 1.189746e-08 1.254657e-08 6.242885e-10 1.440732e-09
#>    142 2.820602e-08 3.269189e-09 3.462249e-09 1.704877e-10 3.476516e-10
#>    145 7.646874e-09 8.835433e-10 9.391857e-10 4.593883e-11 8.622510e-11
#>    148 2.041296e-09 2.352172e-10 2.508358e-10 1.216944e-11 2.020150e-11
#>    151 5.373258e-10 6.176856e-11 6.605553e-11 3.189147e-12 4.911409e-12
#>    154 1.396541e-10 1.602083e-11 1.717480e-11 8.242651e-13 1.140658e-12
#>    157 3.588188e-11 4.108831e-12 4.414135e-12 2.121202e-13 3.055906e-13
#>    160 9.125139e-12 1.043333e-12 1.122904e-12 5.344049e-14 6.235071e-14
#>    163 2.298091e-12 2.622789e-13 2.828849e-13 1.343023e-14 1.493859e-14
#>    166 5.755948e-13 6.580294e-14 7.083205e-14 3.370420e-15 3.919612e-15
#>    169 1.417547e-13 1.598429e-14 1.748637e-14 8.168783e-16 6.099726e-16
#>    172 3.712623e-14 4.186360e-15 4.579763e-15 2.139443e-16 1.597547e-16
#>    175 6.750224e-15 7.611564e-16 8.326842e-16 3.889896e-17 2.904631e-17
#>    178 3.375112e-15 3.805782e-16 4.163421e-16 1.944948e-17 1.452316e-17
#>       year
#> length           16           17           18           19           20
#>    1   2.403150e-56 3.614049e-56 2.041427e-56 1.792937e-56 7.324452e-57
#>    4   2.906589e-16 4.371160e-16 2.469089e-16 2.168541e-16 8.858861e-17
#>    7   2.126712e-02 3.198319e-02 1.806599e-02 1.586692e-02 6.481908e-03
#>    10  8.877999e+03 1.335144e+04 7.541681e+03 6.623678e+03 2.705885e+03
#>    13  1.062552e+06 1.597950e+06 9.026165e+05 7.927464e+05 3.238504e+05
#>    16  2.439487e+06 3.667957e+06 2.072314e+06 1.819838e+06 7.435739e+05
#>    19  5.358455e+05 7.125342e+05 4.576430e+05 3.733187e+05 1.701233e+05
#>    22  1.157997e+06 6.959586e+05 1.011032e+06 5.675392e+05 4.292047e+05
#>    25  2.419274e+06 1.441202e+06 2.104680e+06 1.187280e+06 8.983066e+05
#>    28  1.726661e+06 1.131542e+06 1.409832e+06 9.352496e+05 6.413194e+05
#>    31  1.419028e+06 1.235845e+06 8.740459e+05 1.025762e+06 5.267383e+05
#>    34  1.833964e+06 1.655569e+06 9.863035e+05 1.341824e+06 6.725820e+05
#>    37  2.052051e+06 1.582071e+06 1.042078e+06 1.161079e+06 7.157689e+05
#>    40  2.432198e+06 1.495667e+06 1.130481e+06 9.033896e+05 7.491103e+05
#>    43  2.953826e+06 1.631067e+06 1.223550e+06 8.404810e+05 7.242356e+05
#>    46  3.295881e+06 1.852634e+06 1.236154e+06 8.631618e+05 5.782006e+05
#>    49  3.265909e+06 2.080712e+06 1.256316e+06 8.905924e+05 4.166825e+05
#>    52  2.787013e+06 2.201465e+06 1.324576e+06 8.955818e+05 3.149467e+05
#>    55  2.045136e+06 2.102545e+06 1.389034e+06 8.837297e+05 2.643658e+05
#>    58  1.330491e+06 1.775688e+06 1.379907e+06 8.687871e+05 2.401526e+05
#>    61  7.945016e+05 1.322988e+06 1.257816e+06 8.425543e+05 2.298835e+05
#>    64  4.437937e+05 8.791622e+05 1.035738e+06 7.826621e+05 2.275165e+05
#>    67  2.324846e+05 5.304826e+05 7.679351e+05 6.773829e+05 2.255374e+05
#>    70  1.137169e+05 2.957893e+05 5.150411e+05 5.374386e+05 2.150727e+05
#>    73  5.171482e+04 1.542851e+05 3.152164e+05 3.887379e+05 1.909639e+05
#>    76  2.182709e+04 7.573431e+04 1.778245e+05 2.567645e+05 1.550464e+05
#>    79  8.557531e+03 3.504492e+04 9.333853e+04 1.557470e+05 1.144010e+05
#>    82  3.126238e+03 1.528836e+04 4.593521e+04 8.740343e+04 7.678829e+04
#>    85  1.069347e+03 6.289872e+03 2.131826e+04 4.573051e+04 4.710677e+04
#>    88  3.445674e+02 2.443657e+03 9.369532e+03 2.246722e+04 2.657619e+04
#>    91  1.053046e+02 8.986493e+02 3.912515e+03 1.042861e+04 1.388042e+04
#>    94  3.074216e+01 3.138287e+02 1.556562e+03 4.596585e+03 6.755063e+03
#>    97  8.633954e+00 1.044705e+02 5.915344e+02 1.931761e+03 3.081877e+03
#>    100 2.348526e+00 3.328721e+01 2.152930e+02 7.766585e+02 1.325522e+03
#>    103 6.225238e-01 1.019478e+01 7.524458e+01 2.995612e+02 5.401950e+02
#>    106 1.616675e-01 3.013802e+00 2.532185e+01 1.111208e+02 2.095582e+02
#>    109 4.131902e-02 8.634642e-01 8.227624e+00 3.973292e+01 7.770666e+01
#>    112 1.043046e-02 2.406710e-01 2.588108e+00 1.372442e+01 2.764730e+01
#>    115 2.607849e-03 6.549173e-02 7.902377e-01 4.589220e+00 9.470668e+00
#>    118 6.470912e-04 1.745521e-02 2.347978e-01 1.488596e+00 3.133312e+00
#>    121 1.595768e-04 4.569658e-03 6.805024e-02 4.693273e-01 1.004079e+00
#>    124 3.914831e-05 1.178026e-03 1.928152e-02 1.441051e-01 3.124761e-01
#>    127 9.560334e-06 2.996988e-04 5.352289e-03 4.317189e-02 9.466760e-02
#>    130 2.325040e-06 7.538436e-05 1.458371e-03 1.264218e-02 2.798276e-02
#>    133 5.632091e-07 1.877689e-05 3.907542e-04 3.624824e-03 8.086824e-03
#>    136 1.359176e-07 4.637523e-06 1.031235e-04 1.019305e-03 2.289231e-03
#>    139 3.273880e-08 1.137074e-06 2.684633e-05 2.815423e-04 6.359006e-04
#>    142 7.800490e-09 2.768386e-07 6.903150e-06 7.649534e-05 1.736134e-04
#>    145 1.912952e-09 6.718755e-08 1.755940e-06 2.047303e-05 4.665818e-05
#>    148 4.408807e-10 1.615093e-08 4.420555e-07 5.404064e-06 1.236019e-05
#>    151 1.057482e-10 3.896169e-09 1.103738e-07 1.408722e-06 3.231787e-06
#>    154 2.413131e-11 9.001824e-10 2.725020e-08 3.628482e-07 8.350122e-07
#>    157 6.448233e-12 2.374876e-10 6.762458e-09 9.266390e-08 2.134702e-07
#>    160 1.273130e-12 4.853339e-11 1.633724e-09 2.337209e-08 5.404272e-08
#>    163 3.000959e-13 1.147593e-11 3.931488e-10 5.843747e-09 1.354036e-08
#>    166 7.994780e-14 3.048343e-12 1.027325e-10 1.473524e-09 3.407682e-09
#>    169 1.013932e-14 4.033635e-13 1.679262e-11 3.432067e-10 8.067342e-10
#>    172 2.655536e-15 1.056428e-13 4.398067e-12 8.988748e-11 2.112875e-10
#>    175 4.828246e-16 1.920779e-14 7.996485e-13 1.634318e-11 3.841591e-11
#>    178 2.414123e-16 9.603893e-15 3.998243e-13 8.171589e-12 1.920796e-11
#> 
#> $sim_length
#> function (age = NULL, length_age_key = FALSE) 
#> {
#>     pred_length <- Linf - (Linf - L0) * exp(-K * age)
#>     if (length_age_key) {
#>         breaks <- seq(0, ceiling(max(pred_length)) * 10, length_group)
#>         lak <- matrix(NA, ncol = length(pred_length), nrow = length(breaks) - 
#>             1, dimnames = list(length = group_lengths(breaks, 
#>             length_group)[-length(breaks)], age = age))
#>         for (i in seq_along(breaks)[-1]) {
#>             for (j in seq_along(pred_length)) {
#>                 lak[i - 1, j] <- stats::pnorm(log(breaks[i]), 
#>                   log(pred_length[j]), sd = log_sd) - stats::pnorm(log(breaks[i - 
#>                   1]), log(pred_length[j]), sd = log_sd)
#>             }
#>         }
#>         lak <- lak[rowSums(lak) > 0, ]
#>         if (plot) 
#>             graphics::image(x = as.numeric(colnames(lak)), y = as.numeric(rownames(lak)), 
#>                 z = t(lak), xlab = "Age", ylab = "Length", main = "P(Length | Age)", 
#>                 col = viridis::viridis(100))
#>         return(lak)
#>     }
#>     else {
#>         log_length <- stats::rnorm(length(age), log(pred_length), 
#>             sd = log_sd)
#>         length <- round(exp(log_length), digits)
#>         if (plot) 
#>             plot(age, length)
#>         return(length)
#>     }
#> }
#> <bytecode: 0x55d5ac817108>
#> <environment: 0x55d5aa787328>
#> 
sim_abundance(ages = 1:10, years = 1:20,
              Z = sim_Z(log_mean = log(Z_mat), log_sd = 0, phi_age = 0, phi_year = 0, plot = TRUE))

#> $ages
#>  [1]  1  2  3  4  5  6  7  8  9 10
#> 
#> $lengths
#>  [1]   1   4   7  10  13  16  19  22  25  28  31  34  37  40  43  46  49  52  55
#> [20]  58  61  64  67  70  73  76  79  82  85  88  91  94  97 100 103 106 109 112
#> [39] 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169
#> [58] 172 175 178
#> 
#> $years
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $R
#>         1         2         3         4         5         6         7         8 
#>  18893174  29315636  38441621  39707739  28733852  57513405  52498097  55259767 
#>         9        10        11        12        13        14        15        16 
#>  60323090  58413267 132723930  73197544  76501859 156228320 132531693 223142388 
#>        17        18        19        20 
#> 497684856 213372888 213243559 135185966 
#> 
#> $N0
#>  [1] 18893173.6 17095250.4 13996407.2 10368793.5  6950410.1  4215636.8
#>  [7]  2313590.6  1269725.4   770127.4   516231.8
#> 
#> $Z
#>     year
#> age    1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18
#>   1  0.1 0.1 0.1 0.1 0.1 2.3 2.3 2.3 2.3 0.5 0.5 0.5 0.5 0.5 0.3 0.3 0.3 0.3
#>   2  0.2 0.2 0.2 0.2 0.2 2.4 2.4 2.4 2.4 0.6 0.6 0.6 0.6 0.6 0.4 0.4 0.4 0.4
#>   3  0.3 0.3 0.3 0.3 0.3 2.5 2.5 2.5 2.5 0.7 0.7 0.7 0.7 0.7 0.5 0.5 0.5 0.5
#>   4  0.4 0.4 0.4 0.4 0.4 2.6 2.6 2.6 2.6 0.8 0.8 0.8 0.8 0.8 0.6 0.6 0.6 0.6
#>   5  0.5 0.5 0.5 0.5 0.5 2.7 2.7 2.7 2.7 0.9 0.9 0.9 0.9 0.9 0.7 0.7 0.7 0.7
#>   6  0.6 0.6 0.6 0.6 0.6 2.8 2.8 2.8 2.8 1.0 1.0 1.0 1.0 1.0 0.8 0.8 0.8 0.8
#>   7  0.6 0.6 0.6 0.6 0.6 2.8 2.8 2.8 2.8 1.0 1.0 1.0 1.0 1.0 0.8 0.8 0.8 0.8
#>   8  0.5 0.5 0.5 0.5 0.5 2.7 2.7 2.7 2.7 0.9 0.9 0.9 0.9 0.9 0.7 0.7 0.7 0.7
#>   9  0.4 0.4 0.4 0.4 0.4 2.6 2.6 2.6 2.6 0.8 0.8 0.8 0.8 0.8 0.6 0.6 0.6 0.6
#>   10 0.3 0.3 0.3 0.3 0.3 2.5 2.5 2.5 2.5 0.7 0.7 0.7 0.7 0.7 0.5 0.5 0.5 0.5
#>     year
#> age   19  20
#>   1  0.3 0.3
#>   2  0.4 0.4
#>   3  0.5 0.5
#>   4  0.6 0.6
#>   5  0.7 0.7
#>   6  0.8 0.8
#>   7  0.8 0.8
#>   8  0.7 0.7
#>   9  0.6 0.6
#>   10 0.5 0.5
#> 
#> $N
#>     year
#> age           1          2          3          4          5          6
#>   1  18893173.6 29315635.8 38441621.3 39707738.7 28733852.3 57513404.6
#>   2  17095250.4 17095250.4 26525884.2 34783417.4 35929047.7 25999464.8
#>   3  13996407.2 13996407.2 13996407.2 21717557.2 28478253.5 29416216.3
#>   4  10368793.5 10368793.5 10368793.5 10368793.5 16088762.1 21097209.1
#>   5   6950410.1  6950410.1  6950410.1  6950410.1  6950410.1 10784619.7
#>   6   4215636.8  4215636.8  4215636.8  4215636.8  4215636.8  4215636.8
#>   7   2313590.6  2313590.6  2313590.6  2313590.6  2313590.6  2313590.6
#>   8   1269725.4  1269725.4  1269725.4  1269725.4  1269725.4  1269725.4
#>   9    770127.4   770127.4   770127.4   770127.4   770127.4   770127.4
#>   10   516231.8   516231.8   516231.8   516231.8   516231.8   516231.8
#>     year
#> age            7            8            9           10           11
#>   1  52498097.44 55259767.408 6.032309e+07 5.841327e+07 1.327239e+08
#>   2   5766227.44  5263398.547 5.540280e+06 6.047923e+06 3.542944e+07
#>   3   2358618.23   523100.352 4.774847e+05 5.026029e+05 3.319171e+06
#>   4   2414630.08   193607.174 4.293869e+04 3.919433e+04 2.495852e+05
#>   5   1566965.21   179343.216 1.437990e+04 3.189210e+03 1.761115e+04
#>   6    724785.90   105308.700 1.205285e+04 9.664084e+02 1.296636e+03
#>   7    256353.14    44074.276 6.403829e+03 7.329347e+02 3.555218e+02
#>   8    140689.59    15588.851 2.680159e+03 3.894172e+02 2.696316e+02
#>   9     85332.55     9455.116 1.047657e+03 1.801215e+02 1.583252e+02
#>   10    57200.12     6337.954 7.022653e+02 7.781321e+01 8.093380e+01
#>     year
#> age            12           13           14           15           16
#>   1  7.319754e+07 7.650186e+07 1.562283e+08 1.325317e+08 2.231424e+08
#>   2  8.050113e+07 4.439655e+07 4.640072e+07 9.475727e+07 9.818189e+07
#>   3  1.944409e+07 4.417996e+07 2.436535e+07 2.546526e+07 6.351770e+07
#>   4  1.648251e+06 9.655648e+06 2.193912e+07 1.209947e+07 1.544546e+07
#>   5  1.121459e+05 7.406071e+05 4.338562e+06 9.857881e+06 6.640331e+06
#>   6  7.160159e+03 4.559511e+04 3.011084e+05 1.763928e+06 4.895279e+06
#>   7  4.770058e+02 2.634075e+03 1.677350e+04 1.107716e+05 7.925839e+05
#>   8  1.307892e+02 1.754806e+02 9.690222e+02 6.170627e+03 4.977288e+04
#>   9  1.096240e+02 5.317490e+01 7.134510e+01 3.939750e+02 3.064242e+03
#>   10 7.114011e+01 4.925725e+01 2.389302e+01 3.205742e+01 2.162181e+02
#>     year
#> age            17           18           19          20
#>   1  4.976849e+08 213372888.33 213243558.71 135185966.4
#>   2  1.653079e+08 368694009.75 158070523.47 157974713.7
#>   3  6.581329e+07 110809230.39 247142985.59 105957840.6
#>   4  3.852543e+07  39917778.87  67209195.61 149899798.1
#>   5  8.476648e+06  21143203.98  21907341.53  36885188.6
#>   6  3.297491e+06   4209378.61  10499404.37  10878863.8
#>   7  2.199591e+06   1481658.21   1891395.73   4717686.5
#>   8  3.561309e+05    988339.77    665751.95    849858.9
#>   9  2.471648e+04    176849.36    490795.01    330602.6
#>   10 1.681692e+03     13564.69     97056.99    269354.0
#> 
#> $N_at_length
#>       year
#> length            1            2            3            4            5
#>    1   1.147915e-55 1.781164e-55 2.335642e-55 2.412569e-55 1.745816e-55
#>    4   1.388393e-15 2.154303e-15 2.824939e-15 2.917982e-15 2.111549e-15
#>    7   1.015868e-01 1.576274e-01 2.066970e-01 2.135048e-01 1.544992e-01
#>    10  4.240761e+04 6.580187e+04 8.628605e+04 8.912798e+04 6.449600e+04
#>    13  5.075501e+06 7.875412e+06 1.032704e+07 1.066717e+07 7.719121e+06
#>    16  1.165139e+07 1.807751e+07 2.370566e+07 2.448753e+07 1.772160e+07
#>    19  2.392013e+06 3.534429e+06 4.711879e+06 5.005768e+06 3.824430e+06
#>    22  3.653570e+06 3.683969e+06 5.694913e+06 7.436871e+06 7.646598e+06
#>    25  7.590677e+06 7.590901e+06 1.173620e+07 1.540778e+07 1.594795e+07
#>    28  5.382117e+06 5.382118e+06 7.862976e+06 1.052246e+07 1.125142e+07
#>    31  4.279376e+06 4.279376e+06 4.852603e+06 7.118303e+06 8.755989e+06
#>    34  5.172561e+06 5.172561e+06 5.236800e+06 7.879432e+06 1.035313e+07
#>    37  4.755675e+06 4.755675e+06 4.759834e+06 6.619061e+06 8.987919e+06
#>    40  4.127845e+06 4.127845e+06 4.128022e+06 4.880829e+06 6.943296e+06
#>    43  3.846612e+06 3.846612e+06 3.846618e+06 4.039890e+06 5.740357e+06
#>    46  3.458419e+06 3.458419e+06 3.458419e+06 3.492771e+06 4.587581e+06
#>    49  2.995745e+06 2.995745e+06 2.995745e+06 3.000282e+06 3.514353e+06
#>    52  2.559660e+06 2.559660e+06 2.559660e+06 2.560131e+06 2.739879e+06
#>    55  2.143115e+06 2.143115e+06 2.143115e+06 2.143155e+06 2.191894e+06
#>    58  1.752868e+06 1.752868e+06 1.752868e+06 1.752871e+06 1.763530e+06
#>    61  1.406434e+06 1.406434e+06 1.406434e+06 1.406434e+06 1.408380e+06
#>    64  1.111149e+06 1.111149e+06 1.111149e+06 1.111149e+06 1.111453e+06
#>    67  8.655600e+05 8.655600e+05 8.655600e+05 8.655600e+05 8.656020e+05
#>    70  6.630086e+05 6.630086e+05 6.630086e+05 6.630086e+05 6.630138e+05
#>    73  4.954207e+05 4.954207e+05 4.954207e+05 4.954207e+05 4.954213e+05
#>    76  3.569657e+05 3.569657e+05 3.569657e+05 3.569657e+05 3.569657e+05
#>    79  2.450851e+05 2.450851e+05 2.450851e+05 2.450851e+05 2.450851e+05
#>    82  1.588297e+05 1.588297e+05 1.588297e+05 1.588297e+05 1.588297e+05
#>    85  9.657707e+04 9.657707e+04 9.657707e+04 9.657707e+04 9.657707e+04
#>    88  5.495271e+04 5.495271e+04 5.495271e+04 5.495271e+04 5.495271e+04
#>    91  2.925810e+04 2.925810e+04 2.925810e+04 2.925810e+04 2.925810e+04
#>    94  1.460117e+04 1.460117e+04 1.460117e+04 1.460117e+04 1.460117e+04
#>    97  6.849194e+03 6.849194e+03 6.849194e+03 6.849194e+03 6.849194e+03
#>    100 3.030387e+03 3.030387e+03 3.030387e+03 3.030387e+03 3.030387e+03
#>    103 1.269363e+03 1.269363e+03 1.269363e+03 1.269363e+03 1.269363e+03
#>    106 5.053102e+02 5.053102e+02 5.053102e+02 5.053102e+02 5.053102e+02
#>    109 1.918867e+02 1.918867e+02 1.918867e+02 1.918867e+02 1.918867e+02
#>    112 6.976146e+01 6.976146e+01 6.976146e+01 6.976146e+01 6.976146e+01
#>    115 2.436468e+01 2.436468e+01 2.436468e+01 2.436468e+01 2.436468e+01
#>    118 8.201274e+00 8.201274e+00 8.201274e+00 8.201274e+00 8.201274e+00
#>    121 2.668620e+00 2.668620e+00 2.668620e+00 2.668620e+00 2.668620e+00
#>    124 8.417725e-01 8.417725e-01 8.417725e-01 8.417725e-01 8.417725e-01
#>    127 2.580683e-01 2.580683e-01 2.580683e-01 2.580683e-01 2.580683e-01
#>    130 7.708178e-02 7.708178e-02 7.708178e-02 7.708178e-02 7.708178e-02
#>    133 2.248082e-02 2.248082e-02 2.248082e-02 2.248082e-02 2.248082e-02
#>    136 6.415176e-03 6.415176e-03 6.415176e-03 6.415176e-03 6.415176e-03
#>    139 1.794588e-03 1.794588e-03 1.794588e-03 1.794588e-03 1.794588e-03
#>    142 4.929932e-04 4.929932e-04 4.929932e-04 4.929932e-04 4.929932e-04
#>    145 1.332113e-04 1.332113e-04 1.332113e-04 1.332113e-04 1.332113e-04
#>    148 3.545758e-05 3.545758e-05 3.545758e-05 3.545758e-05 3.545758e-05
#>    151 9.310046e-06 9.310046e-06 9.310046e-06 9.310046e-06 9.310046e-06
#>    154 2.414346e-06 2.414346e-06 2.414346e-06 2.414346e-06 2.414346e-06
#>    157 6.192304e-07 6.192304e-07 6.192304e-07 6.192304e-07 6.192304e-07
#>    160 1.571952e-07 1.571952e-07 1.571952e-07 1.571952e-07 1.571952e-07
#>    163 3.951420e-08 3.951420e-08 3.951420e-08 3.951420e-08 3.951420e-08
#>    166 9.914255e-09 9.914255e-09 9.914255e-09 9.914255e-09 9.914255e-09
#>    169 2.407156e-09 2.407156e-09 2.407156e-09 2.407156e-09 2.407156e-09
#>    172 6.304457e-10 6.304457e-10 6.304457e-10 6.304457e-10 6.304457e-10
#>    175 1.146265e-10 1.146265e-10 1.146265e-10 1.146265e-10 1.146265e-10
#>    178 5.731325e-11 5.731325e-11 5.731325e-11 5.731325e-11 5.731325e-11
#>       year
#> length            6            7            8            9           10
#>    1   3.494409e-55 3.189688e-55 3.357482e-55 3.665120e-55 3.549083e-55
#>    4   4.226457e-15 3.857900e-15 4.060845e-15 4.432931e-15 4.292585e-15
#>    7   3.092442e-01 2.822773e-01 2.971266e-01 3.243516e-01 3.140826e-01
#>    10  1.290946e+05 1.178372e+05 1.240361e+05 1.354012e+05 1.311144e+05
#>    13  1.545052e+07 1.410319e+07 1.484509e+07 1.620532e+07 1.569226e+07
#>    16  3.546456e+07 3.236930e+07 3.407197e+07 3.719388e+07 3.601642e+07
#>    19  6.792471e+06 5.862679e+06 6.155942e+06 6.716139e+06 6.516337e+06
#>    22  5.641323e+06 1.366647e+06 1.268716e+06 1.341739e+06 1.442986e+06
#>    25  1.158928e+07 2.548451e+06 2.317491e+06 2.439051e+06 2.662274e+06
#>    28  8.699353e+06 1.666135e+06 1.417655e+06 1.487589e+06 1.622715e+06
#>    31  8.387475e+06 8.992953e+05 4.402257e+05 4.460097e+05 4.825882e+05
#>    34  1.077748e+07 9.149553e+05 2.179637e+05 1.992004e+05 2.109359e+05
#>    37  9.880012e+06 8.914922e+05 1.541460e+05 1.228526e+05 1.285671e+05
#>    40  8.381618e+06 8.716075e+05 1.042430e+05 5.764152e+04 5.882316e+04
#>    43  7.482200e+06 8.658990e+05 8.348237e+04 2.496893e+04 2.339893e+04
#>    46  6.247025e+06 7.817177e+05 7.602257e+04 1.327239e+04 1.016958e+04
#>    49  4.864328e+06 6.567792e+05 7.022422e+04 8.709843e+03 4.642362e+03
#>    52  3.683936e+06 5.291429e+05 6.231573e+04 6.616450e+03 2.109114e+03
#>    55  2.740879e+06 4.067296e+05 5.191071e+04 5.466005e+03 1.040677e+03
#>    58  2.024598e+06 2.991425e+05 4.070698e+04 4.561573e+03 6.130387e+02
#>    61  1.510552e+06 2.140949e+05 3.037647e+04 3.676372e+03 4.254275e+02
#>    64  1.144950e+06 1.520057e+05 2.180958e+04 2.822638e+03 3.209338e+02
#>    67  8.749940e+05 1.086500e+05 1.525811e+04 2.069304e+03 2.454318e+02
#>    70  6.653114e+05 7.846086e+04 1.052850e+04 1.458322e+03 1.830659e+02
#>    73  4.959206e+05 5.664265e+04 7.203907e+03 9.931049e+02 1.309063e+02
#>    76  3.570637e+05 4.010257e+04 4.863019e+03 6.542519e+02 8.907142e+01
#>    79  2.451027e+05 2.731283e+04 3.197405e+03 4.156785e+02 5.743424e+01
#>    82  1.588326e+05 1.763968e+04 2.017944e+03 2.532214e+02 3.499526e+01
#>    85  9.657753e+04 1.071088e+04 1.208351e+03 1.469659e+02 2.010916e+01
#>    88  5.495278e+04 6.091143e+03 6.816869e+02 8.085227e+01 1.088745e+01
#>    91  2.925811e+04 3.242355e+03 3.612433e+02 4.203482e+01 5.555176e+00
#>    94  1.460117e+04 1.617948e+03 1.798171e+02 2.063230e+01 2.674493e+00
#>    97  6.849195e+03 7.589300e+02 8.423258e+01 9.567842e+00 1.217405e+00
#>    100 3.030387e+03 3.357796e+02 3.724007e+01 4.199790e+00 5.252900e-01
#>    103 1.269363e+03 1.406500e+02 1.559260e+01 1.749569e+00 2.154780e-01
#>    106 5.053102e+02 5.599006e+01 6.205711e+00 6.938213e-01 8.429313e-02
#>    109 1.918867e+02 2.126166e+01 2.356258e+00 2.627718e-01 3.154533e-02
#>    112 6.976146e+01 7.729793e+00 8.565693e-01 9.535393e-02 1.132880e-02
#>    115 2.436468e+01 2.699684e+00 2.991506e-01 3.325915e-02 3.916070e-03
#>    118 8.201274e+00 9.087271e-01 1.006932e-01 1.118472e-02 1.306742e-03
#>    121 2.668620e+00 2.956916e-01 3.276422e-02 3.636969e-03 4.220773e-04
#>    124 8.417725e-01 9.327106e-02 1.033485e-02 1.146669e-03 1.323054e-04
#>    127 2.580683e-01 2.859478e-02 3.168416e-03 3.514200e-04 4.034560e-05
#>    130 7.708178e-02 8.540905e-03 9.463636e-04 1.049381e-04 1.199576e-05
#>    133 2.248082e-02 2.490946e-03 2.760055e-04 3.059938e-05 3.484853e-06
#>    136 6.415176e-03 7.108217e-04 7.876143e-05 8.730702e-06 9.910934e-07
#>    139 1.794588e-03 1.988460e-04 2.203279e-05 2.442086e-06 2.764429e-07
#>    142 4.929932e-04 5.462521e-05 6.052649e-06 6.708168e-07 7.575060e-08
#>    145 1.332113e-04 1.476024e-05 1.635482e-06 1.812508e-07 2.042381e-08
#>    148 3.545758e-05 3.928812e-06 4.353248e-07 4.824235e-08 5.425958e-09
#>    151 9.310046e-06 1.031583e-06 1.143026e-07 1.266657e-08 1.422331e-09
#>    154 2.414346e-06 2.675171e-07 2.964174e-08 3.284610e-09 3.682955e-10
#>    157 6.192304e-07 6.861268e-08 7.602502e-09 8.424870e-10 9.435583e-11
#>    160 1.571952e-07 1.741773e-08 1.929939e-09 2.138434e-10 2.392203e-11
#>    163 3.951420e-08 4.378299e-09 4.851293e-10 5.375386e-11 6.005865e-12
#>    166 9.914255e-09 1.098531e-09 1.217207e-10 1.348703e-11 1.508625e-12
#>    169 2.407156e-09 2.667205e-10 2.955348e-11 3.274619e-12 3.628381e-13
#>    172 6.304457e-10 6.985538e-11 7.740196e-12 8.576382e-13 9.502902e-14
#>    175 1.146265e-10 1.270098e-11 1.407308e-12 1.559342e-13 1.727800e-14
#>    178 5.731325e-11 6.350489e-12 7.036542e-13 7.796711e-14 8.639002e-15
#>       year
#> length           11           12           13           14           15
#>    1   8.064063e-55 4.447349e-55 4.648113e-55 9.492146e-55 8.052383e-55
#>    4   9.753414e-15 5.379029e-15 5.621852e-15 1.148067e-14 9.739287e-15
#>    7   7.136441e-01 3.935763e-01 4.113433e-01 8.400250e-01 7.126104e-01
#>    10  2.979121e+05 1.642992e+05 1.717161e+05 3.506700e+05 2.974806e+05
#>    13  3.565522e+07 1.966394e+07 2.055161e+07 4.196949e+07 3.560358e+07
#>    16  8.183808e+07 4.514294e+07 4.717490e+07 9.633167e+07 8.172836e+07
#>    19  1.521349e+07 9.535362e+06 9.219381e+06 1.799592e+07 1.630682e+07
#>    22  7.842256e+06 1.715391e+07 9.569172e+06 1.022142e+07 2.032725e+07
#>    25  1.559345e+07 3.549067e+07 1.975631e+07 2.053096e+07 4.179086e+07
#>    28  9.529699e+06 2.240419e+07 1.446865e+07 1.374761e+07 2.653619e+07
#>    31  2.912772e+06 9.341667e+06 1.283078e+07 8.477143e+06 1.162703e+07
#>    34  1.361959e+06 7.119649e+06 1.544156e+07 9.251483e+06 9.605425e+06
#>    37  8.458417e+05 4.923256e+06 1.189621e+07 8.750736e+06 7.786108e+06
#>    40  3.859985e+05 2.304781e+06 6.699404e+06 7.892969e+06 5.758744e+06
#>    43  1.516621e+05 9.390928e+05 3.764033e+06 6.912823e+06 4.862090e+06
#>    46  6.459370e+04 4.147188e+05 2.135151e+06 5.020937e+06 4.286701e+06
#>    49  2.848024e+04 1.854890e+05 1.065677e+06 3.020488e+06 3.580088e+06
#>    52  1.187330e+04 7.707761e+04 4.650297e+05 1.629956e+06 2.698490e+06
#>    55  4.779049e+03 3.047645e+04 1.899371e+05 8.237871e+05 1.780636e+06
#>    58  1.950602e+03 1.192210e+04 7.594487e+04 3.871275e+05 1.031414e+06
#>    61  8.370984e+02 4.636060e+03 2.974585e+04 1.675836e+05 5.368676e+05
#>    64  3.975065e+02 1.785636e+03 1.131386e+04 6.752669e+04 2.568437e+05
#>    67  2.205293e+02 6.926694e+02 4.190638e+03 2.584594e+04 1.143938e+05
#>    70  1.417901e+02 2.822637e+02 1.527297e+03 9.556475e+03 4.774937e+04
#>    73  9.841655e+01 1.277057e+02 5.546470e+02 3.445567e+03 1.880406e+04
#>    76  6.870747e+01 6.610670e+01 2.041929e+02 1.217626e+03 7.049429e+03
#>    79  4.625787e+01 3.800917e+01 7.811210e+01 4.238390e+02 2.541725e+03
#>    82  2.944572e+01 2.274804e+01 3.184076e+01 1.462357e+02 8.898847e+02
#>    85  1.758204e+01 1.341516e+01 1.394907e+01 5.037396e+01 3.048525e+02
#>    88  9.826307e+00 7.560109e+00 6.452238e+00 1.744435e+01 1.027481e+02
#>    91  5.143978e+00 4.018464e+00 3.048665e+00 6.103416e+00 3.419505e+01
#>    94  2.527915e+00 2.007198e+00 1.426614e+00 2.161049e+00 1.126201e+01
#>    97  1.169761e+00 9.428720e-01 6.476574e-01 7.724534e-01 3.674477e+00
#>    100 5.114441e-01 4.176812e-01 2.821649e-01 2.771249e-01 1.187842e+00
#>    103 2.120496e-01 1.751130e-01 1.174597e-01 9.904569e-02 3.802279e-01
#>    106 8.367509e-02 6.974889e-02 4.669165e-02 3.500902e-02 1.203873e-01
#>    109 3.153731e-02 2.649484e-02 1.774796e-02 1.216517e-02 3.765361e-02
#>    112 1.139241e-02 9.633662e-03 6.465927e-03 4.138361e-03 1.161904e-02
#>    115 3.957213e-03 3.364676e-03 2.264016e-03 1.374730e-03 3.533501e-03
#>    118 1.325825e-03 1.132497e-03 7.640822e-04 4.454322e-04 1.058204e-03
#>    121 4.296963e-04 3.684650e-04 2.492543e-04 1.407503e-04 3.119317e-04
#>    124 1.350792e-04 1.162110e-04 7.880755e-05 4.339542e-05 9.049119e-05
#>    127 4.129125e-05 3.562260e-05 2.421200e-05 1.306707e-05 2.583786e-05
#>    130 1.230221e-05 1.063851e-05 7.245600e-06 3.847512e-06 7.263637e-06
#>    133 3.580164e-06 3.102282e-06 2.116748e-06 1.109266e-06 2.011461e-06
#>    136 1.019734e-06 8.851585e-07 6.049433e-07 3.135915e-07 5.490536e-07
#>    139 2.848000e-07 2.475852e-07 1.694508e-07 8.705390e-08 1.478420e-07
#>    142 7.812791e-08 6.800686e-08 4.660387e-08 2.376158e-08 3.928695e-08
#>    145 2.108512e-08 1.837424e-08 1.260585e-08 6.387944e-09 1.032578e-08
#>    148 5.606369e-09 4.890322e-09 3.358321e-09 1.692302e-09 2.678280e-09
#>    151 1.470691e-09 1.283937e-09 8.824929e-10 4.427368e-10 6.886457e-10
#>    154 3.810733e-10 3.329391e-10 2.290084e-10 1.143604e-10 1.746850e-10
#>    157 9.767375e-11 8.538341e-11 5.877544e-11 2.931612e-11 4.451010e-11
#>    160 2.477829e-11 2.167495e-11 1.492694e-11 7.402383e-12 1.099142e-11
#>    163 6.224169e-12 5.448031e-12 3.754541e-12 1.856601e-12 2.722801e-12
#>    166 1.562683e-12 1.367025e-12 9.414783e-13 4.667937e-13 6.925250e-13
#>    169 3.773892e-13 3.317218e-13 2.296835e-13 1.114117e-13 1.494817e-13
#>    172 9.884003e-14 8.687953e-14 6.015519e-14 2.917924e-14 3.914997e-14
#>    175 1.797091e-14 1.579628e-14 1.093731e-14 5.305317e-15 7.118177e-15
#>    178 8.985457e-15 7.898139e-15 5.468654e-15 2.652658e-15 3.559088e-15
#>       year
#> length           16           17           18           19           20
#>    1   1.355772e-54 3.023842e-54 1.296415e-54 1.295629e-54 8.213652e-55
#>    4   1.639795e-14 3.657311e-14 1.568002e-14 1.567052e-14 9.934340e-15
#>    7   1.199816e+00 2.676005e+00 1.147286e+00 1.146591e+00 7.268822e-01
#>    10  5.008653e+05 1.117103e+06 4.789367e+05 4.786464e+05 3.034384e+05
#>    13  5.994542e+07 1.336991e+08 5.732093e+07 5.728618e+07 3.631663e+07
#>    16  1.375962e+08 3.068792e+08 1.316128e+08 1.315018e+08 8.337428e+07
#>    19  2.630308e+07 5.765682e+07 3.031345e+07 2.634303e+07 1.778523e+07
#>    22  2.131594e+07 3.624111e+07 7.821138e+07 3.390684e+07 3.364483e+07
#>    25  4.350544e+07 7.302820e+07 1.626627e+08 7.082924e+07 7.001616e+07
#>    28  2.983887e+07 4.764611e+07 1.039892e+08 5.718946e+07 4.826915e+07
#>    31  2.054149e+07 2.524159e+07 4.788866e+07 6.634253e+07 3.442756e+07
#>    34  2.249172e+07 2.453069e+07 4.104279e+07 8.623684e+07 4.185826e+07
#>    37  1.735103e+07 2.094213e+07 3.209250e+07 6.831634e+07 4.521367e+07
#>    40  1.019341e+07 1.613608e+07 2.125929e+07 4.127175e+07 4.826000e+07
#>    43  6.419779e+06 1.282388e+07 1.557780e+07 2.642398e+07 4.650563e+07
#>    46  4.584293e+06 9.185093e+06 1.206289e+07 1.811596e+07 3.572629e+07
#>    49  3.443365e+06 5.808304e+06 9.016272e+06 1.229836e+07 2.319289e+07
#>    52  2.690084e+06 3.595412e+06 6.363272e+06 8.431763e+06 1.428242e+07
#>    55  2.100172e+06 2.356115e+06 4.175334e+06 5.843204e+06 8.886548e+06
#>    58  1.546273e+06 1.637493e+06 2.579120e+06 3.956365e+06 5.618731e+06
#>    61  1.035797e+06 1.162222e+06 1.567678e+06 2.554437e+06 3.576511e+06
#>    64  6.240852e+05 8.059743e+05 9.769365e+05 1.571502e+06 2.263350e+06
#>    67  3.395937e+05 5.275243e+05 6.280779e+05 9.388966e+05 1.404671e+06
#>    70  1.688056e+05 3.197498e+05 4.061829e+05 5.595941e+05 8.492034e+05
#>    73  7.765258e+04 1.784690e+05 2.557684e+05 3.382378e+05 5.019867e+05
#>    76  3.343742e+04 9.196101e+04 1.531362e+05 2.062547e+05 2.928335e+05
#>    79  1.360286e+04 4.403219e+04 8.611856e+04 1.243012e+05 1.695662e+05
#>    82  5.268437e+03 1.974582e+04 4.531675e+04 7.242332e+04 9.715099e+04
#>    85  1.956060e+03 8.357590e+03 2.233952e+04 4.017522e+04 5.447325e+04
#>    88  7.007170e+02 3.362180e+03 1.035436e+04 2.105344e+04 2.950326e+04
#>    91  2.436393e+02 1.293366e+03 4.533226e+03 1.039755e+04 1.527344e+04
#>    94  8.264509e+01 4.782122e+02 1.883596e+03 4.843245e+03 7.509833e+03
#>    97  2.745927e+01 1.706927e+02 7.461319e+02 2.133190e+03 3.498065e+03
#>    100 8.961326e+00 5.903369e+01 2.829195e+02 8.913309e+02 1.543703e+03
#>    103 2.877346e+00 1.984291e+01 1.030649e+02 3.545780e+02 6.465279e+02
#>    106 9.096882e-01 6.498641e+00 3.618806e+01 1.347711e+02 2.576594e+02
#>    109 2.832457e-01 2.077959e+00 1.228234e+01 4.911169e+01 9.801186e+01
#>    112 8.684753e-02 6.497761e-01 4.040045e+00 1.721410e+01 3.570193e+01
#>    115 2.621701e-02 1.989700e-01 1.290936e+00 5.821180e+00 1.249355e+01
#>    118 7.790520e-03 5.973109e-02 4.015803e-01 1.904528e+00 4.213235e+00
#>    121 2.278694e-03 1.759681e-02 1.218574e-01 6.044326e-01 1.373309e+00
#>    124 6.561272e-04 5.091976e-03 3.613607e-02 1.865277e-01 4.338632e-01
#>    127 1.860324e-04 1.448569e-03 1.049016e-02 5.609811e-02 1.331981e-01
#>    130 5.195969e-05 4.054794e-04 2.985849e-03 1.647653e-02 3.983390e-02
#>    133 1.430377e-05 1.117768e-04 8.345354e-04 4.735158e-03 1.163023e-02
#>    136 3.883432e-06 3.037142e-05 2.293607e-04 1.333928e-03 3.322028e-03
#>    139 1.040621e-06 8.141390e-06 6.206675e-05 3.689629e-04 9.300960e-04
#>    142 2.753279e-07 2.154624e-06 1.655737e-05 1.003588e-04 2.556979e-04
#>    145 7.208492e-08 5.637653e-07 4.359611e-06 2.688322e-05 6.913748e-05
#>    148 1.863163e-08 1.457873e-07 1.134043e-06 7.101108e-06 1.841321e-05
#>    151 4.776183e-09 3.735772e-08 2.918303e-07 1.852040e-06 4.837200e-06
#>    154 1.207528e-09 9.444721e-09 7.424128e-08 4.774113e-07 1.254958e-06
#>    157 3.074391e-10 2.401479e-09 1.881140e-08 1.218472e-07 3.220092e-07
#>    160 7.557993e-11 5.909814e-10 4.686920e-09 3.078360e-08 8.176663e-08
#>    163 1.868081e-11 1.459815e-10 1.160002e-09 7.697982e-09 2.056195e-08
#>    166 4.761253e-12 3.722806e-11 2.952856e-10 1.940812e-09 5.157140e-09
#>    169 1.008211e-12 7.841623e-12 6.325130e-11 4.525706e-10 1.255981e-09
#>    172 2.640553e-13 2.053758e-12 1.656582e-11 1.185304e-10 3.289473e-10
#>    175 4.801006e-14 3.734106e-13 3.011967e-12 2.155098e-11 5.980860e-11
#>    178 2.400503e-14 1.867053e-13 1.505983e-12 1.077549e-11 2.990430e-11
#> 
#> $sim_length
#> function (age = NULL, length_age_key = FALSE) 
#> {
#>     pred_length <- Linf - (Linf - L0) * exp(-K * age)
#>     if (length_age_key) {
#>         breaks <- seq(0, ceiling(max(pred_length)) * 10, length_group)
#>         lak <- matrix(NA, ncol = length(pred_length), nrow = length(breaks) - 
#>             1, dimnames = list(length = group_lengths(breaks, 
#>             length_group)[-length(breaks)], age = age))
#>         for (i in seq_along(breaks)[-1]) {
#>             for (j in seq_along(pred_length)) {
#>                 lak[i - 1, j] <- stats::pnorm(log(breaks[i]), 
#>                   log(pred_length[j]), sd = log_sd) - stats::pnorm(log(breaks[i - 
#>                   1]), log(pred_length[j]), sd = log_sd)
#>             }
#>         }
#>         lak <- lak[rowSums(lak) > 0, ]
#>         if (plot) 
#>             graphics::image(x = as.numeric(colnames(lak)), y = as.numeric(rownames(lak)), 
#>                 z = t(lak), xlab = "Age", ylab = "Length", main = "P(Length | Age)", 
#>                 col = viridis::viridis(100))
#>         return(lak)
#>     }
#>     else {
#>         log_length <- stats::rnorm(length(age), log(pred_length), 
#>             sd = log_sd)
#>         length <- round(exp(log_length), digits)
#>         if (plot) 
#>             plot(age, length)
#>         return(length)
#>     }
#> }
#> <bytecode: 0x55d5ac817108>
#> <environment: 0x55d5a9ea0020>
#> 

N0_fun <- sim_N0(N0 = "exp", plot = TRUE)
N0_fun(R0 = 1000, Z0 = rep(0.5, 20), ages = 1:20)

#>  [1] 1.000000e+03 6.065307e+02 3.678794e+02 2.231302e+02 1.353353e+02
#>  [6] 8.208500e+01 4.978707e+01 3.019738e+01 1.831564e+01 1.110900e+01
#> [11] 6.737947e+00 4.086771e+00 2.478752e+00 1.503439e+00 9.118820e-01
#> [16] 5.530844e-01 3.354626e-01 2.034684e-01 1.234098e-01 7.485183e-02
sim_abundance(N0 = sim_N0(N0 = "exp", plot = TRUE))

#> $ages
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $lengths
#>  [1]   1   4   7  10  13  16  19  22  25  28  31  34  37  40  43  46  49  52  55
#> [20]  58  61  64  67  70  73  76  79  82  85  88  91  94  97 100 103 106 109 112
#> [39] 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169
#> [58] 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226
#> [77] 229 232 235 238
#> 
#> $years
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $R
#>         1         2         3         4         5         6         7         8 
#>  13715554  38878043  47662628  24633378  35612596  99129330  93143898 111848217 
#>         9        10        11        12        13        14        15        16 
#> 106621170 130826121 162556081 169032147 109315147 191794650 112184979 128720756 
#>        17        18        19        20 
#>  81062342 113983381 149897436 250215512 
#> 
#> $N0
#>  [1] 13715553.777  7071658.859  4177066.811  2731936.602  1932786.665
#>  [6]  1330726.993  1002465.427   689134.595   472738.685   341005.620
#> [11]   266141.786   192656.545   139294.995   103034.800    69759.303
#> [16]    44514.541    28200.797    18911.711    10761.074     5793.536
#> 
#> $Z
#>     year
#> age          1         2         3         4         5         6         7
#>   1  0.6624354 0.6779245 0.3706692 0.2821164 0.6369581 1.2068880 1.0615162
#>   2  0.5264858 0.6558273 0.4044618 0.3871887 0.7076627 1.5041204 1.4480100
#>   3  0.4245985 0.5082847 0.3851714 0.3801686 0.6007986 0.9037220 0.9018222
#>   4  0.3460479 0.3345311 0.4261434 0.4413694 0.5845590 0.9919392 1.0359827
#>   5  0.3732374 0.6140568 0.4959996 0.3649564 0.4581479 1.0166230 0.8945095
#>   6  0.2832630 0.5064058 0.4063913 0.3011636 0.5997737 1.2069603 0.9513625
#>   7  0.3747811 0.4389782 0.3043956 0.2490849 0.5063845 1.3119107 0.8114241
#>   8  0.3768938 0.2868892 0.2953605 0.2805835 0.3464317 0.8250959 0.6106996
#>   9  0.3266438 0.2625922 0.2993278 0.4371424 0.4886571 0.9537087 0.6879860
#>   10 0.2478698 0.2021937 0.3123888 0.3548231 0.5702126 1.2710133 0.8320721
#>   11 0.3231202 0.2567349 0.4526416 0.4162333 0.5803901 0.8632790 0.6291374
#>   12 0.3243151 0.2403705 0.5623066 0.3607326 0.5666519 0.9432667 0.9459888
#>   13 0.3015272 0.1937995 0.4408258 0.2930225 0.4050203 0.6478857 0.7196639
#>   14 0.3900160 0.1602020 0.3983355 0.1656051 0.2219557 0.3598883 0.3582476
#>   15 0.4492349 0.2454708 0.5332257 0.2555647 0.1934200 0.2726314 0.3139470
#>   16 0.4564657 0.2679613 0.5063169 0.3239551 0.2689830 0.3375713 0.3436500
#>   17 0.3995689 0.2461424 0.5101792 0.4335540 0.2890137 0.3371986 0.3393641
#>   18 0.5638459 0.4083866 0.4273141 0.4235600 0.3064221 0.3082394 0.4948245
#>   19 0.6191926 0.3258174 0.2518513 0.2987367 0.2642700 0.2948037 0.5186899
#>   20 0.4976250 0.2551327 0.3349373 0.4277912 0.3199272 0.3512632 0.4639561
#>     year
#> age          8         9        10        11        12        13        14
#>   1  1.3825261 1.5132993 1.0053623 1.4157230 1.0365576 0.5088325 0.5346468
#>   2  1.2356874 1.2836121 0.8272231 1.2036807 1.2749810 0.7504044 0.7290180
#>   3  0.7488844 1.1511627 0.8221997 1.0050916 1.2978935 0.7582557 0.7217091
#>   4  0.6226819 0.8323515 0.6358934 0.8472730 0.9999477 0.8490545 0.5387773
#>   5  0.7537316 1.0773580 0.7737720 1.0382377 0.7253995 0.6719341 0.4356582
#>   6  1.1109202 1.2324552 0.8325000 0.8954821 0.5791573 0.4327154 0.3161518
#>   7  1.1514602 1.6612255 1.0195148 0.9819782 0.6253832 0.4588102 0.3521084
#>   8  0.8323871 1.2841676 0.8704207 0.9456131 0.5632890 0.4236797 0.2977184
#>   9  1.1498834 1.6447565 0.7610352 0.9450739 0.7012003 0.6944257 0.4623132
#>   10 0.9956789 1.2377597 0.4972634 1.0765446 0.7673364 0.9515015 0.2808862
#>   11 1.0261985 1.2143262 0.6403105 1.0669023 0.7434026 0.6548760 0.2076072
#>   12 1.4427113 1.8290348 0.7881937 1.0674556 0.9920125 0.6021773 0.2328465
#>   13 1.2438225 1.5726814 0.8814304 1.0537806 0.7385827 0.6159301 0.2537735
#>   14 0.9224359 1.3710136 0.7404066 0.9308010 0.5652540 0.4163347 0.1801950
#>   15 0.9311651 1.3403666 0.6904371 1.2959501 0.6399786 0.5673938 0.2074125
#>   16 0.8402658 1.1956197 0.6915843 0.9666967 0.6217993 0.6083620 0.2754900
#>   17 0.6443863 1.3010694 0.9143397 1.1414850 0.5660591 0.5840596 0.3194834
#>   18 0.8642870 1.3055076 0.6936912 0.7350006 0.5289053 0.4347281 0.2824783
#>   19 1.2747914 2.6867099 1.1566234 0.8420251 0.5822041 0.3783108 0.2195627
#>   20 1.7462148 2.5024316 1.5826158 0.8494849 0.6717303 0.4573795 0.2884152
#>     year
#> age         15        16        17        18        19        20
#>   1  0.6703294 0.5070204 0.2992626 0.2109065 0.3843966 0.1645487
#>   2  0.8568216 0.5923483 0.3007839 0.2881082 0.6019014 0.2073682
#>   3  0.6750188 0.4989298 0.3184695 0.3675621 0.7664899 0.2422118
#>   4  0.6235333 0.7189564 0.3227041 0.3197881 0.9471538 0.3303636
#>   5  0.4605410 0.4733843 0.3402035 0.2902135 0.6603729 0.2187088
#>   6  0.3758261 0.3894748 0.4443280 0.2711196 0.7413935 0.2696001
#>   7  0.3594241 0.4253622 0.5465612 0.3569722 0.8003088 0.4541479
#>   8  0.3953526 0.3414534 0.5321152 0.3778837 0.8071645 0.4572703
#>   9  0.4246257 0.4733899 0.6398721 0.3419992 0.6100309 0.4972779
#>   10 0.5350049 0.6217173 0.6633733 0.3276605 0.6409458 0.6165472
#>   11 0.4437330 0.4942958 0.5100086 0.2622853 0.6271370 0.5920628
#>   12 0.4790243 0.5960396 0.6286882 0.2707014 0.4865718 0.4640805
#>   13 0.4512596 0.5474649 0.4544230 0.4004214 0.5021609 0.4635545
#>   14 0.4171433 0.5875446 0.4811223 0.4303448 0.4375810 0.3333942
#>   15 0.3873215 0.4475987 0.4254280 0.3173989 0.3977861 0.4060923
#>   16 0.4736089 0.4494278 0.4321288 0.3414137 0.4112031 0.3878337
#>   17 0.5615965 0.5294755 0.6136902 0.4612160 0.5320817 0.5611868
#>   18 0.6363670 0.5561738 0.5080013 0.4079621 0.4325577 0.5844602
#>   19 0.6803185 0.5983970 0.5695071 0.5726428 0.4173236 0.5081339
#>   20 0.8207254 0.4786129 0.4499659 0.4645745 0.4484399 0.3708502
#> 
#> $N
#>     year
#> age             1            2            3            4           5
#>   1  13715553.777 38878043.118 47662628.226 24633378.283 35612595.79
#>   2   7071658.859  7071658.859 19737200.265 32900188.034 18578147.21
#>   3   4177066.811  4177066.811  3670279.314 13171341.661 22338008.59
#>   4   2731936.602  2731936.602  2512616.343  2497015.915  9005853.55
#>   5   1932786.665  1932786.665  1955174.860  1640795.469  1605968.41
#>   6   1330726.993  1330726.993  1045929.586  1190626.915  1139084.38
#>   7   1002465.427  1002465.427   801972.939   696640.887   881012.37
#>   8    689134.595   689134.595   646284.260   591510.425   543041.19
#>   9    472738.685   472738.685   517260.922   481005.605   446793.20
#>   10   341005.620   341005.620   363562.262   383453.969   310671.62
#>   11   266141.786   266141.786   278580.007   266017.400   268915.30
#>   12   192656.545   192656.545   205880.166   177161.854   175445.49
#>   13   139294.995   139294.995   151492.874   117329.671   123511.11
#>   14   103034.800   103034.800   114754.431    97486.394    87528.56
#>   15    69759.303    69759.303    87782.728    77050.336    82608.10
#>   16    44514.541    44514.541    54575.221    51502.946    59673.87
#>   17    28200.797    28200.797    34050.836    32893.104    37251.19
#>   18    18911.711    18911.711    22047.690    20443.712    21321.35
#>   19    10761.074    10761.074    12571.027    14380.797    13384.74
#>   20     5793.536     5793.536     7768.818     9772.218    10667.02
#>     year
#> age            6           7            8            9           10
#>   1  99129330.07 93143898.17 111848217.27 1.066212e+08 1.308261e+08
#>   2  18835461.18 29652230.24  32221352.96 2.806762e+07 2.347610e+07
#>   3   9155212.22  4185478.18   6969387.49 9.364650e+06 7.775708e+06
#>   4  12249572.45  3708403.17   1698590.43 3.295780e+06 2.961747e+06
#>   5   5019426.65  4542837.55   1316028.69 9.113000e+05 1.433747e+06
#>   6   1015700.99  1816102.50   1857148.58 6.193325e+05 3.102921e+05
#>   7    625284.27   303801.34    701405.00 6.114770e+05 1.805824e+05
#>   8    530960.26   168392.18    134956.15 2.217666e+05 1.161232e+05
#>   9    384042.59   232663.04     91432.05 5.870722e+04 6.140294e+04
#>   10   274085.14   147975.20    116933.48 2.895413e+04 1.133399e+04
#>   11   175655.35    76893.82     64390.92 4.320371e+04 8.397660e+03
#>   12   150506.52    74087.36     40988.36 2.307556e+04 1.282761e+04
#>   13    99551.64    58600.29     28767.78 9.684986e+03 3.705207e+03
#>   14    82377.37    52080.51     28533.41 8.293181e+03 2.009519e+03
#>   15    70106.07    57479.16     36399.07 1.134344e+04 2.105220e+03
#>   16    68080.28    53376.90     41991.85 1.434467e+04 2.969143e+03
#>   17    45600.16    48575.36     37853.67 1.812350e+04 4.339497e+03
#>   18    27901.22    32547.90     34596.49 1.987260e+04 4.933952e+03
#>   19    15694.13    20500.12     19843.73 1.457730e+04 5.386168e+03
#>   20    10276.35    11687.07     12203.72 5.546111e+03 9.927815e+02
#>     year
#> age            11           12           13           14           15
#>   1  1.625561e+08 1.690321e+08 1.093151e+08 1.917946e+08 1.121850e+08
#>   2  4.787085e+07 3.946049e+07 5.995123e+07 6.571995e+07 1.123679e+08
#>   3  1.026520e+07 1.436545e+07 1.102669e+07 2.830750e+07 3.170215e+07
#>   4  3.417143e+06 3.757178e+06 3.923298e+06 5.165817e+06 1.375521e+07
#>   5  1.568133e+06 1.464526e+06 1.382261e+06 1.678463e+06 3.014054e+06
#>   6  6.613444e+05 5.552417e+05 7.090227e+05 7.059480e+05 1.085695e+06
#>   7  1.349648e+05 2.701001e+05 3.111410e+05 4.599750e+05 5.145999e+05
#>   8  6.514870e+04 5.055369e+04 1.445188e+05 1.966521e+05 3.234562e+05
#>   9  4.862954e+04 2.530645e+04 2.878191e+04 9.460684e+04 1.460162e+05
#>   10 2.868638e+04 1.889991e+04 1.255173e+04 1.437257e+04 5.958576e+04
#>   11 6.893251e+03 9.775486e+03 8.774246e+03 4.846988e+03 1.085293e+04
#>   12 4.426647e+03 2.371780e+03 4.648178e+03 4.558277e+03 3.938304e+03
#>   13 5.832271e+03 1.522246e+03 8.795262e+02 2.545426e+03 3.611410e+03
#>   14 1.534660e+03 2.033230e+03 7.273149e+02 4.750658e+02 1.974913e+03
#>   15 9.583797e+02 6.050210e+02 1.155314e+03 4.796347e+02 3.967309e+02
#>   16 1.055467e+03 2.622489e+02 3.190298e+02 6.550642e+02 3.897917e+02
#>   17 1.486893e+03 4.014333e+02 1.408217e+02 1.736293e+02 4.973248e+02
#>   18 1.739189e+03 4.748312e+02 2.279172e+02 7.852641e+01 1.261459e+02
#>   19 2.465634e+03 8.339499e+02 2.797941e+02 1.475629e+02 5.920208e+01
#>   20 1.694200e+03 1.062287e+03 4.658992e+02 1.916639e+02 1.184738e+02
#>     year
#> age            16           17           18           19           20
#>   1  1.287208e+08 8.106234e+07 1.139834e+08 1.498974e+08 2.502155e+08
#>   2  5.738711e+07 7.752690e+07 6.009676e+07 9.230942e+07 1.020594e+08
#>   3  4.770122e+07 3.173662e+07 5.738834e+07 4.505337e+07 5.056425e+07
#>   4  1.614105e+07 2.896323e+07 2.308082e+07 3.973685e+07 2.093365e+07
#>   5  7.373441e+06 7.864895e+06 2.097483e+07 1.676366e+07 1.541167e+07
#>   6  1.901694e+06 4.592848e+06 5.596860e+06 1.569135e+07 8.661092e+06
#>   7  7.455702e+05 1.288231e+06 2.945187e+06 4.267747e+06 7.476135e+06
#>   8  3.592310e+05 4.872547e+05 7.458052e+05 2.061018e+06 1.917031e+06
#>   9  2.178292e+05 2.553186e+05 2.861946e+05 5.111079e+05 9.194640e+05
#>   10 9.549672e+04 1.356830e+05 1.346448e+05 2.032979e+05 2.777023e+05
#>   11 3.489738e+04 5.128379e+04 6.989177e+04 9.702607e+04 1.070961e+05
#>   12 6.963639e+03 2.128741e+04 3.079542e+04 5.376715e+04 5.182345e+04
#>   13 2.439336e+03 3.836892e+03 1.135238e+04 2.349211e+04 3.305229e+04
#>   14 2.299838e+03 1.410947e+03 2.435713e+03 7.606524e+03 1.421793e+04
#>   15 1.301323e+03 1.277997e+03 8.720911e+02 1.583907e+03 4.910743e+03
#>   16 2.693298e+02 8.317548e+02 8.351584e+02 6.349175e+02 1.064078e+03
#>   17 2.427431e+02 1.718306e+02 5.399135e+02 5.936012e+02 4.208565e+02
#>   18 2.836233e+02 1.429547e+02 9.302039e+01 3.404243e+02 3.486700e+02
#>   19 6.675787e+01 1.626292e+02 8.601543e+01 6.185894e+01 2.208834e+02
#>   20 2.998323e+01 3.669627e+01 9.201631e+01 4.851552e+01 4.075315e+01
#> 
#> $N_at_length
#>       year
#> length            1            2            3            4            5
#>    1   8.333319e-56 2.362159e-55 2.895894e-55 1.496679e-55 2.163756e-55
#>    4   1.007908e-15 2.857010e-15 3.502558e-15 1.810220e-15 2.617044e-15
#>    7   7.374724e-02 2.090436e-01 2.562775e-01 1.324514e-01 1.914856e-01
#>    10  3.078593e+04 8.726565e+04 1.069835e+05 5.529207e+04 7.993602e+04
#>    13  3.684574e+06 1.044428e+07 1.280418e+07 6.617561e+06 9.567040e+06
#>    16  8.457569e+06 2.397186e+07 2.939000e+07 1.519294e+07 2.196021e+07
#>    19  1.636208e+06 4.394292e+06 5.595084e+06 3.318077e+06 4.252501e+06
#>    22  1.528391e+06 1.601783e+06 4.292345e+06 6.995789e+06 4.015194e+06
#>    25  3.131311e+06 3.131852e+06 8.696237e+06 1.453312e+07 8.288281e+06
#>    28  2.124347e+06 2.124349e+06 5.424177e+06 9.486419e+06 6.298360e+06
#>    31  1.395359e+06 1.395359e+06 2.048540e+06 5.018935e+06 6.269312e+06
#>    34  1.544297e+06 1.544297e+06 1.453103e+06 4.724695e+06 7.926711e+06
#>    37  1.372288e+06 1.372288e+06 1.227663e+06 3.513157e+06 6.555775e+06
#>    40  1.138729e+06 1.138729e+06 1.036119e+06 1.949161e+06 4.438294e+06
#>    43  1.037729e+06 1.037729e+06 9.660934e+05 1.169949e+06 3.138021e+06
#>    46  9.415310e+05 9.415310e+05 8.920438e+05 8.768875e+05 2.121415e+06
#>    49  8.401921e+05 8.401921e+05 7.962379e+05 7.381872e+05 1.313659e+06
#>    52  7.522692e+05 7.522692e+05 6.938406e+05 6.478654e+05 8.449030e+05
#>    55  6.730385e+05 6.730385e+05 5.945744e+05 5.708926e+05 6.278747e+05
#>    58  6.003961e+05 6.003961e+05 5.128000e+05 4.999422e+05 5.246829e+05
#>    61  5.336538e+05 5.336538e+05 4.531392e+05 4.383568e+05 4.590917e+05
#>    64  4.710482e+05 4.710482e+05 4.092252e+05 3.888204e+05 4.045757e+05
#>    67  4.120808e+05 4.120808e+05 3.728333e+05 3.498927e+05 3.555750e+05
#>    70  3.576398e+05 3.576398e+05 3.386713e+05 3.172004e+05 3.120009e+05
#>    73  3.086505e+05 3.086505e+05 3.045749e+05 2.863578e+05 2.736749e+05
#>    76  2.652400e+05 2.652400e+05 2.703381e+05 2.549193e+05 2.395365e+05
#>    79  2.267606e+05 2.267606e+05 2.365720e+05 2.225659e+05 2.083579e+05
#>    82  1.922535e+05 1.922535e+05 2.039661e+05 1.902758e+05 1.793417e+05
#>    85  1.609062e+05 1.609062e+05 1.730010e+05 1.593645e+05 1.522133e+05
#>    88  1.322855e+05 1.322855e+05 1.439803e+05 1.308666e+05 1.270229e+05
#>    91  1.063389e+05 1.063389e+05 1.171708e+05 1.053472e+05 1.039354e+05
#>    94  8.325582e+04 8.325582e+04 9.289052e+04 8.299937e+04 8.312737e+04
#>    97  6.328870e+04 6.328870e+04 7.149029e+04 6.382254e+04 6.476253e+04
#>    100 4.660247e+04 4.660247e+04 5.326104e+04 4.774142e+04 4.897875e+04
#>    103 3.318563e+04 3.318563e+04 3.833251e+04 3.463358e+04 3.585011e+04
#>    106 2.283004e+04 2.283004e+04 2.661796e+04 2.430647e+04 2.533905e+04
#>    109 1.516593e+04 1.516593e+04 1.782360e+04 1.647679e+04 1.727028e+04
#>    112 9.728055e+03 9.728055e+03 1.150920e+04 1.077971e+04 1.134398e+04
#>    115 6.027380e+03 6.027380e+03 7.170295e+03 6.805840e+03 7.181826e+03
#>    118 3.609600e+03 3.609600e+03 4.313506e+03 4.148452e+03 4.385154e+03
#>    121 2.091229e+03 2.091229e+03 2.508353e+03 2.443309e+03 2.584978e+03
#>    124 1.173322e+03 1.173322e+03 1.411712e+03 1.391981e+03 1.472997e+03
#>    127 6.382952e+02 6.382952e+02 7.699858e+02 7.680698e+02 8.125290e+02
#>    130 3.371067e+02 3.371067e+02 4.075720e+02 4.110326e+02 4.345330e+02
#>    133 1.730732e+02 1.730732e+02 2.096662e+02 2.136382e+02 2.256435e+02
#>    136 8.649555e+01 8.649555e+01 1.049719e+02 1.080029e+02 1.139480e+02
#>    139 4.213527e+01 4.213527e+01 5.122115e+01 5.318255e+01 5.604424e+01
#>    142 2.003391e+01 2.003391e+01 2.439246e+01 2.554422e+01 2.688646e+01
#>    145 9.309409e+00 9.309409e+00 1.135203e+01 1.198401e+01 1.259883e+01
#>    148 4.233189e+00 4.233189e+00 5.169688e+00 5.498885e+00 5.774462e+00
#>    151 1.885979e+00 1.885979e+00 2.306583e+00 2.470953e+00 2.592042e+00
#>    154 8.242208e-01 8.242208e-01 1.009497e+00 1.088687e+00 1.140931e+00
#>    157 3.537370e-01 3.537370e-01 4.338780e-01 4.708672e-01 4.930325e-01
#>    160 1.492513e-01 1.492513e-01 1.833276e-01 2.001398e-01 2.093993e-01
#>    163 6.197332e-02 6.197332e-02 7.623153e-02 8.368896e-02 8.750208e-02
#>    166 2.534935e-02 2.534935e-02 3.122583e-02 3.446186e-02 3.601146e-02
#>    169 1.022372e-02 1.022372e-02 1.261160e-02 1.398810e-02 1.461014e-02
#>    172 4.069253e-03 4.069253e-03 5.026735e-03 5.601704e-03 5.848555e-03
#>    175 1.599734e-03 1.599734e-03 1.978901e-03 2.215100e-03 2.312022e-03
#>    178 6.216585e-04 6.216585e-04 7.700659e-04 8.656236e-04 9.033003e-04
#>    181 2.389750e-04 2.389750e-04 2.964297e-04 3.345481e-04 3.490584e-04
#>    184 9.094041e-05 9.094041e-05 1.129567e-04 1.279661e-04 1.335058e-04
#>    187 3.428123e-05 3.428123e-05 4.263728e-05 4.847682e-05 5.057450e-05
#>    190 1.280929e-05 1.280929e-05 1.595247e-05 1.819934e-05 1.898758e-05
#>    193 4.747007e-06 4.747007e-06 5.919485e-06 6.775190e-06 7.069256e-06
#>    196 1.745809e-06 1.745809e-06 2.179773e-06 2.502578e-06 2.611545e-06
#>    199 6.374804e-07 6.374804e-07 7.969383e-07 9.176527e-07 9.577762e-07
#>    202 2.312455e-07 2.312455e-07 2.894418e-07 3.342163e-07 3.489017e-07
#>    205 8.335099e-08 8.335099e-08 1.044553e-07 1.209421e-07 1.262881e-07
#>    208 2.988097e-08 2.988097e-08 3.749070e-08 4.351775e-08 4.545357e-08
#>    211 1.066495e-08 1.066495e-08 1.339530e-08 1.558296e-08 1.627993e-08
#>    214 3.783314e-09 3.783314e-09 4.757613e-09 5.548482e-09 5.799346e-09
#>    217 1.338130e-09 1.338130e-09 1.684762e-09 1.967881e-09 2.057517e-09
#>    220 4.703673e-10 4.703673e-10 5.926892e-10 6.942847e-10 7.260400e-10
#>    223 1.637183e-10 1.637183e-10 2.065625e-10 2.430120e-10 2.539308e-10
#>    226 5.703001e-11 5.703001e-11 7.206364e-11 8.489008e-11 8.888653e-11
#>    229 1.781310e-11 1.781310e-11 2.269315e-11 2.709994e-11 2.844388e-11
#>    232 8.348330e-12 8.348330e-12 1.041419e-11 1.197249e-11 1.244482e-11
#>    235 2.481143e-12 2.481143e-12 3.120688e-12 3.766457e-12 3.854560e-12
#>    238 6.432117e-13 6.432117e-13 8.625121e-13 1.084934e-12 1.184277e-12
#>       year
#> length            6            7            8            9           10
#>    1   6.022916e-55 5.659253e-55 6.795693e-55 6.478107e-55 7.948755e-55
#>    4   7.284665e-15 6.844817e-15 8.219331e-15 7.835214e-15 9.613950e-15
#>    7   5.330091e-01 5.008260e-01 6.013973e-01 5.732920e-01 7.034397e-01
#>    10  2.225057e+05 2.090708e+05 2.510545e+05 2.393218e+05 2.936523e+05
#>    13  2.663030e+07 2.502236e+07 3.004713e+07 2.864293e+07 3.514539e+07
#>    16  6.112239e+07 5.743359e+07 6.896638e+07 6.574296e+07 8.066618e+07
#>    19  1.121946e+07 1.076657e+07 1.286503e+07 1.221406e+07 1.478095e+07
#>    22  4.253273e+06 6.511301e+06 7.106712e+06 6.217709e+06 5.322034e+06
#>    25  8.330907e+06 1.305803e+07 1.420283e+07 1.239006e+07 1.036378e+07
#>    28  5.534736e+06 8.065178e+06 8.916353e+06 7.975075e+06 6.666890e+06
#>    31  3.287015e+06 2.773882e+06 3.557623e+06 3.858911e+06 3.215477e+06
#>    34  3.628104e+06 1.736362e+06 2.614355e+06 3.444433e+06 2.869366e+06
#>    37  3.827177e+06 1.524835e+06 1.916939e+06 2.696178e+06 2.271563e+06
#>    40  4.054224e+06 1.460567e+06 1.139426e+06 1.750836e+06 1.529655e+06
#>    43  4.011433e+06 1.560171e+06 7.745334e+05 1.211849e+06 1.131365e+06
#>    46  3.305089e+06 1.630328e+06 6.627905e+05 8.506605e+05 8.677332e+05
#>    49  2.383704e+06 1.575766e+06 6.479419e+05 5.806299e+05 6.378402e+05
#>    52  1.614348e+06 1.362046e+06 6.613836e+05 4.221343e+05 4.476626e+05
#>    55  1.054737e+06 1.042507e+06 6.455158e+05 3.429466e+05 2.998787e+05
#>    58  6.887739e+05 7.217924e+05 5.717207e+05 2.971687e+05 1.966603e+05
#>    61  4.789969e+05 4.688872e+05 4.539694e+05 2.565504e+05 1.327920e+05
#>    64  3.686947e+05 2.999946e+05 3.280550e+05 2.108613e+05 9.492101e+04
#>    67  3.079401e+05 2.011448e+05 2.230689e+05 1.620845e+05 7.059630e+04
#>    70  2.671228e+05 1.484751e+05 1.496097e+05 1.170118e+05 5.274252e+04
#>    73  2.333087e+05 1.204875e+05 1.041574e+05 8.099745e+04 3.861912e+04
#>    76  2.025421e+05 1.033628e+05 7.788769e+04 5.553994e+04 2.752522e+04
#>    79  1.743988e+05 9.062417e+04 6.271240e+04 3.913655e+04 1.925805e+04
#>    82  1.492181e+05 8.017176e+04 5.339250e+04 2.917353e+04 1.348661e+04
#>    85  1.270555e+05 7.148280e+04 4.717427e+04 2.326662e+04 9.686760e+03
#>    88  1.075372e+05 6.412454e+04 4.266086e+04 1.971382e+04 7.280168e+03
#>    91  9.008985e+04 5.742981e+04 3.896001e+04 1.741161e+04 5.761667e+03
#>    94  7.422758e+04 5.073380e+04 3.537309e+04 1.564929e+04 4.752223e+03
#>    97  5.972679e+04 4.366714e+04 3.142928e+04 1.398157e+04 3.998715e+03
#>    100 4.663686e+04 3.626544e+04 2.697906e+04 1.218322e+04 3.353756e+03
#>    103 3.516549e+04 2.887853e+04 2.218365e+04 1.021904e+04 2.750994e+03
#>    106 2.552227e+04 2.197634e+04 1.739185e+04 8.187543e+03 2.178718e+03
#>    109 1.779826e+04 1.596372e+04 1.297850e+04 6.243491e+03 1.653540e+03
#>    112 1.191944e+04 1.107238e+04 9.220584e+03 4.527484e+03 1.198369e+03
#>    115 7.668420e+03 7.341713e+03 6.245027e+03 3.124632e+03 8.285427e+02
#>    118 4.744034e+03 4.661820e+03 4.040327e+03 2.056025e+03 5.468496e+02
#>    121 2.826026e+03 2.840481e+03 2.502690e+03 1.292825e+03 3.450900e+02
#>    124 1.623646e+03 1.664333e+03 1.487859e+03 7.787952e+02 2.086450e+02
#>    127 9.012609e+02 9.398293e+02 8.510211e+02 4.506042e+02 1.211426e+02
#>    130 4.842098e+02 5.125720e+02 4.694371e+02 2.510470e+02 6.770702e+01
#>    133 2.522438e+02 2.705622e+02 2.503036e+02 1.350090e+02 3.651277e+01
#>    136 1.276370e+02 1.385028e+02 1.292870e+02 7.024691e+01 1.904252e+01
#>    139 6.284098e+01 6.889066e+01 6.482376e+01 3.544060e+01 9.625490e+00
#>    142 3.015305e+01 3.335492e+01 3.161156e+01 1.737317e+01 4.725405e+00
#>    145 1.412278e+01 1.574711e+01 1.502032e+01 8.290852e+00 2.257456e+00
#>    148 6.466282e+00 7.260784e+00 6.965838e+00 3.858727e+00 1.051375e+00
#>    151 2.898311e+00 3.274662e+00 3.158062e+00 1.754466e+00 4.781856e-01
#>    154 1.273409e+00 1.446665e+00 1.401744e+00 7.805202e-01 2.127305e-01
#>    157 5.491208e-01 6.268579e-01 6.099905e-01 3.402496e-01 9.270556e-02
#>    160 2.326793e-01 2.667559e-01 2.605856e-01 1.455390e-01 3.963046e-02
#>    163 9.698855e-02 1.116128e-01 1.094160e-01 6.116219e-02 1.664043e-02
#>    166 3.981171e-02 4.596719e-02 4.520742e-02 2.528286e-02 6.871303e-03
#>    169 1.610857e-02 1.865373e-02 1.839932e-02 1.029181e-02 2.793476e-03
#>    172 6.430746e-03 7.466021e-03 7.383994e-03 4.129819e-03 1.119289e-03
#>    175 2.535148e-03 2.949947e-03 2.924730e-03 1.635182e-03 4.424461e-04
#>    178 9.877332e-04 1.151628e-03 1.144370e-03 6.394286e-04 1.727038e-04
#>    181 3.806327e-04 4.445623e-04 4.426817e-04 2.471599e-04 6.662581e-05
#>    184 1.451840e-04 1.698256e-04 1.694324e-04 9.450839e-05 2.542346e-05
#>    187 5.484989e-05 6.424394e-05 6.420909e-05 3.577613e-05 9.603034e-06
#>    190 2.053797e-05 2.408293e-05 2.410946e-05 1.341687e-05 3.593130e-06
#>    193 7.626532e-06 8.951720e-06 8.975258e-06 4.988026e-06 1.332654e-06
#>    196 2.810210e-06 3.301281e-06 3.314649e-06 1.839481e-06 4.902491e-07
#>    199 1.028062e-06 1.208582e-06 1.215078e-06 6.732883e-07 1.789877e-07
#>    202 3.735923e-07 4.394569e-07 4.423618e-07 2.447276e-07 6.489014e-08
#>    205 1.349054e-07 1.587768e-07 1.600144e-07 8.837958e-08 2.337206e-08
#>    208 4.844253e-08 5.703718e-08 5.754263e-08 3.172750e-08 8.367655e-09
#>    211 1.730991e-08 2.038297e-08 2.058186e-08 1.132749e-08 2.979255e-09
#>    214 6.154256e-09 7.249341e-09 7.327263e-09 4.025530e-09 1.055880e-09
#>    217 2.176898e-09 2.563635e-09 2.592618e-09 1.421220e-09 3.716137e-10
#>    220 7.676667e-10 9.050599e-10 9.168777e-10 5.021870e-10 1.310141e-10
#>    223 2.677032e-10 3.166996e-10 3.214064e-10 1.761828e-10 4.594876e-11
#>    226 9.351259e-11 1.103784e-10 1.116034e-10 6.084430e-11 1.578751e-11
#>    229 2.946262e-11 3.477536e-11 3.568642e-11 1.914753e-11 4.813473e-12
#>    232 1.342788e-11 1.595064e-11 1.637649e-11 9.137563e-12 2.405074e-12
#>    235 4.024207e-12 4.871022e-12 4.912868e-12 2.849889e-12 8.184265e-13
#>    238 1.140904e-12 1.297526e-12 1.354885e-12 6.157420e-13 1.102209e-13
#>       year
#> length           11           12           13           14           15
#>    1   9.876610e-55 1.027008e-54 6.641788e-55 1.165309e-54 6.816154e-55
#>    4   1.194567e-14 1.242158e-14 8.033185e-15 1.409431e-14 8.244078e-15
#>    7   8.740487e-01 9.088699e-01 5.877773e-01 1.031262e+00 6.032081e-01
#>    10  3.648733e+05 3.794095e+05 2.453687e+05 4.305022e+05 2.518104e+05
#>    13  4.366939e+07 4.540914e+07 2.936664e+07 5.152410e+07 3.013760e+07
#>    16  1.002334e+08 1.042250e+08 6.740870e+07 1.182635e+08 6.918592e+07
#>    19  1.871712e+07 1.926899e+07 1.310824e+07 2.225726e+07 1.440739e+07
#>    22  1.054780e+07 8.797452e+06 1.293445e+07 1.439057e+07 2.397404e+07
#>    25  2.110040e+07 1.742623e+07 2.641316e+07 2.904467e+07 4.956493e+07
#>    28  1.324144e+07 1.128777e+07 1.646748e+07 1.907571e+07 3.156276e+07
#>    31  5.268849e+06 5.695682e+06 6.179180e+06 1.048250e+07 1.412895e+07
#>    34  3.885530e+06 5.213638e+06 4.240629e+06 1.011238e+07 1.187000e+07
#>    37  2.940536e+06 3.965876e+06 3.193705e+06 7.512327e+06 9.472312e+06
#>    40  1.889060e+06 2.368708e+06 2.082031e+06 4.080650e+06 6.561495e+06
#>    43  1.331745e+06 1.514364e+06 1.468471e+06 2.262855e+06 4.781961e+06
#>    46  1.001112e+06 1.059790e+06 1.065895e+06 1.430271e+06 3.309613e+06
#>    49  7.433336e+05 7.437894e+05 7.522609e+05 9.449378e+05 2.063570e+06
#>    52  5.447413e+05 5.230289e+05 5.389460e+05 6.465048e+05 1.255904e+06
#>    55  3.882017e+05 3.683770e+05 3.971741e+05 4.627079e+05 7.996681e+05
#>    58  2.643472e+05 2.572723e+05 2.944293e+05 3.432039e+05 5.383826e+05
#>    61  1.722084e+05 1.770407e+05 2.152554e+05 2.596216e+05 3.792287e+05
#>    64  1.093476e+05 1.190343e+05 1.534593e+05 1.959856e+05 2.756789e+05
#>    67  6.984340e+04 7.766615e+04 1.059746e+05 1.445210e+05 2.030751e+05
#>    70  4.626314e+04 4.937333e+04 7.063413e+04 1.026637e+05 1.485431e+05
#>    73  3.207531e+04 3.108804e+04 4.544879e+04 6.981484e+04 1.060442e+05
#>    76  2.292088e+04 1.979733e+04 2.839007e+04 4.539291e+04 7.304126e+04
#>    79  1.649856e+04 1.291868e+04 1.741141e+04 2.828814e+04 4.827575e+04
#>    82  1.179532e+04 8.630928e+03 1.063532e+04 1.700277e+04 3.060681e+04
#>    85  8.371501e+03 5.848975e+03 6.553650e+03 9.960454e+03 1.868380e+04
#>    88  5.957713e+03 3.989861e+03 4.104575e+03 5.767182e+03 1.105973e+04
#>    91  4.312233e+03 2.738342e+03 2.617221e+03 3.350573e+03 6.409357e+03
#>    94  3.207952e+03 1.901533e+03 1.696513e+03 1.977239e+03 3.675727e+03
#>    97  2.453995e+03 1.344545e+03 1.115582e+03 1.192246e+03 2.106839e+03
#>    100 1.910743e+03 9.694012e+02 7.424706e+02 7.337181e+02 1.215166e+03
#>    103 1.490119e+03 7.083402e+02 4.983770e+02 4.579577e+02 7.068596e+02
#>    106 1.145442e+03 5.185160e+02 3.355058e+02 2.874886e+02 4.137861e+02
#>    109 8.571447e+02 3.753685e+02 2.248657e+02 1.800283e+02 2.425167e+02
#>    112 6.193499e+02 2.658022e+02 1.488853e+02 1.116648e+02 1.414362e+02
#>    115 4.301987e+02 1.826781e+02 9.671016e+01 6.821705e+01 8.160851e+01
#>    118 2.867043e+02 1.212828e+02 6.129883e+01 4.086990e+01 4.637093e+01
#>    121 1.832964e+02 7.760550e+01 3.777540e+01 2.393887e+01 2.585900e+01
#>    124 1.125147e+02 4.782808e+01 2.258511e+01 1.368033e+01 1.412010e+01
#>    127 6.641229e+01 2.840241e+01 1.308849e+01 7.618279e+00 7.539108e+00
#>    130 3.776297e+01 1.626978e+01 7.351651e+00 4.131974e+00 3.933262e+00
#>    133 2.072643e+01 9.003321e+00 4.004426e+00 2.182731e+00 2.004726e+00
#>    136 1.100287e+01 4.821106e+00 2.117174e+00 1.123458e+00 9.984099e-01
#>    139 5.660892e+00 2.502538e+00 1.087776e+00 5.637929e-01 4.860886e-01
#>    142 2.828187e+00 1.261475e+00 5.438194e-01 2.760987e-01 2.315043e-01
#>    145 1.374637e+00 6.185891e-01 2.649096e-01 1.320746e-01 1.079397e-01
#>    148 6.511715e-01 2.955888e-01 1.259136e-01 6.177944e-02 4.931285e-02
#>    151 3.011332e-01 1.378611e-01 5.847619e-02 2.828871e-02 2.209510e-02
#>    154 1.361642e-01 6.285415e-02 2.657064e-02 1.269418e-02 9.718490e-03
#>    157 6.029097e-02 2.805433e-02 1.182790e-02 5.588469e-03 4.200301e-03
#>    160 2.617758e-02 1.227547e-02 5.164618e-03 2.416244e-03 1.785453e-03
#>    163 1.115988e-02 5.272444e-03 2.214686e-03 1.027066e-03 7.471399e-04
#>    166 4.677044e-03 2.225619e-03 9.337308e-04 4.296342e-04 3.080548e-04
#>    169 1.929123e-03 9.243817e-04 3.874658e-04 1.770347e-04 1.252564e-04
#>    172 7.839494e-04 3.781635e-04 1.584121e-04 7.192403e-05 5.026634e-05
#>    175 3.141880e-04 1.525361e-04 6.387096e-05 2.883530e-05 1.992520e-05
#>    178 1.242998e-04 6.072118e-05 2.541978e-05 1.141747e-05 7.807361e-06
#>    181 4.858594e-05 2.387628e-05 9.994561e-06 4.468402e-06 3.026172e-06
#>    184 1.877874e-05 9.281376e-06 3.885333e-06 1.729797e-06 1.161093e-06
#>    187 7.182446e-06 3.569568e-06 1.494495e-06 6.628362e-07 4.412741e-07
#>    190 2.720453e-06 1.359233e-06 5.692088e-07 2.515800e-07 1.662199e-07
#>    193 1.021097e-06 5.127957e-07 2.148077e-07 9.464032e-08 6.209271e-08
#>    196 3.800377e-07 1.918000e-07 8.037258e-08 3.530848e-08 2.301664e-08
#>    199 1.403388e-07 7.116521e-08 2.983308e-08 1.307097e-08 8.469751e-09
#>    202 5.144761e-08 2.620900e-08 1.099174e-08 4.804132e-09 3.096029e-09
#>    205 1.873308e-08 9.585563e-09 4.021927e-09 1.753790e-09 1.124227e-09
#>    208 6.778561e-09 3.483445e-09 1.462295e-09 6.363198e-10 4.060423e-10
#>    211 2.438724e-09 1.258540e-09 5.286003e-10 2.296037e-10 1.459953e-10
#>    214 8.728970e-10 4.521684e-10 1.899998e-10 8.241454e-11 5.214079e-11
#>    217 3.105013e-10 1.615296e-10 6.797861e-11 2.941531e-11 1.853620e-11
#>    220 1.103180e-10 5.755233e-11 2.419900e-11 1.045762e-11 6.568531e-12
#>    223 3.906518e-11 2.045188e-11 8.592534e-12 3.691368e-12 2.308801e-12
#>    226 1.360522e-11 7.159939e-12 3.009243e-12 1.296180e-12 8.206028e-13
#>    229 4.485648e-12 2.428003e-12 1.028886e-12 4.359917e-13 2.639009e-13
#>    232 1.869133e-12 9.455161e-13 3.977819e-13 1.691575e-13 1.060699e-13
#>    235 6.499284e-13 3.284621e-13 1.345138e-13 5.894070e-14 3.287921e-14
#>    238 1.880940e-13 1.179375e-13 5.172520e-14 2.127896e-14 1.315323e-14
#>       year
#> length           16           17           18           19           20
#>    1   7.820837e-55 4.925199e-55 6.925421e-55 9.107493e-55 1.520264e-54
#>    4   9.459234e-15 5.956986e-15 8.376237e-15 1.101543e-14 1.838746e-14
#>    7   6.921194e-01 4.358646e-01 6.128779e-01 8.059844e-01 1.345385e+00
#>    10  2.889266e+05 1.819525e+05 2.558471e+05 3.364597e+05 5.616337e+05
#>    13  3.457980e+07 2.177675e+07 3.062073e+07 4.026875e+07 6.721840e+07
#>    16  7.937312e+07 4.999165e+07 7.028699e+07 9.243509e+07 1.542891e+08
#>    19  1.518716e+07 1.034157e+07 1.362268e+07 1.816432e+07 2.934342e+07
#>    22  1.245521e+07 1.655227e+07 1.298334e+07 1.986481e+07 2.220948e+07
#>    25  2.548645e+07 3.425060e+07 2.672992e+07 4.082212e+07 4.513973e+07
#>    28  1.810930e+07 2.240211e+07 1.943457e+07 2.713302e+07 3.004244e+07
#>    31  1.445170e+07 1.208207e+07 1.685817e+07 1.606732e+07 1.784099e+07
#>    34  1.694050e+07 1.218128e+07 2.045368e+07 1.712549e+07 1.837579e+07
#>    37  1.362596e+07 1.146779e+07 1.692848e+07 1.612241e+07 1.499913e+07
#>    40  8.840762e+06 1.044911e+07 1.191144e+07 1.467784e+07 1.055224e+07
#>    43  6.257306e+06 9.361249e+06 9.728710e+06 1.354871e+07 8.462518e+06
#>    46  4.676310e+06 7.180998e+06 8.712565e+06 1.132319e+07 7.355246e+06
#>    49  3.391200e+06 4.898432e+06 7.593291e+06 9.036373e+06 6.439809e+06
#>    52  2.371103e+06 3.339946e+06 6.090124e+06 7.472570e+06 5.599263e+06
#>    55  1.588551e+06 2.375923e+06 4.435409e+06 6.273059e+06 4.797194e+06
#>    58  1.027845e+06 1.702267e+06 3.023287e+06 5.038329e+06 4.043389e+06
#>    61  6.623144e+05 1.183901e+06 2.011022e+06 3.759741e+06 3.315305e+06
#>    64  4.372065e+05 7.924799e+05 1.329867e+06 2.615161e+06 2.590897e+06
#>    67  2.981551e+05 5.173041e+05 8.692546e+05 1.727704e+06 1.903733e+06
#>    70  2.082441e+05 3.360326e+05 5.564766e+05 1.104808e+06 1.315282e+06
#>    73  1.465488e+05 2.202661e+05 3.490423e+05 6.915825e+05 8.632893e+05
#>    76  1.021477e+05 1.458727e+05 2.164246e+05 4.258410e+05 5.459474e+05
#>    79  6.953778e+04 9.673269e+04 1.340254e+05 2.588346e+05 3.369609e+05
#>    82  4.580931e+04 6.344017e+04 8.332356e+04 1.560582e+05 2.048607e+05
#>    85  2.907770e+04 4.071404e+04 5.190169e+04 9.380650e+04 1.233980e+05
#>    88  1.778349e+04 2.539728e+04 3.216686e+04 5.635311e+04 7.389037e+04
#>    91  1.051394e+04 1.535505e+04 1.967478e+04 3.377510e+04 4.404654e+04
#>    94  6.044020e+03 9.000338e+03 1.179833e+04 2.009403e+04 2.612231e+04
#>    97  3.403134e+03 5.127960e+03 6.909136e+03 1.179252e+04 1.537279e+04
#>    100 1.891235e+03 2.851866e+03 3.945767e+03 6.789357e+03 8.941395e+03
#>    103 1.044195e+03 1.555962e+03 2.199137e+03 3.820546e+03 5.117797e+03
#>    106 5.752137e+02 8.370686e+02 1.198668e+03 2.097648e+03 2.871746e+03
#>    109 3.165398e+02 4.459512e+02 6.407628e+02 1.123541e+03 1.575548e+03
#>    112 1.737472e+02 2.359484e+02 3.369139e+02 5.876574e+02 8.439342e+02
#>    115 9.480711e+01 1.241100e+02 1.746861e+02 3.006454e+02 4.411778e+02
#>    118 5.122038e+01 6.485989e+01 8.947061e+01 1.507320e+02 2.251841e+02
#>    121 2.729386e+01 3.361356e+01 4.530611e+01 7.419564e+01 1.123324e+02
#>    124 1.430093e+01 1.723269e+01 2.268263e+01 3.591359e+01 5.483615e+01
#>    127 7.351566e+00 8.717872e+00 1.122079e+01 1.711472e+01 2.623126e+01
#>    130 3.702615e+00 4.342672e+00 5.479324e+00 8.036393e+00 1.231242e+01
#>    133 1.825751e+00 2.126627e+00 2.638437e+00 3.719893e+00 5.677676e+00
#>    136 8.812412e-01 1.022713e+00 1.251615e+00 1.697698e+00 2.574914e+00
#>    139 4.164354e-01 4.827271e-01 5.844992e-01 7.639469e-01 1.149498e+00
#>    142 1.927499e-01 2.235994e-01 2.685885e-01 3.389393e-01 5.055089e-01
#>    145 8.743930e-02 1.016557e-01 1.214221e-01 1.482597e-01 2.191238e-01
#>    148 3.890524e-02 4.537909e-02 5.400485e-02 6.394074e-02 9.367291e-02
#>    151 1.699236e-02 1.990133e-02 2.363715e-02 2.719155e-02 3.950920e-02
#>    154 7.291490e-03 8.580180e-03 1.018479e-02 1.140463e-02 1.644833e-02
#>    157 3.076639e-03 3.639251e-03 4.322330e-03 4.718974e-03 6.761734e-03
#>    160 1.277663e-03 1.519702e-03 1.807761e-03 1.927065e-03 2.745873e-03
#>    163 5.226518e-04 6.252755e-04 7.455737e-04 7.769975e-04 1.101961e-03
#>    166 2.107824e-04 2.536804e-04 3.034225e-04 3.094786e-04 4.372189e-04
#>    169 8.387662e-05 1.015632e-04 1.219268e-04 1.218312e-04 1.715807e-04
#>    172 3.295937e-05 4.015539e-05 4.840960e-05 4.742885e-05 6.663014e-05
#>    175 1.279915e-05 1.569001e-05 1.900325e-05 1.826950e-05 2.561568e-05
#>    178 4.915510e-06 6.062886e-06 7.380164e-06 6.967193e-06 9.753909e-06
#>    181 1.868293e-06 2.318475e-06 2.837356e-06 2.631955e-06 3.680376e-06
#>    184 7.032348e-07 8.779508e-07 1.080510e-06 9.854245e-07 1.376726e-06
#>    187 2.623129e-07 3.294279e-07 4.078237e-07 3.658865e-07 5.108146e-07
#>    190 9.701861e-08 1.225512e-07 1.526418e-07 1.347907e-07 1.880730e-07
#>    193 3.560036e-08 4.522352e-08 5.668084e-08 4.928582e-08 6.873726e-08
#>    196 1.296874e-08 1.656665e-08 2.089834e-08 1.790707e-08 2.496088e-08
#>    199 4.691594e-09 6.025012e-09 7.649770e-09 6.459511e-09 9.000794e-09
#>    202 1.686730e-09 2.177340e-09 2.783100e-09 2.318030e-09 3.228407e-09
#>    205 6.024748e-10 7.817962e-10 1.005744e-09 8.253605e-10 1.148487e-09
#>    208 2.141943e-10 2.792623e-10 3.617559e-10 2.931348e-10 4.076670e-10
#>    211 7.596245e-11 9.939399e-11 1.296462e-10 1.041940e-10 1.451821e-10
#>    214 2.664954e-11 3.512971e-11 4.612864e-11 3.639100e-11 5.045681e-11
#>    217 9.414973e-12 1.242038e-11 1.636316e-11 1.282129e-11 1.797639e-11
#>    220 3.264279e-12 4.329609e-12 5.762197e-12 4.448587e-12 6.128292e-12
#>    223 1.125379e-12 1.491218e-12 2.004050e-12 1.523867e-12 2.101326e-12
#>    226 3.849607e-13 5.150241e-13 7.149807e-13 5.339778e-13 7.233531e-13
#>    229 1.177247e-13 1.573528e-13 2.221955e-13 1.568328e-13 2.137187e-13
#>    232 6.628458e-14 7.642674e-14 9.072178e-14 8.384797e-14 1.149032e-13
#>    235 1.406923e-14 2.620368e-14 2.998136e-14 1.764033e-14 3.357200e-14
#>    238 3.328807e-15 4.074105e-15 1.021586e-14 5.386305e-15 4.524508e-15
#> 
#> $sim_length
#> function (age = NULL, length_age_key = FALSE) 
#> {
#>     pred_length <- Linf - (Linf - L0) * exp(-K * age)
#>     if (length_age_key) {
#>         breaks <- seq(0, ceiling(max(pred_length)) * 10, length_group)
#>         lak <- matrix(NA, ncol = length(pred_length), nrow = length(breaks) - 
#>             1, dimnames = list(length = group_lengths(breaks, 
#>             length_group)[-length(breaks)], age = age))
#>         for (i in seq_along(breaks)[-1]) {
#>             for (j in seq_along(pred_length)) {
#>                 lak[i - 1, j] <- stats::pnorm(log(breaks[i]), 
#>                   log(pred_length[j]), sd = log_sd) - stats::pnorm(log(breaks[i - 
#>                   1]), log(pred_length[j]), sd = log_sd)
#>             }
#>         }
#>         lak <- lak[rowSums(lak) > 0, ]
#>         if (plot) 
#>             graphics::image(x = as.numeric(colnames(lak)), y = as.numeric(rownames(lak)), 
#>                 z = t(lak), xlab = "Age", ylab = "Length", main = "P(Length | Age)", 
#>                 col = viridis::viridis(100))
#>         return(lak)
#>     }
#>     else {
#>         log_length <- stats::rnorm(length(age), log(pred_length), 
#>             sd = log_sd)
#>         length <- round(exp(log_length), digits)
#>         if (plot) 
#>             plot(age, length)
#>         return(length)
#>     }
#> }
#> <bytecode: 0x55d5ac817108>
#> <environment: 0x55d5a554bcd0>
#>