Package: spict 1.3.8

Martin Waever Pedersen

spict: Stochastic surplus Production model in Continuous-Time (SPiCT)

Fits a surplus production model to fisheries catch and biomass index data.

Authors:Martin Waever Pedersen [aut, cre, cph], Casper Willestofte Berg [aut], Tobias Karl Mildenberger [aut], Alexandros Kokkalis [aut]

spict_1.3.8.tar.gz
spict_1.3.8.zip(r-4.5)spict_1.3.8.zip(r-4.4)spict_1.3.8.zip(r-4.3)
spict_1.3.8.tgz(r-4.4-x86_64)spict_1.3.8.tgz(r-4.4-arm64)spict_1.3.8.tgz(r-4.3-x86_64)spict_1.3.8.tgz(r-4.3-arm64)
spict_1.3.8.tar.gz(r-4.5-noble)spict_1.3.8.tar.gz(r-4.4-noble)
spict_1.3.8.tgz(r-4.4-emscripten)spict_1.3.8.tgz(r-4.3-emscripten)
spict.pdf |spict.html
spict/json (API)
NEWS

# Install 'spict' in R:
install.packages('spict', repos = c('https://ices-tools-prod.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/dtuaqua/spict/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • pol - Fisheries data included in Polacheck et al. (1993).

On CRAN:

fisheries-managementfisheries-stock-assessmentspict

6.17 score 26 stars 115 scripts 99 exports 6 dependencies

Last updated 12 months agofrom:107a325fa7. Checks:OK: 1 WARNING: 1 ERROR: 7. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 04 2024
R-4.5-win-x86_64ERRORNov 04 2024
R-4.5-linux-x86_64WARNINGNov 04 2024
R-4.4-win-x86_64ERRORNov 04 2024
R-4.4-mac-x86_64ERRORNov 04 2024
R-4.4-mac-aarch64ERRORNov 04 2024
R-4.3-win-x86_64ERRORNov 04 2024
R-4.3-mac-x86_64ERRORNov 04 2024
R-4.3-mac-aarch64ERRORNov 04 2024

Exports:add.man.scenarioadd.manlinesannualcalc.bmsykcalc.gammacalc.influencecalc.masecalc.omcalc.osa.residcalc.process.residcalc.taccheck.inicheck.inpcheck.man.timeextract.simstatsfit.aspicfit.meyermillarfit.spictget.AICget.catchindexoverlapget.covget.mfrowget.msyvecget.no.active.priorsget.parget.splineget.TACget.versionguess.mhindcastinvlogitinvlogp1likprof.spictlist.possible.priorslist.quantitiesmake.datinmake.fconvecmake.ffacvecmake.objmake.reportmake.splinematman.selectman.tacman.timelinemanagemansummarymeanvar2shaperatemodefrac2shaperatemohns_rhoplot2plotspict.bbmsyplotspict.biomassplotspict.btrendplotspict.catchplotspict.ciplotspict.compareplotspict.dataplotspict.diagnosticplotspict.diagnostic.processplotspict.fplotspict.fbplotspict.ffmsyplotspict.growthplotspict.hcrplotspict.hindcastplotspict.inflplotspict.inflsumplotspict.likprofplotspict.osarplotspict.priorsplotspict.productionplotspict.retroplotspict.retro.fixedplotspict.seasonplotspict.tcread.aspicread.aspic.resres.diagnretape.spictretroshaperate2meanvarshorten.inpsim.spictsumspict.diagnosticssumspict.drefpointssumspict.fixedparssumspict.inisumspict.managesumspict.parestsumspict.predictionssumspict.priorssumspict.srefpointssumspict.statestest.spicttrans2realtxt.stampvalidate.spictvalidation.data.framewrite.aspic

Dependencies:ellipselatticeMatrixRcppRcppEigenTMB

Guidelines for the stochastic production model in continuous time (SPiCT)

Rendered fromspict_guidelines.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2021-02-21
Started: 2019-09-24

Handbook for the Stochastic Production model in Continuous Time (SPiCT)

Rendered fromspict_handbook.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2023-12-08
Started: 2020-10-23

Readme and manuals

Help Manual

Help pageTopics
Check whether ACF of residuals is significant in any lags.acf.signf
Add catch unit to labeladd.catchunit
Add a legend explaining colors of points (vertical orientation)add.col.legend
Add a legend explaining colors of points (horizontal orientation)add.col.legend.hor
Define management scenarioadd.man.scenario get.TAC get.TAC, make.man.inp
Add lines to plot indicating result of management scenarios.add.manlines
Convert from quarterly (or other sub-annual) data to annual means, sums or a custom function.annual
Draw a line with arrow heads.arrow.line
Calculates the Bmsy/K ratiocalc.bmsyk
Calculate E(Binfinity), i.e. the fished equilibrium.calc.EBinf
Calculate gamma from ncalc.gamma
Calculates influence statistics of observations.calc.influence
Calculate Mean Absolute Scaled Error (MASE)calc.mase
Calculates the order of magnitude for the relative reference levels B/Bmsy and F/Fmsycalc.om
Calculate one-step-ahead residuals.calc.osa.resid
Calculate process residualscalc.process.resid
Calculate Total Allowable Catch (TAC)calc.tac
Check catch listcheck.catchList
Check sensitivity of fit to initial parameter valuescheck.ini
Check list of input variablescheck.inp
Check the consistency of management scenarios in repcheck.man
Checks and corrects management time to be within model timecheck.man.time
Check rep listcheck.rep
Extract hindcast info from a fitted spict objectextract.hindcast.info
Extracts relevant statistics from the estimation of a simulated data set.extract.simstats
Format datefd
Fits aspic to the data contained in the input filefit.aspic
Fit the Meyer & Millar model using rjagsfit.jags
Fit the model of Meyer & Millar (1999)fit.meyermillar
Fit a continuous-time surplus production model to data.fit.spict
Calculate AIC from a rep list.get.AIC
Find observations of catch and index that overlapget.catchindexoverlap
Get column names for data.frames.get.colnms
Get covariance matrix of two reported quantities not of fixed model parameters. Covariance of fixed model parameters can be found in rep$cov.fixed.get.cov
Calculate E(Binfinity) the fished equilibrium.get.EBinf
Estimate fishing mortality factor minimising probability of specified model variable hitting a specified reference level under given fishing mortalityget.ffac
Estimate catch for management period based on last catch observationsget.manC
Get limts of any parameter considering all spict objects in rep$manget.manlimits
Get spict object in rep$man with longest time seriesget.manmax
Get mfrow from the number of plots to be plottedget.mfrow
If multiple growth rates (r) are used (e.g. for a seasonal model), return specified reference point for all instances of r.get.msyvec
Get number of active priorsget.no.active.priors
Get order of printed quantities.get.order
Check whether ACF of catch and index residuals is significant in any lags.get.osar.pvals
Extract parameters from a result report as generated by fit.spict.get.par list.quantities
Get the values of the seasonal spline for F.get.spline
Get version of spict including git sha1 version if available.get.version
Use a simple linear regression to guess m (MSY).guess.m
Conduct hindcasting analysishindcast
Inverse logit transform.invlogit
Inverse log "plus one" transforminvlogp1
Generate latex code for including a figure.latex.figure
Create profile likelihoodlikprof.spict
List parameters to which priors can be addedlist.possible.priors
Create data list used as input to TMB::MakeADFun.make.datin
Make fcon vectormake.fconvec
Make ffac vectormake.ffacvec
Create TMB obj using TMB::MakeADFun and squelch screen printing.make.obj
Creates a pdf file containing the summary output and result plotsmake.report
Calculate confidence ellipsis for reference points.make.rpellipse
Make a spline design matrixmake.splinemat
Load color of management scenarios.man.cols
Select management scenariosman.select
Get the TAC for the management scenariosman.tac
Print a schematic to the console visualising the management timelineman.timeline
Calculate predictions under 8 default management scenariosmanage
Convert mean and variance to shape and rate of gamma distributionmeanvar2shaperate
Convert mode and fractile to shape and rate in Gamma distribution (only for mode>0, i.e. shape >= 1)modefrac2shaperate
Calculate Mohn's rho for different estimatesmohns_rho
Plot osar acfosar.acf.plot
Plot osar qqosar.qq.plot
Plot model points colored depending on the quarter to which they belong.plot.col
Plot summarising spict results.plot.spictcls
Plot summarising spict results (alternative plot composition)plot2
Plot priors of Meyer & Millar modelplot.priors plotmm.priors
Plot estimated B/Bmsy.plotspict.bbmsy
Plot estimated biomass.plotspict.biomass
Plot the expected biomass trendplotspict.btrend
Plot observed catch and predictions.plotspict.catch
Plot catch and index data.plotspict.ci
Compare different spict fitsplotspict.compare
Compare one variable of different spict fitsplotspict.compare.one
Plot input dataplotspict.data
Plot model diagnostic (data, residuals, and more)plotspict.diagnostic
Plot model diagnostics regarding processes and process residualsplotspict.diagnostic.process
Plot estimated fishing mortality.plotspict.f
Plot fishing mortality versus biomass.plotspict.fb
Plot estimated relative fishing mortality.plotspict.ffmsy
Plot estimated time-varying growthplotspict.growth
Comparison plot of aavailable management scenariosplotspict.hcr
Hindcasting plot for indicesplotspict.hindcast
Plots influence statistics of observations.plotspict.infl
Plots summary of influence statistics of observations.plotspict.inflsum
Plots result of likelihood profiling.plotspict.likprof
Plot one-step-ahead residualsplotspict.osar
Plot priors and posterior distribution.plotspict.priors
Plot theoretical production curve and estimates.plotspict.production
Plot results of retrospective analysisplotspict.retro plotspict.retro.fixed
Plot the mean F cycleplotspict.season
Plot time constant.plotspict.tc
Fisheries data included in Polacheck et al. (1993).pol
Helper function for sim.spict().predict.b
Helper function for sim.spict().predict.logf
Helper function for sim.spict().predict.logmre
Output a summary of a fit.spict() run.print.spictcls
Estimate deviation between targeted and realised probability of specified model variable hitting a specified reference level under given fishing mortalityprobdev
Prune a fitted spict object to the core elementsprune.baserun
Adds the x-axis to influence plotsput.ax put.xax
Reads ASPIC input file.read.aspic
Reads the parameter estimates of an Aspic result file.read.aspic.res
Draw CI around a reference point using polygonrefpointci
Helper function for calc.osar.resid that calculates residual statistics.res.diagn
Retape a fitted spict model based on an updated input listretape.spict
Conduct retrospective analysisretro
Load season colors.season.cols
Convert shape and rate of gamma distribution to mean and varianceshaperate2meanvar
Shorten time series of input data to specified rangeshorten.inp
Simulate data from Pella-Tomlinson modelsim.spict
Stochastic surplus Production model in Continuous-Time (SPiCT)spict
An S4 class to represent output from a SPiCT fit.spictcls spictcls-class
Output a summary of a fit.spict() run.summary.spictcls
Diagnostics tablesumspict.diagnostics
Deternistic reference points of a fit.spict() run.sumspict.drefpoints
Fixed parameters table.sumspict.fixedpars
Sensitivity to the initial parameter valuessumspict.ini
Print management summary.mansummary sumspict.manage
Parameter estimates of a fit.spict() run.sumspict.parest
Predictions of a fit.spict() run.sumspict.predictions
Fixed parameters table.sumspict.priors
Stochastic reference points of a fit.spict() run.sumspict.srefpoints
State estimates of a fit.spict() run.sumspict.states
Example of a spict analysis.test.spict
Get real parameter values from transformed ones.trans2real
Load color of true values from simulation.true.col
Add spict version to plottxt.stamp
Simulate data and reestimate parametersvalidate.spict
Collect results from the output of running validate.spict.validation.data.frame
Add warning sign to plotwarning.stamp
Takes a SPiCT input list and writes it as an Aspic input file.write.aspic
Write the BUGS code to a text filewrite.bug.file