fishRDemonstrations for using R for fisheries analyses.
http://derekogle.com/fishR
Replace compIntercepts() with emmeans()
Introduction The compIntercepts() function in FSA (prior to v0.9.0) was used to statistically compare intercepts for all pairs of groups with the same slope in an indicator/dummy variable regression (I/DVR). However, the excellent emmeans() function in the emmmeans package is a more general approach that follows principals similar to those...
Wed, 12 May 2021 00:00:00 -0500
http://derekogle.com/fishR/2021-05-12-compIntercepts-replacement
http://derekogle.com/fishR/2021-05-12-compIntercepts-replacementReplace compSlopes() with emtrends()
Introduction The compSlopes() function in FSA (prior to v0.9.0) was used to statistically compare slopes for all pairs of groups in an indicator/dummy variable regression (I/DVR). However, the excellent emtrends() function in the emmmeans package is a more general and strongly principaled function for this purpose. As such, compSlopes() will...
Tue, 11 May 2021 00:00:00 -0500
http://derekogle.com/fishR/2021-05-11-compSlopes-replacement
http://derekogle.com/fishR/2021-05-11-compSlopes-replacementAge Bias Plots Using ggplot
Guest Post Note Please note that this is a guest post to fishR by Michael Lant, who at the time of this writing is a Senior at Northland College. Thanks, Michael, for the contribution to fishR. Introduction My objective is to demonstrate how to create the age bias plots...
Mon, 15 Mar 2021 00:00:00 -0500
http://derekogle.com/fishR/2021-03-15-AgeBiasPlots-With-ggplot
http://derekogle.com/fishR/2021-03-15-AgeBiasPlots-With-ggplotvon Bertalanffy Growth Plots II
Introduction library(FSAdata) # for data library(FSA) # for vbFuns(), vbStarts(), confint.bootCase() library(car) # for Boot() library(dplyr) # for filter(), mutate() library(ggplot2) In a previous post I demonstrated how to make a plot that illustrated the fit of a von Bertalanffy growth function (VBGF) to data. In this post, I will...
Thu, 02 Jan 2020 00:00:00 -0600
http://derekogle.com/fishR/2020-01-02-ggplot-vonB-fitPlot-2
http://derekogle.com/fishR/2020-01-02-ggplot-vonB-fitPlot-2von Bertalanffy Growth Plots I
Introduction library(FSAdata) # for data library(FSA) # for vbFuns(), vbStarts(), confint.bootCase() library(car) # for Boot() library(dplyr) # for filter(), mutate() library(ggplot2) I am continuing to learn ggplot2 for elegant graphics. I often make a plot to illustrate the fit of a von Bertalanffy growth function to data. In general, I...
Tue, 31 Dec 2019 00:00:00 -0600
http://derekogle.com/fishR/2019-12-31-ggplot-vonB-fitPlot-1
http://derekogle.com/fishR/2019-12-31-ggplot-vonB-fitPlot-1(Fish) Length Frequency Histograms in ggplot2
Introduction library(FSAdata) # for data library(ggplot2) I am finally learning ggplot2 for elegant graphics. One of the first plots that I wanted to make was a length frequency histogram. As it turns out, there are a few “tricks” to make the histogram appear as I expect most fisheries folks would...
Sat, 28 Dec 2019 00:00:00 -0600
http://derekogle.com/fishR/2019-12-28-ggplot-histograms
http://derekogle.com/fishR/2019-12-28-ggplot-histogramsRFishBC CRAN Release
I am pleased to announce that the RFishBC package has been released to CRAN. This package is intended to help fisheries scientists gather age and measurement data from digital images of calcified structures and, possibly, back-calculate previous length from that data. RFishBC is intended to replace the FishBC software that...
Thu, 22 Nov 2018 00:00:00 -0600
http://derekogle.com/fishR/2018-11-22-RFishBC-Release
http://derekogle.com/fishR/2018-11-22-RFishBC-ReleaseSeeking Paired Fish Age Estimates
Josh Lyons, a Senior at Northland College, and I are reviewing metrics used to measure precision of (or variability among) estimated ages of fish from multiple readings of calcified structures (e.g., percent agreement, CV). In the first part of our work, we are reviewing ~225 published papers (since about 1990)...
Fri, 09 Nov 2018 00:00:00 -0600
http://derekogle.com/fishR/2018-11-09-Paired-Ageing-Data
http://derekogle.com/fishR/2018-11-09-Paired-Ageing-DataNew FSA Authors
It was always my hope that the Fisheries Stock Assessment (FSA) R package would become a community endeavor. With the recent release on CRAN of v0.8.21 that hope has finally come to fruition. This version has two new co-authors. Alexis Dinno is the author of the dunn.test package. The dunnTest()...
Sun, 04 Nov 2018 00:00:00 -0500
http://derekogle.com/fishR/2018-11-04-New-FSA-Authors
http://derekogle.com/fishR/2018-11-04-New-FSA-AuthorsTesters for RFishBC
Back-calculating lengths of fish at previous ages from measurements made on calcified structures (scales, otoliths, etc.) is fairly common practice within some fisheries agencies and institutions. The FishBC software distributed by the American Fisheries Society is used by some of these agencies to facilitate gathering the required information from the...
Thu, 07 Jun 2018 00:00:00 -0500
http://derekogle.com/fishR/2018-06-07-RFishBC-Testers
http://derekogle.com/fishR/2018-06-07-RFishBC-TestersAdding Zero Catches
Introduction Much of my work is with undergraduates who are first learning to analyze fisheries data. A common “learning opportunity” occurs when students are asked to compute the mean catch (or CPE), along with a standard deviation (SD), across multiple gear sets for each species. The learning opportunity occurs because...
Thu, 19 Apr 2018 00:00:00 -0500
http://derekogle.com/fishR/2018-04-19-Adding-Zero-Catches
http://derekogle.com/fishR/2018-04-19-Adding-Zero-CatchesCollapsing Categories or Values
Introduction I have received a few queries recently that can be categorized as “How do I collapse a list of categories or values into a shorter list of category or values?” For example, one user wanted to collapse species of fish into their respective families. Another user wanted to collapse...
Fri, 30 Mar 2018 00:00:00 -0500
http://derekogle.com/fishR/2018-03-30-Collapsing_Values
http://derekogle.com/fishR/2018-03-30-Collapsing_ValuesStock-Recruitment Graphing Questions
A fishR user recently asked me In the book that you published, I frequently use the stock-recruit curve code. The interface that shows both the Ricker/Beverton-Holt figure with the recruit per spawner to spawner figure (i.e., the dynamic plot for srStarts()) has not been working for quite some time. Additionally,...
Tue, 12 Dec 2017 00:00:00 -0600
http://derekogle.com/fishR/2017-12-12-Stock-Recruitment-Graphing-Questions
http://derekogle.com/fishR/2017-12-12-Stock-Recruitment-Graphing-QuestionsPlots of Back-Calculated Lengths-At-Age I
Last spring, I posted about my version of a modified age-bias plot. One reader commented on that post via Twitter – “Now that you solved the age-bias plot, how about the ‘best’ display of back-calculated length-at-age data, with VonB growth curve overlay?”. In addition, I recently received a question related...
Tue, 07 Nov 2017 00:00:00 -0600
http://derekogle.com/fishR/2017-11-07-BackCalculationPlot
http://derekogle.com/fishR/2017-11-07-BackCalculationPlotMean Weights at Ages From Lengths
Introduction Recently I was tasked with estimating mean weights at age for data that contained no weights, but did contain lengths and ages (ages were from applying an age-length key). A weight-length relationship was available (derived from a smaller sample from the same population). A question arose about whether the...
Wed, 09 Aug 2017 00:00:00 -0500
http://derekogle.com/fishR/2017-08-09-MeanWeights
http://derekogle.com/fishR/2017-08-09-MeanWeightsJoy Plot of Length Frequencies
There has been a bit of a buzz recently about so-called “joyplots.” Wilke described joyplots as “partially overlapping line plots that create the impression of a mountain range.” I would describe them as partially overlapping density plots (akin to a smoothed histogram). Examples of joyplots are here, here, and here...
Fri, 28 Jul 2017 00:00:00 -0500
http://derekogle.com/fishR/2017-07-28-JoyPlot
http://derekogle.com/fishR/2017-07-28-JoyPlotAge Bias Plot Changes in FSA
In the last two weeks, I have posted twice about modifying age bias plots and Bland-Altman-like plots for comparing age estimates. From those posts, I have decided that I prefer to plot differences between the ages on the y-axis (as compared to the nonreference ages), plot overlapping points with a...
Wed, 26 Apr 2017 00:00:00 -0500
http://derekogle.com/fishR/2017-04-26-AgeBias_inFSA
http://derekogle.com/fishR/2017-04-26-AgeBias_inFSABland-Altman Plot for Age Comparisons?
Last week I posted about a modified age bias plot. In this post I began looking more deeply at an alternative plot called the Bland-Altman plot. Below, I describe this plot, demonstrate how to construct it in R, give a mild critique of its use for compare fish age estimates,...
Thu, 20 Apr 2017 00:00:00 -0500
http://derekogle.com/fishR/2017-04-20-Modified_BlandAltmanPlot
http://derekogle.com/fishR/2017-04-20-Modified_BlandAltmanPlotModified Age Bias Plot
Original Age Bias Plot Campana et al. (1995) introduced the “age bias plot” to visually assess potential differences in paired age estimates (e.g., between two structures such as scales and otoliths, between two readers, or between one reader at two times). One set of age estimates serve as “reference” ages...
Fri, 14 Apr 2017 00:00:00 -0500
http://derekogle.com/fishR/2017-04-14-Modified_AgeBiasPlot
http://derekogle.com/fishR/2017-04-14-Modified_AgeBiasPlotComputing SE for PSD indices
A user of my Introductory Fisheries Analyses with R book recently asked me how to compute standard errors (SE) for the various PSD indices by using the usual equation for the SE of a proportion (square root of p times (1-p) divided by n). Below is my response using the...
Fri, 09 Dec 2016 00:00:00 -0600
http://derekogle.com/fishR/2016-12-09-PSD_SE
http://derekogle.com/fishR/2016-12-09-PSD_SE