FSA - Fisheries stock assessment methods.
RForge.net

FSA

About FSA
SVN access
Download/Files
News
Check results
Package R docs
Vignettes
Install Helper

News/Changelog

0.0-13 ongoing
o added a dependency to quantreg (for rq() in emp()).

caphist.convert(): modified by adding an event.ord= argument to allow the user to identify the order
    of the event names when converting from a capture-by-event type.  This is particulary useful if
    the event names are things like `first', `second', `third', `fourth' because R orders these
    alphabetically which adversely effects the correctness of the capture histories.
compute.Ws(): moved this internal function out validateWs() to be a stand-alone internal function.  This
    allows usage with animation routines.
emp(): added probs= argument result to return list.  Corrected ylab in plotting methods.  Added a predict
    method.  Added a method= argument that allows choice of using linear regression or quantile regression
    to find the Ws equation.  Modified objects in the return list (added rawdata component) and added the
    back-transformed Wq value in regdata (for comparison with Gerow's Excel tool).  Changed code for
    finding summarized dataframes inside the function by using cast() from the reshape package -- this
    resulted in a 3x reduction in system.time().
mr.closed(): modified by correcting error in the multiple census methods if M, n, and m (but not R) were
    supplied.  Also corrected an error in the examples.
rlp(): added probs= argument result to return list.  Corrected ylab in plotting methods.  Added a predict
    method.
PSDval(),RSDval(): added a check for missing species name so that the user can just type PSDval() to get the list of 
    possible species names.  Also added a check to see if RSDlit was already loaded.
validateWs(): added probs= argument result to return list.  Corrected ylab in plotting methods.  Added a predict
    method.  Modified EmpQ() internal function to use predict() methods for emp and rlp objects.  Streamlined
    some of the code by including a compute.Ws() internal function and using the update() function.  Changed code
    for finding summarized dataframes inside the function by using cast() from the reshape package -- this
    resulted in a 1.5x reduction in system.time().
wlgm(): major changes included moving some internal functions outside of wlgm(), adding the ability to use
    the data= argument, and adding the ability to fit weighted regressions on the summary statistics.  Other
    nior changes were also made.  Updated the .Rd file.
WSval(),WRval(): added a check for missing species name so that the user can just type WSval() to get the list of 
    possible species names.  Also added a check to see if WSlit was already loaded.


0.0-12  15Jul08
.First.lib: Added
add.zerocatch(): added this function to add zeroes to catch records where a species of fish was not caught.
limnoprofile.plot(): added this function to simplify constructing plots of depth versus limnological measure
    with the depth decreasing from top to bottom.
rlp(): changed default qtype= to 8 (from 7).  Added a probs= argument to allow other than 75th percentile
    calculations.
emp(): updated the help page.  Added a logical for if p.n.low does not exist when using cutoff.tail.  Renamed
    items in the output list.  Added a table of number of individuals per length category to output list.  Added
    a probs= argument to allow other than 75th percentile calculations.  Added its own generics -- rather than
    relying on the rlp() generics.
FroeseWs(): added this function, and its generics, to perform the standard weight equation calculation as
    proposed by Froese (2006).
validateWs(): added this function, and its generics, to perform the Willis and EmpQ methods for assessing length
    bias in the standard weight equations.  Added a probs= argument to allow other than 75th percentile
    calculations.  Added a mean= argument to allow use of means rather than quantiles.  Modified to accept an
    of class FROESE.


0.0-11  15May08
o Moved to RForge.net.
o changed to R2.7.0.
o added a dependency to Rcapture (for the example in caphist.convert).

anova.RLP(): added this function to produce the anova table for the standard weight equation.
caphist.convert(): added this function convert between various capture history formats (FSA,event,MARK,Rcapture).
emp(): added this function, and its generics, to perform Gerow's EmP method for obtaining a standard weight equation.
fit.plot.RLP(): added this function.
plot.RLP(): modified so that color palette with a gradient rather than only a solid color can be used for
    the populations.  In addition, added order.pop= argument that will order the populations from smallest
    to largest predicted with in the first length interval.  When used with the color gradients this will
    make it easier to see which populations cross over other populations.            
rlp(): modified function so that the user can choose to use any-mm length intervals rather than having 10-mm
    hardwired.  Modified output in list somewhat to more closely match the output of emp().


0.0-10  1May08
lencat(): Modified by adding an as.fact= argument that allows the user to decide if the resulting variable
    should be returned as a factor variable or not.  The default is set to return as a factor variable.
    This allows tables of the new variable to include zeroes for levels of the new variable that contain
    no individuals.  This makes some RSD/PSD (and likely age-length key) calculations simpler.  Also added
    a drop.levels= argument to allow the user to drop unused levels if so desired.
mr.closed():  This function is a combination of the old mr.closed1() and mr.closed2().  It also allows the
    user to compute single census estimates with multiple sub-groups in the data (i.e., length- or age-classes).
    The function also allows the user to compute an overall population esitmate of multiple sub-groups are
    present and an overall SE if the incl.SE=TRUE is used.  It also corrects the SE computations implemented
    in version 0.0-9.  This change caused the construction of our internal functions -- mrc1, mrc2, ci.mrc1,
    and ci.mrc2.
mr.closed1(): removed this function.  Use mr.closed() instead.
mr.closed2(): removed this function.  Use mr.closed() instead.
PSDval(): Added mm= argument so that metric result can be returned in mm.  Also added incl.zero= argument
    that will include a zero value in the first position in the vector; this is useful for when creating
    PSD/RSD values.
rcumsum(): Added this function (from NCStats).
RSDval(): See PSDval description.


0.0-9 unknown
age.comp(): Corrected SE calculation used to construct the CIs.  Changed the CI plotting routine to use
    plotCI in plotrix package -- this puts lines rather than points on the ends of the CIs.  Added a check
    for computing SDs and CIs for when n=1 or when all measurements are the same.  This reduces (eliminates?)
    the number of warnings that are given.
catch.curve(): added na.rm=TRUE arguments to min() and max() in plot.CC().  Changed type= argument so that
    "params" is the default rather than "lm".  This makes it more consistent with other simulation programs.
cc.sim(): Put in catch for situations where the CV for No and Z were equal to zero.  Originally, the program
    attempted to computed a random number from a normal distribution with a standard deviation of zero.
    This corrected the problem of no lines appearing unless the CVs were greater than zero.
ch.convert(): STARTED A FUNCTION TO CONVERT B/W CAPTURE HISTORY FORMATS.  NO RD FILE YET.
depletion():  Moved type= argument to third position.  Will more easily allow type="Leslie" as a default
    (i.e., can just enter catch and effort vector.
FSAsims(): Added a "mark-recap" menu section.  Added a chapman 1-sample M-R item to the menu.
leslie.sim(): corrected the conditionals on p.surv and r.prop so that it asks if any not the first value
    is less than 1.  This corrects the problem of R returning a large number of warnings.
leslie.sim2(): corrected the call to depletion() so that the type of model ("Leslie") was the third rather
    than the first argument.  This was caused by a change in the usage of depletion in previous version changes.
mr.closed1(): Modified output list to include an estimate of the variance as described in Ricker(1975).
summary.MRC1(): Modified output so that (1) the given information is a little easier to read, (2) the population
    estimate is returned in a matrix, (3) the SE from Ricker(1975) can be included in the outputm, and (4) a
    label can be placed on row for the matrix output.  The purpose of these changes was to allow the SE to be
    computed and to allow future functions to more flexibly use the output.


0.0-8 unknown
o changed some \items to \tabular in RD files.  Changed most hard-wired quotes to \sQuote or \dQuote in RD files.
    Changed some text-based equations to more latex-based equations in \eqn or \deqn markups.  This fixed the
    Latex compilation problems that I was having when using RCMD check.

age.comp(): Removed single-letter values from the what= argument.  Will rely on partial matching.
age.key(): Changed default name for new column with ages from "Age" to "age".  Added example.
coefplot.WLGM(): Changed to use plotCI() from the plotrix package.  This removed the for loop that I had
    programmed.  This also added the sfrac= and gap= arguments.  Updated the RD.
depletion(): Removed single-letter and lower-case values from the type= argument.  Will rely on partial matching.
lencat(): Changed d argument to df.
lenfreq.expand(): Changed d argument to df.
mr.open(): Added match.arg functionality to the ci.type and phi.type arguments.
plot.RLP(): Added "object <- x" to allow x to be used inside the curve() function without confusion.
removal(): Removed abbreviated values from the type= argument.  Will rely on partial matching.
rlp(): Added examples from Murphy et al. (1990)
stock.recruit(): Removed abbreviated values from the type= argument -- will rely on partial matching.
    Changed sumtype argument to what.
stock.recruit.sim():  Changed model argument to type and added param argument (to make compatible with
    stock.recruit).  Moved R and S arguments to beginning of argument string (more compatible with
    stock.recruit).  STILL NEED TO ADD SECOND RICKER MODEL.
vb.comp(): Changed d argument to df.
wlgm.RD(): Added example code.  Added some details.


0.0-7 unknown
o changed to compiling under R 2.6.1.
o added FSA.R file that loads the required librarys.
o now depends on MASS package because of the creation of the boxcox.WLGM() function and on the
    plotrix package for elements of ycplot().

add.radcap(): Created this function to add the radius-at-capture to a one-fish-per-line data
    frame of increments.
age.comp(): Added a match.arg() call for the what argument.
age.key(): Corrected =T or =F to =TRUE or =FALSE.
cc.sim(): Corrected the use of z.param with correct use of Z.param.
coefplot(): A new generic function for plotting coefficients from a Weisberg Linear Growth Model analysis.
g.convert(): Changed arguments from data and measure.var to df and in.var.  Included match.arg() for the
    type argument.  Moved type argument as it now has a default.  Added the in.pre argument that allows 
    the user to identify all input variables by a common prefix rather than having to list them out in 
    in.var.  Added the out.pre argument that allows the user to control the prefix for the newly created 
    variables in the output data frame.  Updated help file.
g.reshape(): Changed arguments from data and prefix to df and in.pre.  Deleted the measure.var argument.
    Moved new in.pre argument forward and na.rm argument backward in the argument list.  Used in.pre to 
    identify the measure.var variables to send to the melt function.  If id.var is left blank (and in.pre 
    is not) then id.var is the remaining variables not identified by in.pre.  The val.name argument was 
    set equal to in.pre as the default.
leslie.sim(): Corrected call to old leslie() function with a correct call to depletion() function with
    type="Leslie".
leslie.sim2(): Corrected two calls to old leslie() function with correct calls to depletion() function
    with type="Leslie".
leslie.rand.run(): Moved R Documentation alias to FSA-internal.RD.
mr.closed2(): Forced the function to use the lowess() function in the stats rather than the gplots package
    (which is loaded from NCStats).  Also changed the loess.f argument to f and added the iter argument for
    sending to lowess().
confint.MRO(): Put in a logical catch when printing the confidence intervals because if ci.type="Manly"
    then CIs for B are not computed.
summary.MRO(): Put in a logical catch when printing the estimates because if ci.type="Manly" then SEs are
    not computed.
plot.RLP(): Corrected =T or =F to =TRUE or =FALSE.
wlgm(): Created a method with a number of generics (alias, anova, boxcox, coef, coefplot, confint, ycplot)
    for performing the Weisberg Linear Growth Model.
ycplot(): A new generic function for creating a year-class plot for the Weisberg Linear Growth Model analysis.


0.0-6 unknown
agebias.plot(): deleted and replaced with agecomp and plot.AgeComp functions.
agesunflower.plot(): deleted and replaced with agecomp and plot.AgeComp functions.
agecomp(): a new function that, along with its extractor functions, combines all of the functionality
    of the old age.tests, age.symmetry, agebias.plot, and agesunflower.plot.  Allows for a more 
    seamless comparison of ageing reads.
plot.AgeComp(): an extractor function for objects saved from the agecomp function.  This replaces
    the old agebias.plot and agesunflower.plot functions.
summary.Agecomp(): an extractor function for objects saved from the agecomp function.  This replaces
    the old age.tests and age.symmetry functions.
age.symmetry(): deleted and replaced with agecomp and summary.AgeComp functions.
age.tests(): deleted and replaced with agecomp and summary.AgeComp functions.
cc.sim(): modified graphic to (1) include assumption violation labels on top of the graph and
    (2) label y-axis with "log(Catch)" rather than "ln(Catch)".
delury(): deleted and replaced with depletion function.  See notes for depletion function.
depletion(): created a new function that performs the Leslie or Delury method as determined by a
    user-defined argument to type.  This function replaces the old leslie and delury functions.
    All extractor functions for the class "LeslieDelury" have now been changed to class "Depletion".
plot.Depletion(): correct xlab so that it defaults to "Cumulative Effort" for the Delury method.
leslie(): deleted and replaced with depletion function.  See notes for depletion function.
leslie.sim(): modified graphic to include assumption violation labels on top of the graph.
mr.open(): modified est.N() internal function so that N is set equal to n if N
    if the sample size at time i is larger than the estimated population size at time i then the
    estimated population size is set equal to the observed sample size.  This corrects the problem
    of the N.se calculation attempting to take the square root of a negative number causing the
    mr.open() function to shut down.
pass.removal(): changed name to removal.
removal(): new name for old pass.removal function.
rlp(): new name for old (upper-case) RLP.
RLP(): changed name to (lower-case) rlp.