Releases: DTUAqua/spict
spict v1.3.8.x (1.3.9 pre-release)
New features
- A spin-up (burn-in) period can be specified using
inp$nspinup
in number of time steps. It helps stabilise the fit in cases where only catches are available in the beginning of the time series.
Minor changes
- On load,
spict
checks if the currently available TMB version is the same as the one that was used to install spict. Gives warning if there is a mismatch.
Bug fixes
intermediatePeriodCatchList
is now used by the manage function, previously was ignored
spict v1.3.8 (2023-12-08)
New features
-
Added function
calc.process.resid()
that calculates the process residuals for
the biomass and fishing mortality processes. The residuals are added to the
fitted spict object in the data frame calledrep$process.resid
. The
residuals can be summarised with the functionsumspict.diagnostics()
and
visualised with the functionplotspict.diagnostic.process()
. Note, that the
process residuals have mainly been tested for scenarios without seasonal fishing patterns. -
Added function
plotspict.compare
that shows estimates from multiple
fits, of B, F, catch, F/Fmsy, B/Bmsy and the production curve on the same plot. The
fits can be given separately, likeplotspict.compare(fit1, fit2)
or in a list, like
plotspict.compare(list(fit1, fit2))
.
Bug fixes
make.man.inp
now checks all fractiles to be between 0 and 0.5 (closes #167)add.manlines
correctly reports shorter management periods than 1 year (closes #168)add.manlines
checks for errflag for multiple management scenariosannual
function was rewritten to accommodate cases whereintime
does not include full years. This happens when the first data point is not on a full year (closes #170, thanks to Paz Sampedro)man.select
checks forNA
s for multiple management scenariossummary
now respects theCI
argument. Added CI argument forsumspict.*
functions
Minor changes
- Retro runs have names: Baseline, -1, -2, -3, ... (closes #172)
spict v1.3.7 (2022-09-06)
New features
- Added functionality for performing and plotting hindcast analysis introducing the functions hindcast() and plotspict.hindcast.
Bug fixes:
- fixed retro when last year's observations where missing
spict v1.3.6 (2022-06-06)
Bug fixes:
sim.spict saves the dtc (and dte) (closes #159)
Fixed optimisation of absolute catch management scenario
Fixed plotting of simulated data
spict v1.3.5
spict v1.3.5 (2021-10-12)
New features:
- Use TMB simulation functionality to simulate data from fitted spict object.
Set argumentuse.tmb = TRUE
insim.spict()
function to use TMB
SIMULATE{}
. - All functions using
parallel::mclapply()
have the argumentmc.cores
to
specify the number of cores to be used. By defaultmc.cores
is equal to 1.
Bug fixes
- Default labeling of management scenarios was not using increasing numbers, but
reused the label "cutsomScenario_1". This is corrected and increasing numbers
are now used, i.e. "customScenario_2", etc. - In the case there is an abundance index after the last catch interval inside
the intermediate period and the argumentintermediatePeriodCatch
in
manage()
is used, the intermediate period was calculated incorrectly, using
the argumentinp$indpred
rather thaninp$indCpred
. This also led to an
error message inplotspict.catch()
with these management scenarios.
Minor changes:
- More informative error messages and user-friendly functionality of
sim.spict()
- Three new arguments in the inp list (created by
check.inp
):
sim.random.effects
that allows to turn the simulation of random effects on
and off, andsim.fit
that allows to define whether the estimated parameters from$
last fit or initial values should be used for simulation. - The application of the retro function in the vignette was set to
mc.cores=1
to circumvent multithread MKL and parallel problems.
spict v1.3.4
New features:
- Option to set Blim in the hockey-stick HCR to anything else than 0, by specifying two values in breakpointB, e.g.
breakpointB = c(0.3,0.5)
. - New argument to set time for the evaluation of the hockey-stick HCR: evalBreakpointB.
- New plotting function: plotspict.hcr that visualises management scenarios
- See changes for each spict version using news(package = "spict")
Bug fixes
- Corrected biomass predictions for scenarios that use catch fractiles
Minor changes:
- Updated documentation, vignettes and guidelines
spict v1.3.3
An update with minor changes and small improvements in management summary and scenarios that target a specific catch.
Minor changes:
- Extra arguments
sumspict.manage
control what is returned (uncertainty, absolute states) sumspict.manage
shows informative messages when scenarios are not comparable due to assumption differences- Management scenarios targeting absolute catch (
cabs
) or fishing mortality (fabs
). Absolute catch scenarios are based on finding the fishing mortalirt (ffac
) that leads to the target catch using a simple optimisation. - Management scenarios stored in the input object
- Legend in most plots have transparent backgrounds
Bug fixes:
- Fixed previously ignored argument
include.Ebinf
insumspict.manage
Reduce dependencies, cleanup
spict v1.3.2
This is a small update mostly to reduce some dependencies and fix some small issues introduced in the previous releases.
Minor changes:
TMB
version 1.7.1 is required- Package
ellipse
is now imported - Removed
plyr
dependency mansummary
is an alias ofsumspict.manage
Bug fixes:
- Fixed
test.spict
to work with the management updates - Removed management output from base run of the retro
Retro: improvements and bug fixes
New features:
- New function:
plotspict.retro.fixed
. Plots parameter estimates (and confidence intervals) in each of the retrospective runs
Minor changes:
plotspict.retro
returns Mohn's rho ifadd.mohn
is TRUEplotspict.retro
was polished, added legend, better spacingmohns_rho
now works for the predicted indexIpred
- Retro plotting and Mohn's rho remove not converged retro runs (closes #49)
- Reduced the size of retro object and added an argument to control it (closes #97)
- Added argument checks in retro, plotspict_retro and mohns_rho
Bug fixes:
- Fixed Mohn's rho calculation that was ignoring the base run
- Fixed bug in Mohn's rho calculation that included forecast period
- Fixed shorten.inp for catch and effort
spict v1.3.0
New features:
- The forecast & management section in SPiCT handbook was updated and describes
the new management functionality of the package. - Two new variables for controlling management-related settings are introduced:
inp$maninterval
andinp$maneval
. The first is comprised of two numeric
values which define the start and end of the management period, i.e. the period
to which fishing mortality or catch restrictions are applied to and for which
the catch (or TAC) is predicted for.inp$maneval
defines the management
evaluation time, i.e. the time point at which model states should be predicted
for (corresponds to the 'p' quantities in the model, e.g.logBpBmsy
). Thus, these
variables replace the deprecated variables 'timepredc', 'dtpredc', and
'manstart'. The new variables have a higher priority than the older ones, but
old variables can still be used. - With the new management variables come new default values for the management
period, length of the period, and evaluation time: The management period
starts now by default at the start of the next full new year after the last
observation. This fixes a bug concerning default values for specific cases
with seasonal catches (see below). Independent of annual or seasonal catches,
the default duration of the management period is now 1 year. The default
management evaluation time is at the end of the management period, i.e. by
default at the end of the next year after the last observation. Please note
that these changes might lead to different values for some predicted quantities
(e.g. 'Predictions' in the summary output of a SPiCT assessment), because they
affect the 'p' states in the model, e.g.logBp
. - The whole management functionality of the package is updated, including:
- New management scenario labelled 'ices' in the
manage()
function - New function
add.man.scenario()
to add customised scenarios torep$man
- New function
get.TAC()
to estimate TAC of a specified scenario - New function
man.tac()
to estimate TAC of all scenarios inrep$man
- New function
man.timeline()
to visualise management times in form of a timeline - New function
sumspict.manage()
to print a summary of all management scenarios - New function
check.man.time()
to check and correct model times in respect to management times - New function
man.select()
to select certain scenarios fromrep$man
- New management scenario labelled 'ices' in the
- New function
plot2()
allowing to plot a selection of 4 plots: biomass
relative to Bmsy, Fishing mortality relative to Fmsy, catches, and the Kobe
plot. - New argument 'verbose' in all management-related functions,
fit.spict()
and
check.inp()
which allows to turn off console printing. This may be relevant
for automatic reports and parallel scripts. By defaultverbose = TRUE
and
informative text messages and warnings are printed to the console. - The new argument 'inp$reportmode' allows to change the number of ADreported
quantities. So far, the default option (0
) which reports all quantities, a
minimal selection of quantities relevant for management (1
), and the option
to only report the predicted catch (logCp
withinp$reportmode == 2
) are
implemented. - A new family of ADreported quantities is introduced: The 'm' quantities, e.g.
logFmFmsy
, correspond to the start of the management period. - New function
mohns_rho
that calculates Mohn's rho from the retrospective analysis
of user selected quantities
Minor changes:
- The guidelines vignette was updated.
- New test scripts for all management-related functions.
- The manbase scenario was removed.
- The
manage()
function overwrites all scenarios inrep$man
. - The quantities 'perc.dF' and 'perc.dB' in the management summary output relate
the fishing mortality or biomass, respectively, from the end of the management
period to the start of the management period of each scenario. Thus, these
quantities are omitted from the summary output if the timelines of the
scenarios vary. - DLMtool dependent functions were removed.
Bug fixes:
- The argument
inp$indlastobs
which is used to estimate all 'l' quantities,
e.g.logFlFmsy
, did not consider the length of the catch (or effort)
interval. Fixing this bug might lead to different values for some quantities
(e.g. 'States' in the summary output of a SPiCT assessment), because they
affect the 'l' states in the model, e.g.logBl
. - The new default values of management-related variables explained above fix
inconsistent default values for seasonal data, which might have lead
'manstart' to be after 'timepredc'. - Fixed bug in retro function when effort data are used.
- Allow to plot into same plotting device for all plotspict.* family plots, e.g.
for changing the ylim or adding a horizontal reference line. - All management scenarios allow for the definition of intermediate periods
(period between last observation and start of the management period). By
default the assumptions during the intermediate period are equal (continuing
the F process) for all scenarios. - The argument 'maxtime' in the function
shorten.inp()
did not account for the
length of the catch (or effort) interval. Thus, a catch observation for the
interval 1990-1991 was included althoughmaxtime = 1990
. After this bug fix,
this observation is not included anymore as it ranges beyond 'maxtime'.