-
Notifications
You must be signed in to change notification settings - Fork 0
/
01-preface.Rmd
106 lines (68 loc) · 7.47 KB
/
01-preface.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Preface {#Preface}
## What is Gmacs ?{-}
Gmacs is a statistical size-structured population modeling framework designed to be flexible, scalable, and useful for both data-limited and data-rich situations. As most of the standard assessment models, it allows to determine the impact fishing on both the historical and the current abundance of the population and to evaluate sustainable rate of removals (i.e., catches).
The framework can incorporate multiple data types from a variety of sources (fisheries, surveys) by combing all of them in the form of an integrated analysis [@maunder_review_2013; @punt_review_2013)]. This approach allows various kinds of data with different (and sometimes incomplete) collection histories to provide complementary information about fished stocks.
Initially developed to assess red king crab stocks of Alaska, Gmacs is designed with similar flexibility to that provided by age-structured stock assessment modelling frameworks like [Stock Synthesis](https://vlab.noaa.gov/web/stock-synthesis) and [CASAL](https://niwa.co.nz/fisheries/tools-resources/casal). Similar to these model, Gmacs has a population sub-model that simulates stock biological dynamics (growth, maturity,fecundity, recruitment, molting), an observation sub-model that estimates expected values for different kind of data (e.g. fishery and/or survey abundance indices, fisheries discard data, size composition data, ...) and a statistical sub-model that quantify the goodness of fit and provides best-fitting parameters estimates and associated variance.
Gmacs is an open source program coded in C++ and implemented in Automatic Differentiation Model Builder ([ADMB](http://www.admb-project.org/); @fournier_ad_2012) for parameter estimation.
## Prerequisites{-}
Before getting Gmacs installed, make sure you have all the software you need to run Gmacs (and associate tools) correctly:
+ __AD Model Builder__: Gmacs is available for download as a series of source files. In order to use Gmacs, you will need to build these source files into an executable. To do this, you will need a recent version of AD Model Builder ([ADMB](http://www.admb-project.org/)). We recommend downloading the latest version of ADMB from the [ADMB GitHub repository](https://github.com/admb-project/admb) and building ADMB from source. Alternatively, recent pre-compiled builds of ADMB can be downloaded from [the ADMB website](http://www.admb-project.org/downloads/). Instructions for installing ADMB from pre-compiled builds can be found on the [ADMB website](http://www.admb-project.org/docs/install/) as well. For more details about how work ADMB, please see the [user manual](http://www.admb-project.org/docs/manuals/).
+ __R__: If you are reading this book, you probably have R already installed. If that is not the case and you plan to use both the `gmr` package and the Rmarkdown resources to build stock assessment documents, you will need R. If you are a new R user and would like to learn how to use R, we would recommend the following two books [_R cookbook_](https://rc2e.com/index.html) and [_R for data Science_](https://r4ds.had.co.nz/) which are designed to get you up and running with R.
+ __Rstudio__: Despite any text editor can be used to view and edit Rmarkdown files, we recommend to use [Rstudio](https://www.rstudio.com/) if you plan to use the Rmarkdown resources to build stock assessment documents. Its editor will make it easier to work with R Markdown. You can download Rstudio [here](https://www.rstudio.com/products/rstudio/download/).
## Getting Gmacs installed{-}
Here we provide detailed instruction on how to ho about installing Gmacs on the most popular operating systems (Windows, Mac or linux computers).
### Installing Gmacs{-}
The latest version of Gmacs can be download [here]().
- Quick start for windows machines
1. Download [gmacs-develop.zip](https://github.com/seacode/gmacs/archive/develop.zip).
2. Unzip the folder to create `c:/gmacs-develop` or something similar.
3. Open an ADMB Command windows.
4. Navigate to `c:/gmacs-develop/src` and type `make.bat`.
5. The Gmacs executable (`gmacs.exe`) should be built inside the `src/` folder.
6. See Chapter 7 for building your own model.
- Quick start for Mac machines
1. Download [gmacs-develop.zip](https://github.com/seacode/gmacs/archive/develop.zip).
2. Unzip the folder to create `/users/Your-name/gmacs-develop` or something similar.
3. Open a Terminal
4. Navigate to `/users/Your-name/gmacs-develop/src`.
5. Edit the `make` file to reference your local machine.
6. Return to Terminal and type `make` to get started.
7. The Gmacs executable (`gmacs.exe`) should be built inside the `src/` folder.
8. See Chapter 7 for building your own model.
- Installation on Linux
Installing ADMB on Linux is easy via [GitHub](https://github.com/)....
## What are the available tools for working with Gmacs?{-}
Numerous tools have been developed to facilitate and spread the use of Gmacs. This include various repositories on GitHub as well as:
- [gmr](https://github.com/seacode/gmacs/tree/develop/gmr): a purpose-built R package for plotting Gmacs outputs and work with Gmacs files in R.
- [Gmad](): a dedicated library to generate stock assessment documents in pdf form using Gmacs outputs.
## How can I learn how to use Gmacs and associated tools?{-}
This book is the first place to learn more about how to use Gmacs. Its different chapters should make you able to start using Gmacs in a relatively simple way. To learn more about model equations and population dynamics considered within Gmacs, please see the general model description paper [to come](). We suggest walking through the available vignettes to familiarize with Gmacs.
The basic vignette included in the [gmr](https://github.com/seacode/gmacs/tree/develop/gmr) R package provides help for installing the package and an overview of the available functions.
## How can I get help?{-}
The first thing to do is to have a look at the Frequently Asked Questions page.
beyond the FAQ page:
- Is there an specific email address where people can ask help?
- Do you want to create a kind of forum?
## How can I follow/contribute to Gmacs development?{-}
Should we consider the possibility for the user to report bugs or request features through an issue on GitHub, suggest code changes (pull request), or suggest changes to the Gmacs manual.
## How can I report issues?{-}
Post in the Forum or open an issue in the Gmacs repo.
## The Gmacs development team{-}
Table \@ref(tab:contr) summarizes the people who have worked on the Gmacs project since its inception.
Table:(\#tab:contr) Gmacs development team - Contributors.
```{r contr, echo =FALSE, out.width='80%',fig.align='center'}
ctr <- data.frame(
Contributors = c("**Jim Ianelli**", "**D'Arcy Webber**", "**Cody Szuwalski**", "**Jack Turnock**",
"**Jie Zheng**", "**Hamachan Hamazaki**", "**Athol Whitten**", "**Andre Punt**",
"**David Fournier**", "**John Levitt**"),
Organisation = c("Alaska Fisheries Science center - NOAA", "Quantfish",
"Alaska Fisheries Science center - NOAA","Alaska Fisheries Science center - NOAA",
"Alaska Department of Fish and Game", "Alaska Department of Fish and Game",
"School of Aquatic and Fishery Sciences - University of Washington",
"School of Aquatic and Fishery Sciences - University of Washington",
"Otter Research Ltd.","")
)
knitr::kable(
ctr, booktabs = TRUE
)
```