monteCarloStock: Generate new starting conditions of numbers and f-at-age.

View source: R/monteCarloStock.R

monteCarloStockR Documentation

Generate new starting conditions of numbers and f-at-age.

Description

Method to sample from the variance-co-variance matrix and based on a multi-variante normal distribution generate new starting conditions of numbers-at-age and f-at-age.

Usage

monteCarloStock(stck,sam,realisations,run.dir=tempdir())

Arguments

stck

An object of class FLStock

sam

An object of class FLSAM

realisations

Number of newly generated starting conditions.

run.dir

Path to which the temporary files are to be written to or read from. Default is the R temporary directory provided by tempdir()

Details

Large number of realisations might take longer to create.

Value

An FLStock with iter=number of realisations is returned

Author(s)

N.T. Hintzen

See Also

FLSAM

Examples

data(NSH)
data(NSH.sam)

#Stock with one iter
summary(NSH)#iter = 1
plot(NSH)
#Generate new stock with 100 iters
#newStock <- monteCarloStock(NSH,NSH.tun, NSH.sam,100, ncores=2L)
#Now does it look?
#summary(newStock)#iter = 100
#plot(newStock)  #Voila!


flr/FLSAM documentation built on April 18, 2024, 4:54 p.m.