James-Thorson-NOAA / FishLife

Estimate fish traits for all marine fish species globally
https://james-thorson-noaa.github.io/FishLife/
GNU General Public License v3.0
45 stars 12 forks source link

Extracting age at maturity and generation times #9

Closed jpwrobinson closed 6 years ago

jpwrobinson commented 6 years ago

I've been trying to figure out how to alter the 'params' argument in Plot_taxa to extract age at maturity (a_mat in Thorson et al. 2017, Ecol Appl), and whether FishLife is set up to also extract generation times from Fishbase?

As far as I can work out, the package is working from a fixed database (database.rda in this repo) rather than extracting directly from Fishbase. Can this be done??

Thanks. Great package! Vastly preferable to fishbase estimates, and big fan of using family-level uncertainty envelopes.

James-Thorson commented 6 years ago

Thanks for your interest! I'd be curious to hear more about how you're using it if you want to email me.

I've been trying to figure out how to alter the 'params' argument in Plot_taxa to extract age at maturity (a_mat in Thorson et al. 2017, Ecol Appl), and whether FishLife is set up to also extract generation times from Fishbase?

The vignette vignette("tutorial","FishLife") shows how to extract a table of parameter estimates and their covariance for a given taxon (species or higher-order classification). Parameter tm is the natural log of age-at-maturity. Generation time could presumably be calculated (perhaps using Monte Carlo or the delta method to get its predictive SD) from the set of parameters, but this is not automated.

As far as I can work out, the package is working from a fixed database (database.rda in this repo) rather than extracting directly from Fishbase. Can this be done??

The vignette also shows how to refit the model using Fit_model. FishLife can be fitted to any new database (e.g., a new download of FishBase) using the same function, and plugging in the dataset as inputs to that function. I don't have an easy example for doing so, but you can look at the format of the existing inputs there.