Plot residuals (observed - expected growth increments) vs relative age at the time of tagging and versus time at liberty.
growthResid(K, Linf, dat, lentag, lenrec, timelib, graph =1,
main = "Residuals of growth increments",
cex.lab=1.5, cex.axis=1.5, cex.main=1,
xlab1="Relative age, yr", xlab2="Time at liberty, yr",
ylab="Observed - expected increment",
xlim1=NULL, xlim2=NULL, ylim=NULL, col=1, returnvec=FALSE,
returnlimits=FALSE, warn=TRUE,...)
parameter of the von Bertalanffy growth equation
parameter of the von Bertalanffy growth equation
dataframe containing length at tagging, length at recapture and time at liberty. These must be named lentag, lenrec and timelib or else column 1 must contain the length at tagging, column 2 must contain length at recapture and column 3 must contain time at liberty
alternative way to pass data to function
alternative way to pass data to function
alternative way to pass data to function
which graph to plot - 1: residuals versus Relative age, 2: residuals versus time-at-liberty
an overall title for the plot
The magnification to be used for x and y labels relative to the current setting of cex
The magnification to be used for axis annotation relative to the current setting of cex
The magnification to be used for main titles relative to the current setting of cex
a title for the x axis 1
a title for the x axis 2
a title for the y axis
lower and upper limits of x axis 1 e.g., c(0,100)
lower and upper limits of x axis 2 e.g., c(0,100)
lower and upper limits of y axis e.g., c(0,100)
color of points in plot
logical - if TRUE, function returns a dataframe with the computed age at tagging and the residual (obs - pred increment)
logical - if TRUE, function returns the x and y limits for the plot
logical - if TRUE, function issues a warning if names of variables in dat do not match the 3 names expected.
other arguments to pass to plot
If returnvec = TRUE, computed age and residuals. If returnlimits=TRUE, x and y limits for plot
Function plots residuals (observed - expected growth increments) vs relative age at the time of tagging and vs time at liberty from VB growth model fitted to tagging data. Relative age is calculated by inverting the von Bertalanffy growth curve.
# NOT RUN {
data(bonito)
temp<-bonito[c(bonito$T2-bonito$T1)>0,]
growthResid(0.19,97.5,lentag=temp$L1, lenrec=temp$L2,timelib=c(temp$T2-temp$T1),graph=1)
# }
Run the code above in your browser using DataLab