No articles match
Introduction to gadget3: A single stock model10 months ago
Creating a (single species) model | Actions | Create time definitions | Stocks | Create stock definition for fish | Stock actions | Fleet actions | Landings data | Landings data: For each year/step/area | Length distribution data | Aggregate .raw data | Group into length bins | Report count in each length bin | Save into ldist_f_surv | Age-length distribution data | Fleet definition | Survey indices | Generate random data | fish.init.scalar & fish.rec.scalar: Overall scalar for recruitment/initial conditions, see g3a_renewal_normalcv() | fish.rec.(age): Per-age recriutment scalar, see g3a_renewal_normalcv() | fish.rec.(year): Recruitment level year-on-year, see g3a_renewal_normalcv() | init.F: Offset for initial M, see g3a_renewal_initabund() | fish.M.(age): per-age M for our species, see g3a_naturalmortality() | fish.Linf, fish.K, fish.t0: VonB parameters for our species, see g3a_renewal_vonb_t0(), g3a_grow_lengthvbsimple() | fish.walpha, fish.wbeta: Age/weight relationship for initialconditions, renewal, see g3a_renewal_normalcv() | fish.f_surv.alpha, fish.f_surv.l50: Curve/l50 for fishing suitability, see g3_suitability_exponentiall50() | fish.bbin: Beta for beta-binomial distribution for fish growth, see g3a_grow_impl_bbinom() | identity() is a do-nothing function, but it lets us finish on a new line | Appendix: Full model script
Debugging a gadget3 model10 months ago
Viewing & editing model code | NaN in likelihood / reports | "Error in optim(...): initial value in 'vmmin' is not finite" | Increasing objective function verbosity | TMB model crashes your R session | Interactive debugging of TMB models | Random effects | Tracing inner model | Logging messages | Missing value for m | Missing value par - parold | Separate netwton optimisation
Modelling maturity & sex with multiple stocks1 years ago
Stocks | Fleet actions | Landings data: For each year/step/area | Length distribution data: Generate 1000 random samples in each year/step/area | Generate random lengths for these samples | Save unagggregated data into ldist_f_surv.raw | Aggregate .raw data | Group into length bins | Report count in each length bin | Save into ldist_f_surv | Assume 100 * 100 samples in each year/step/area | Generate random whole numbers for age | Group into length/age bins | Map maturity stage data to stocks | Generate random maturity stage data from age data, our stock matures between 3..5 | Map maturity stage to the stock name: Note we don't have to use the full stock name | Remove redundant columns | Survey indices | Generate random data | Treat maturity alpha/l50 separately | Appendix: Full model script
Incorporating observation data into models1 years ago
length column: Length distribution data | age column: Age-Length distribution data | area column | stock column: Maturity stage distribution | fleet column | predator column
Structure of a gadget3 model1 years ago
R formula, or the tilde operator | Actions | Stocks | Model parameterization | Combining actions | Ordering of actions
Writing G3 Actions1 years ago
G3 Functions | G3 global environment | Global & native functions | Under R | Under TMB: g3_native | Stock steps | Writing R code destined for C++ | Sub-formulas and g3_global_formula | Ancillary steps
Model customisation2 years ago