Package: MQMF 0.1.5

MQMF: Modelling and Quantitative Methods in Fisheries

Complements the book "Using R for Modelling and Quantitative Methods in Fisheries" ISBN 9780367469894, published in 2021 by Chapman & Hall in their "Using R series". There are numerous functions and data-sets that are used in the book's many practical examples.

Authors:Malcolm Haddon [aut, cre]

MQMF_0.1.5.tar.gz
MQMF_0.1.5.zip(r-4.5)MQMF_0.1.5.zip(r-4.4)MQMF_0.1.5.zip(r-4.3)
MQMF_0.1.5.tgz(r-4.4-any)MQMF_0.1.5.tgz(r-4.3-any)
MQMF_0.1.5.tar.gz(r-4.5-noble)MQMF_0.1.5.tar.gz(r-4.4-noble)
MQMF_0.1.5.tgz(r-4.4-emscripten)MQMF_0.1.5.tgz(r-4.3-emscripten)
MQMF.pdf |MQMF.html
MQMF/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/haddonm/mqmf/issues

Datasets:
  • LatA - LatA Simulated length-at-age for 358 female fish
  • abdat - Abdat A list of fishery data for blacklip abalone
  • blackisland - Blackisland tagging data from a blacklip abalone population
  • dataspm - Dataspm A data.frame of fisheries catch and cpue data
  • minnow - Minnow contains weekly growth data for use with seasonal growth curves
  • npf - Npf fishery catch data from Northern Prawn Fishery 1970-1992
  • pttuna - Pttuna is yellowfin tuna fishery data from Pella-Tomlinson 1969
  • schaef - Schaef is yellowfin tuna fishery data from Schaefer 1957
  • tasab - Tasab is a matrix of abalone maturity-at-length data
  • tigers - Tigers is tiger prawn recruitment data from Penn & Caputi 1986
  • twoindex - Twoindex has orange roughy catches with hypothetical cpue

On CRAN:

ecologyfisherieshaddonquantitative-methodsuncertainty

4.12 score 11 stars 24 scripts 244 downloads 94 exports 2 dependencies

Last updated 1 years agofrom:f171966258. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 06 2024
R-4.5-winOKNov 06 2024
R-4.5-linuxOKNov 06 2024
R-4.4-winOKNov 06 2024
R-4.4-macOKNov 06 2024
R-4.3-winOKNov 06 2024
R-4.3-macOKNov 06 2024

Exports:%ni%addcontoursaddlnormaddnormaicbicaltnegLLbcebhbracketcalcpriorchapter2chapter3chapter4chapter5chapter6chapter7countgtonecountgtzerocountNAscountonescountzerosdiscretelogisticdo_MCMCdomedfabensfacttonumfitSPMfreqMeangetlaggetmaxgetmingetMSYgetnamegetrmsegetseedgetsinglegettimegetvectorGzhalftableinthistinvliscollikeratiolinterlogistmagnitudemakelabelmaturemmmnnegLLnegLLnegLL1negLLMnegLLPnegNLLnegnormLoutfitpanel.corparasymptparsetparsynpenalty0penalty1plot1plotfishMplotlagplotprepplotprofileplotprojplotspmdatplotspmmodpredfreqprintVpropertiesquantsremoveEmptyrickerrobustSPMsetpalettesimpspmsimpspmMspmspmbootspmCEspmphaseplotspmprojspmprojDetsrugssqsummspmuphistvBwhich.closest

Dependencies:MASSmvtnorm

Readme and manuals

Help Manual

Help pageTopics
'%ni%' identifies which element in x is NOT in y%ni%
abdat A list of fishery data for blacklip abaloneabdat
addcontours simplifies adding contours to an xy plot of pointsaddcontours
addlnorm estimates a log-normal distribution from output of histaddlnorm
addnorm adds a normal distribution to a histogram of a data set.addnorm
aicbic returns the AIC and BIC for a given modelaicbic
altnegLL calculate the Normal negative log-likelihoodaltnegLL
bce Baranov catch equationbce
bh represents one version of Beverton-Holt recruitmentbh
blackisland tagging data from a blacklip abalone populationblackisland
bracket bounds a value on the x-axis and y-axisbracket
calcprior return the sum of a vector of constant values as priorscalcprior
chapter2 The 15 R-code chunks from A Non-Introduction to Rchapter2
chapter3 The 27 R-code chunks from Simple Population Modelschapter3
chapter4 The 47 R-code chunks from Model Parameter Estimationchapter4
chapter5 The 23 R-code chunks from Static Modelschapter5
chapter6 The 53 R-code chunks from On Uncertaintychapter6
chapter7 The 67 R-code chunks from Surplus Production Modelschapter7
countgtone used in apply to count the number > 1 in a vectorcountgtone
countgtzero used in apply to count numbers > zero in a vectorcountgtzero
countNAs used in apply to count the number of NAs in a vectorcountNAs
countones used in apply to count the number of ones in a vectorcountones
countzeros used in apply to count the number of zeros in a vectorcountzeros
dataspm A data.frame of fisheries catch and cpue datadataspm
discretelogistic example and figure 3.2 Discrete logistic modeldiscretelogistic
do_MCMC conducts an MCMC using Gibbs within Metropolisdo_MCMC
domed calculates domed selectivity curvesdomed
fabens calculates predicted growth increment for tagging datafabens
facttonum converts a vector of numeric factors into numbersfacttonum
fitSPM fits a surplus production modelfitSPM
freqMean calculates the mean and stdev of count datafreqMean
getlag is used to look for the response of cpue to previous catchesgetlag
getmax can be used to define the upper bound for a plotgetmax
getmin can be used to define the lower bound for a plotgetmin
getMSY calculates the MSY for the Polacheck et al 1993 equationgetMSY
getname returns the name of a variable as charactergetname
getrmse calculates the rmse of the input 'invar' seriesgetrmse
getseed generates a random number seedgetseed
getsingle extracts one number from an input line of charactersgetsingle
gettime calculates time in seconds passed each daygettime
getvector extracts a vector of numbers from a line of charactersgetvector
Gz calculates predicted Gompertz length-at-age growth curveGz
halftable halves the height of a tall narrow data.frame for printinghalftable
inthist a replacement for the hist function for use with integersinthist
invl calculates growth increments for the inverse logisticinvl
incol is a utility to determine if a column is present in a matrixiscol
LatA Simulated length-at-age for 358 female fishLatA
likeratio conducts a likelihood ratio testlikeratio
linter finds a value in a series using its location in anotherlinter
logist Logistic selectivity functionlogist
magnitude returns the magnitude of numbers in base 10magnitude
makelabel generates a label from text and valuesmakelabel
mature alternative logistic function commonly used for maturitymature
minnow contains weekly growth data for use with seasonal growth curvesminnow
mm calculates the predicted Michaelis-Menton length-at-agemm
mnnegLL generic multinomial negative log-likelihoodsmnnegLL
negLL calculate log-normal log-likelihoodsnegLL
negLL1 calculate log-normal log-likelihoods with a penaltynegLL1
negLLM -ve log-normal likelihoods for multiple index time-seriesnegLLM
negLLP -ve log-likelihood for normally distributed variablesnegLLP
negNLL -ve log-likelihood for normally distributed variablesnegNLL
negnormL an alternative -log-likelihood for normal errorsnegnormL
npf fishery catch data from Northern Prawn Fishery 1970-1992npf
outfit tidy print of output from optim, nlminb, or nlmoutfit
panel.cor is a version of a function given in the help for pairspanel.cor
parasympt generates N vectors from a multi-variate normalparasympt
parset alters the current base graphics par settingsparset
parsyn types the standard par command syntax to the consoleparsyn
penalty0 enables the adding of a large penalty as one approaches 0.0penalty0
penalty1 adds an increasingly large penalty as a value approaches 1.0penalty1
plot.dynpop an S3 method for plotting dynpop objectsplot.dynpop
plot1 a quick way to plot an xy line or point plotplot1
plotfishM plots the catch and optionally the cpueplotfishM
plotlag plots the effect of a lag between two variablesplotlag
plotprep sets up a window and the par values for plottingplotprep
plotprofile simplifies plotting single likelihood profilesplotprofile
plotproj generate a plot of a matrix of biomass projectionsplotproj
plotspmdat plots the fish data containing catches and cpueplotspmdat
plotspmmod plots an spm model fit given parameters and dataplotspmmod
predfreq is used for modal analysis of count datapredfreq
printV returns a vector cbinded to 1:length(invect)printV
properties - used to examine the properties of a data.frameproperties
pttuna is yellowfin tuna fishery data from Pella-Tomlinson 1969pttuna
quants used in apply to estimate quantiles across a vectorquants
removeEmpty removes empty strings from a vector of stringsremoveEmpty
ricker one version of the Ricker stock recruitmentricker
robustSPM does a robustness test on quality of fit of an SPMrobustSPM
schaef is yellowfin tuna fishery data from Schaefer 1957schaef
setpalette is a shortcut for altering the palette to R4setpalette
simpspm calculates only the predicted log(CE) for an SPMsimpspm
simpspmM calculates predicted CE when multiple indices are presentsimpspmM
spm calculates the dynamics of a Schaefer or Fox modelspm
spmboot conducts a bootstrap analysis on a spm modelspmboot
spmCE - calculates the dynamics for multiple cpue time-seriesspmCE
spmphaseplot - plots the phase plot of harvest rate vs biomassspmphaseplot
spmproj calculates biomass trajectories for replicate parametersspmproj
spmprojDet conducts forward projections from known conditionsspmprojDet
srug is the Schnute and Richards Unified Growth Curvesrug
ssq a generalized function for summing squared residualsssq
summspm extracts critical statistics from output of plotspmmodsummspm
tasab is a matrix of abalone maturity-at-length datatasab
tigers is tiger prawn recruitment data from Penn & Caputi 1986tigers
twoindex has orange roughy catches with hypothetical cpuetwoindex
uphist a histogram with an upper limit on the x-axisuphist
vB calculates the predicted von Bertalanffy length at agevB
which.closest find a number in a vector closest to a given valuewhich.closest