samueldnj / hierProdAnalysis

A simulation-estimation model for that compares the performance of hierarchical multispecies and single species surplus production stock assessment models.
0 stars 0 forks source link

Functionalise control script #1

Closed samueldnj closed 8 years ago

samueldnj commented 8 years ago

Wrap the current code in the control script in tools.R and simulation.R functions.

Tools

samueldnj commented 8 years ago

Estimator call functions need a trial fit subroutine to modify pin file and retry fitting in case of failure.

samueldnj commented 8 years ago

Fit trials working, for the most part, using mseR code as a reference:

Each trial i = 0:N

The trials are stopped if both a local min is found and the hessian is positive definite, or if N is reached.

If N is reached and either of the conditions are unsatisfied the rep file is returned unchanged, and the mc output from the same species/complex with previous seed value is used - not ideal i know

This seems to work often, but not always.

Other idea:

samueldnj commented 8 years ago

Using seed values 1:100, model has 86 successful runs that perform MCMC. Given that there are other issues defined for the MCMC comparisons (issue #11) and covariance simulation (issues #3 and #4), I'm closing this issue here.