Modelling and Quantitative Methods in Fisheries
addcontours simplifies adding contours to an xy plot of points
addlnorm estimates a log-normal distribution from output of hist
addnorm adds a normal distribution to a histogram of a data set.
aicbic returns the AIC and BIC for a given model
altnegLL calculate the Normal negative log-likelihood
bce Baranov catch equation
bh represents one version of Beverton-Holt recruitment
bracket bounds a value on the x-axis and y-axis
calcprior return the sum of a vector of constant values as priors
chapter2 The 15 R-code chunks from A Non-Introduction to R
chapter3 The 27 R-code chunks from Simple Population Models
chapter4 The 47 R-code chunks from Model Parameter Estimation
chapter5 The 23 R-code chunks from Static Models
chapter6 The 53 R-code chunks from On Uncertainty
chapter7 The 67 R-code chunks from Surplus Production Models
countgtone used in apply to count the number > 1 in a vector
countgtzero used in apply to count numbers > zero in a vector
countNAs used in apply to count the number of NAs in a vector
countones used in apply to count the number of ones in a vector
countzeros used in apply to count the number of zeros in a vector
discretelogistic example and figure 3.2 Discrete logistic model
do_MCMC conducts an MCMC using Gibbs within Metropolis
domed calculates domed selectivity curves
fabens calculates predicted growth increment for tagging data
facttonum converts a vector of numeric factors into numbers
fitSPM fits a surplus production model
freqMean calculates the mean and stdev of count data
getlag is used to look for the response of cpue to previous catches
getmax can be used to define the upper bound for a plot
getmin can be used to define the lower bound for a plot
getMSY calculates the MSY for the Polacheck et al 1993 equation
getname returns the name of a variable as character
getrmse calculates the rmse of the input 'invar' series
getseed generates a random number seed
getsingle extracts one number from an input line of characters
gettime calculates time in seconds passed each day
getvector extracts a vector of numbers from a line of characters
'%ni%' identifies which element in x is NOT in y
Gz calculates predicted Gompertz length-at-age growth curve
halftable halves the height of a tall narrow data.frame for printing
inthist a replacement for the hist function for use with integers
invl calculates growth increments for the inverse logistic
incol is a utility to determine if a column is present in a matrix
likeratio conducts a likelihood ratio test
linter finds a value in a series using its location in another
logist Logistic selectivity function
magnitude returns the magnitude of numbers in base 10
makelabel generates a label from text and values
mature alternative logistic function commonly used for maturity
mm calculates the predicted Michaelis-Menton length-at-age
mnnegLL generic multinomial negative log-likelihoods
MQMF functions for Using R for Modelling and Quantitative Methods in F...
negLL calculate log-normal log-likelihoods
negLL1 calculate log-normal log-likelihoods with a penalty
negLLM -ve log-normal likelihoods for multiple index time-series
negLLP -ve log-likelihood for normally distributed variables
negNLL -ve log-likelihood for normally distributed variables
negnormL an alternative -log-likelihood for normal errors
outfit tidy print of output from optim, nlminb, or nlm
panel.cor is a version of a function given in the help for pairs
parasympt generates N vectors from a multi-variate normal
parset alters the current base graphics par settings
parsyn types the standard par command syntax to the console
penalty0 enables the adding of a large penalty as one approaches 0.0
penalty1 adds an increasingly large penalty as a value approaches 1.0
plot.dynpop an S3 method for plotting dynpop objects
plot1 a quick way to plot an xy line or point plot
plotfishM plots the catch and optionally the cpue
plotlag plots the effect of a lag between two variables
plotprep sets up a window and the par values for plotting
plotprofile simplifies plotting single likelihood profiles
plotproj generate a plot of a matrix of biomass projections
plotspmdat plots the fish data containing catches and cpue
plotspmmod plots an spm model fit given parameters and data
predfreq is used for modal analysis of count data
printV returns a vector cbinded to 1:length(invect)
properties - used to examine the properties of a data.frame
quants used in apply to estimate quantiles across a vector
removeEmpty removes empty strings from a vector of strings
ricker one version of the Ricker stock recruitment
robustSPM does a robustness test on quality of fit of an SPM
setpalette is a shortcut for altering the palette to R4
simpspm calculates only the predicted log(CE) for an SPM
simpspmM calculates predicted CE when multiple indices are present
spm calculates the dynamics of a Schaefer or Fox model
spmboot conducts a bootstrap analysis on a spm model
spmCE - calculates the dynamics for multiple cpue time-series
spmphaseplot - plots the phase plot of harvest rate vs biomass
spmproj calculates biomass trajectories for replicate parameters
spmprojDet conducts forward projections from known conditions
srug is the Schnute and Richards Unified Growth Curve
ssq a generalized function for summing squared residuals
summspm extracts critical statistics from output of plotspmmod
uphist a histogram with an upper limit on the x-axis
vB calculates the predicted von Bertalanffy length at age
which.closest find a number in a vector closest to a given value
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.