View source: R/monteCarloStock.R
monteCarloStock | R Documentation |
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.
monteCarloStock(stck,sam,realisations,run.dir=tempdir())
stck |
An object of class |
sam |
An object of class |
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() |
Large number of realisations might take longer to create.
An FLStock with iter=number of realisations is returned
N.T. Hintzen
FLSAM
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!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.