Simulation methods for a4a stock assessment fits.

simulate(object, nsim = 1, seed = NULL, ...)

# S4 method for a4aFitSA
simulate(object, nsim = 1, seed = NULL, empirical = TRUE)

# S4 method for SCAPars
simulate(object, nsim = 1, seed = NULL, empirical = TRUE)

# S4 method for a4aStkParams
simulate(object, nsim = 1, seed = NULL, empirical = TRUE)

# S4 method for submodels
simulate(object, nsim = 1, seed = NULL, empirical = TRUE)

# S4 method for submodel
simulate(object, nsim = 1, seed = NULL, empirical = TRUE)

Arguments

object

object of relevant class (see signature of method)

nsim

number of iterations

seed

numeric with random number seed

...

additional argument list that might never be used

empirical

logical, shall the empirical method in MASS be used

Examples

data(ple4)
data(ple4.index)
fmodel <- ~factor(age) + factor(year)
qmodel <- list(~factor(age))
fit1 <-  sca(fmodel=fmodel, qmodel=qmodel, stock=ple4, indices=FLIndices(ple4.index))
fit1
#> a4a model fit for: PLE 
#> 
#> Call:
#> .local(stock = stock, indices = indices, fmodel = ..1, qmodel = ..2)
#> 
#> Time used:
#>  Pre-processing     Running a4a Post-processing           Total 
#>       0.5536301       5.1830571       0.3269377       6.0636249 
#> 
#> Submodels:
#> 	 fmodel: ~factor(age) + factor(year)
#> 	srmodel: ~factor(year)
#> 	n1model: ~s(age, k = 3)
#> 	 qmodel:
#> 	   BTS-Combined (all): ~factor(age)
#> 	 vmodel:
#> 	   catch:              ~s(age, k = 3)
#> 	   BTS-Combined (all): ~1
summary(fit1)
#> An object of class "a4aFitSA"
#> 
#> Name: PLE 
#> Description: Plaice in IV. ICES WGNSSK 2018. FLAAP 
#> Quant: age 
#> Dims:  age 	year	unit	season	area	iter
#> 	10	61	1	1	1	1	
#> 
#> Range:  min	max	pgroup	minyear	maxyear	minfbar	maxfbar 
#> 	1	10	10	1957	2017	2	6	
#> 
stock.n(fit1)
#> An object of class "FLQuant"
#> , , unit = unique, season = all, area = unique
#> 
#>     year
#> age  1957      1958      1959      1960      1961      1962      1963     
#>   1   473837.5  701921.4  859864.3  780079.5  841326.2  596229.5  620993.3
#>   2   345321.1  389772.0  567538.2  685313.8  618715.5  668173.6  472960.5
#>   3   248715.7  259057.7  282673.0  400116.3  478558.1  433175.2  466717.5
#>   4   178376.5  173026.4  171865.5  180238.7  251730.4  302178.4  272633.5
#>   5   126843.5  123614.9  114268.3  109023.5  112792.2  158114.0  189175.2
#>   6    89158.0   87977.7   81719.0   72569.2   68307.1   70929.0   99102.6
#>   7    61879.4   62217.1   58579.8   52320.3   45851.5   43314.1   44832.1
#>   8    42451.5   44470.9   42891.8   39004.4   34430.2   30269.6   28513.1
#>   9    28875.9   31531.6   31874.8   29840.7   26864.8   23779.3   20854.7
#>   10   19558.3   34689.0   44400.9   48589.5   48856.7   47044.8   43647.8
#>     year
#> age  1964      1965      1966      1967      1968      1969      1970     
#>   1  2640249.1  728826.9  610747.4  421925.0  386388.6  596409.0  603691.1
#>   2   487964.7 2057492.6  569303.7  482262.9  335494.9  306974.3  471849.1
#>   3   324267.8  329133.2 1394248.1  394093.3  338444.2  235047.6  213303.4
#>   4   286171.9  194324.5  198529.7  866503.9  249672.6  213911.8  146855.7
#>   5   166215.2  170460.0  116518.9  122704.0  546097.1  156975.1  132925.6
#>   6   115480.4   99140.5  102345.1   72104.4   77422.1  343746.6   97663.0
#>   7    61043.8   69539.5   60086.0   63886.9   45872.6   49140.9  215705.7
#>   8    28844.7   38494.7   44103.3   39118.4   42299.0   30309.3   32142.0
#>   9    19263.1   19154.7   25688.3   30098.9   27084.7   29234.9   20767.5
#>   10   38559.8   33844.4   31478.9   35794.9   42101.6   43415.4   45189.6
#>     year
#> age  1971      1972      1973      1974      1975      1976      1977     
#>   1   399389.9  348898.5 1345588.8 1017694.4  698844.7  548565.9  778479.0
#>   2   476060.3  313061.0  269546.7 1019844.8  763211.4  527449.0  417317.3
#>   3   325778.7  324817.8  207597.0  172138.4  637884.6  483394.5  339318.3
#>   4   132079.6  198404.9  190062.3  115225.7   92797.1  349978.1  271076.9
#>   5    90429.5   79972.6  115352.5  104738.7   61645.5   50540.6  194885.4
#>   6    81953.2   54824.8   46562.3   63669.5   56129.8   33629.4   28187.6
#>   7    60743.6   50143.5   32244.4   25992.9   34532.4   30977.3   18964.8
#>   8   139983.1   38850.7   30966.0   19012.3   14939.3   20155.7   18430.3
#>   9    21875.3   94090.8   25341.1   19413.2   11660.9    9284.6   12733.9
#>   10   39748.0   36896.5   83504.0   56853.4   38890.7   26049.6   18859.1
#>     year
#> age  1978      1979      1980      1981      1982      1983      1984     
#>   1   640981.5  704057.4  924265.8  931736.0 1847651.7 1298486.6 1206091.3
#>   2   589503.1  478537.9  518557.6  676092.5  680952.0 1357953.3  959194.4
#>   3   266047.8  365468.5  288875.8  308838.2  401960.0  409349.2  824510.2
#>   4   187879.2  141651.4  187449.9  145387.4  155054.4  204959.7  211670.2
#>   5   149016.0   99256.3   72050.6   93531.9   72364.0   78399.3  105115.3
#>   6   107304.2   78861.5   50579.9   36019.8   46643.7   36657.7   40281.4
#>   7    15697.7   57488.7   40718.7   25632.1   18209.5   23944.3   19080.2
#>   8    11158.4    8924.5   31630.8   22035.4   13841.4    9967.7   13268.6
#>   9    11533.3    6780.3    5272.9   18424.8   12811.9    8141.9    5925.3
#>   10   17450.2   15379.8   10934.2    7904.4   14797.2   14409.6   11466.4
#>     year
#> age  1985      1986      1987      1988      1989      1990      1991     
#>   1  1644325.8 3960903.4 1860346.2 1839952.8 1352882.5 1185561.9 1052307.5
#>   2   889539.7 1201509.6 2858362.1 1326879.9 1304527.1  964010.6  852854.3
#>   3   580594.4  528658.8  696763.7 1619851.5  743177.0  737889.1  555573.1
#>   4   424498.1  291336.3  256305.2  327069.5  747967.1  347934.7  354640.8
#>   5   108079.3  211172.1  139957.4  119159.1  149539.9  346805.9  165676.3
#>   6    53771.2   53869.0  101654.0   65207.3   54600.4   69485.6  165479.5
#>   7    20876.5   27169.1   26308.9   48086.5   30348.1   25760.9   33644.7
#>   8    10533.1   11268.1   14229.0   13394.0   24130.6   15414.6   13388.9
#>   9     7861.8    6121.7    6381.9    7865.9    7313.3   13313.0    8673.5
#>   10    8734.6    8566.4    7173.0    6573.5    7125.1    7093.9   10882.6
#>     year
#> age  1992      1993      1994      1995      1996      1997      1998     
#>   1   916723.2  617155.5  637103.1  996785.8  978696.3 3186325.9 1127018.6
#>   2   758826.6  655004.5  436955.2  451386.3  705623.2  680833.4 2157479.8
#>   3   493854.6  431531.3  365862.1  244393.9  252047.4  380718.6  348328.3
#>   4   268801.7  232956.1  198496.1  168605.6  112366.4  110439.1  154835.0
#>   5   170014.9  125589.4  106095.9   90573.9   76753.8   48713.7   44390.4
#>   6    79587.7   79603.3   57324.0   48518.3   41323.0   33353.8   19631.4
#>   7    80653.9   37830.5   36908.1   26627.5   22485.6   18261.2   13692.6
#>   8    17588.8   41237.7   18920.2   18489.2   13312.0   10777.0    8198.9
#>   9     7571.4    9758.9   22451.4   10315.5   10062.9    6988.0    5349.3
#>   10    9639.8    8272.2    8854.4   16571.6   12294.4   10081.8    7033.0
#>     year
#> age  1999      2000      2001      2002      2003      2004      2005     
#>   1   918089.3  964100.3  610284.4 1693795.5  509232.1  992838.0  608790.9
#>   2   754317.2  626356.5  675855.1  429739.7 1176824.0  351801.5  698940.2
#>   3  1078941.0  391699.7  343095.4  373477.0  231295.7  626359.4  194310.3
#>   4   137206.3  448037.6  175308.3  155459.3  163083.8   99427.9  283611.9
#>   5    60249.3   56327.8  198459.6   78630.8   67160.9   69343.2   44565.0
#>   6    17320.1   24797.4   25008.1   89216.5   34050.8   28626.3   31151.0
#>   7     7808.7    7258.3   11190.3   11423.7   39292.1   14765.9   13067.6
#>   8     5977.9    3570.5    3544.1    5523.3    5458.7   18519.3    7283.7
#>   9     3973.1    3014.0    1904.4    1907.8    2891.9    2824.7    9964.2
#>   10    5014.6    3841.9    3137.1    2266.4    1882.7    2279.1    2485.7
#>     year
#> age  2006      2007      2008      2009      2010      2011      2012     
#>   1   624075.8 1071216.1  918743.4  875218.7 1202849.7 1502023.8 1354187.8
#>   2   440434.2  461420.9  804426.5  700679.7  678462.9  943987.7 1187249.3
#>   3   407329.0  267893.5  289367.0  520051.1  467747.9  464014.2  654770.0
#>   4    94860.4  211148.3  144951.2  163392.9  307162.4  285811.3  289187.0
#>   5   137207.5   48772.7  113388.4   81282.9   95903.8  186610.0  177153.4
#>   6    21603.5   70674.0   26235.3   63681.7   47775.6   58339.0  115806.9
#>   7    15318.2   11272.2   38471.6   14896.2   37801.8   29327.5   36517.9
#>   8     6885.4    8507.0    6499.6   23027.9    9274.9   24247.7   19140.5
#>   9     4146.8    4100.7    5232.1    4127.6   15126.4    6249.8   16583.0
#>   10    7102.7    5750.8    5344.8    6130.1    6035.5   13946.6   12237.0
#>     year
#> age  2013      2014      2015      2016      2017     
#>   1  1658681.6 1961517.1 1171848.6 1687998.2 2283110.5
#>   2  1075766.0 1329901.6 1594711.4  969046.7 1421171.0
#>   3   831644.7  767387.9  974951.1 1208820.7  760968.3
#>   4   413742.8  539092.8  516870.2  688193.6  896622.1
#>   5   181773.6  266888.0  361532.2  363517.7  508965.9
#>   6   111483.6  117382.3  179156.3  254474.5  269022.0
#>   7    73486.2   72550.1   79336.7  126831.0  189192.6
#>   8    24123.2   49641.9   50683.0   57748.6   96416.1
#>   9    13226.6   16992.3   35988.0   38059.1   45008.7
#>   10   18891.1   20766.3   25551.8   44558.3   61496.2
#> 
#> units:  1000