knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
In this vignette I use the Namimian Hake as an example of how to use this package using:
First, we'll have a look at the input data and the Stock ID object sID
. To create a new stock ID object we use the function new_sID
. The data for this example were taken from chapter 10 in the Ecological Detective (Hilborn and Mangel, 1997).
library(catchMSY) data(NamibianHake) names(hake) head(hake$data)
Given a valid `sID' object, you can quickly run the age-structured model and preview the results.
hake <- runModel(hake) str(hake)
library(catchMSY) data(NamibianHake) knitr::kable(head(hake$data, 10))
The stock ID object for this example is included in the catchMSY
package, and the default values for new_sID
were used to set up the initial stock ID object. Here is the structure of that object.
The catchMSY
package is intended to be used to determine MSY-based reference points.
The catchMSY package is based on the initial work for Martell and Froese (2012). "A simple method for estimating MSY from catch and resilience".
This is a simple example based on the Namibian hake dataset published in the ecoloigical detective (Hilborn and Mangle, 1997).
Steps:
Describe the contaents of an 'sID' object.
library(catchMSY) library(ggplot2) # load the hake sID object data(NamibianHake) # run the age structured model. hake <- runModel(hake) # plot the biomass qplot(hake$year,hake$bt,geom="line")
Hilborn, R. and Mangel, M. (1997). The ecological detective: confronting models with data. Princeton Univ Pr.
Martell, S. and Froese, R. (2012). A simple method for estimating msy from catch and resilience. Fish and Fisheries.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.