diff --git a/README.md b/README.md index 0ef8cb2..0ef3649 100644 --- a/README.md +++ b/README.md @@ -1,69 +1,46 @@ -# Wenatchee-survival - - -The purpose of the repository is to estimate survival, smolt-to-adult return rates, and return age probabilities for spring Chinook salmon (*Cncorhynchus tshawytscha*) marked as juveniles within the Wenatchee River Basin when emigrating from their natal stream. - -The controlling script is `manuscript/fit_wen_MSCJS_play3.Rmd`. -Please direct any questions or comments to me, Mark Sorel, at marks6@uw.edu. - - +The purpose of the repository is to estimate survival, smolt-to-adult return rates, and return age probabilities for spring Chinook salmon (*Oncorhynchus tshawytscha*) marked as juveniles within the Wenatchee River Basin when emigrating from their natal stream. This is accomplished by fitting a multi-state mark-recapture model to capture histories of PIT tagged fish. The model tracks demographic rates of fish that express different juvenile life history pathways (i.e., ages of emigration from natal streams). ## Table of Contents -archive folder - contains old material not used in the paper - -Data folder - contains data used in the analysisx - -manuscrift folder - contains the main script, `fit_wen_MSCJS_play3.Rmd`,which conducts the analysis and generates figures and tables. Also contains files for formatting references and a style template for Rmarkdown. - -src folder - contains r and TMB/c++ code processing data, fitting model, and presenting results -- `data_proc.R` takes files downloaded from PTAGIS.org and turns them into capture histories -- `Env data funcs.R` downloads and processes environmental covariate data -- `mscjs_wen_helper_funcs.R` functions for plotting data and printing tables -- `Wen_MSCJS_re_3.R` functions to takes capture histories and covariate data and format them for model fitting. Also, a helper function to fit the model. -- `wen_mscjs_re_4.cpp` the TMB model code - -## Required Packages and Versions Used -here_1.4.4 -tidyverse_1.3.0 +- *archive* folder - contains old material not used in the paper -dataRetrieval_4.3.0 +- *Data* folder - contains data used in the analysis -ggthemes_1.5.1 +- *manuscrift* folder - contains the main script, `fit_wen_MSCJS_play3.Rmd`,which conducts the analysis and generates figures and tables. Also contains files for formatting references and a style template for Rmarkdown. -TMB_1.13.0 +- *src* folder - contains r and TMB/c++ code processing data, fitting model, and presenting results -bookdown_1.4.5 + - `data_proc.R` takes files downloaded from PTAGIS.org and turns them into capture histories -captioner_3.3.2 + - `Env data funcs.R` downloads and processes environmental covariate data -DHARMa_0.4.0 + - `mscjs_wen_helper_funcs.R` functions for plotting data and printing tables + - `Wen_MSCJS_re_3.R` functions to takes capture histories and covariate data and format them for model fitting. Also, a helper function to fit the model. -## Attractant One: visual survey (VIS) lure/no lure + - `wen_mscjs_re_4.cpp` the TMB model code -Data were collected in 2015 where biologists walked transects in CP that either had no traps (no lure) or traps with mice (lure) - -The goal was to understand if encounter rate and detection probability were different between these two scenarios - -We use an indicator variable (STATUS) to denote when 1 = a transect was not surveyed, 2 = a transect was surveyed but no lures were used, and 3 = a transect was surveyed and lures were used - -## Attractant Two: visual survey (VIS) scent/no scent - -Data were collected in 2016 where biologists walked transects in CP that either had no scent applied (no scent), were freshly sprayed earlier that evening with fish fertilizer (fresh scent), or had been sprayed 24-hours previously with that scent (old scent) - -The goal was to understand if encounter rate and detection probability were different between these three scenarios +## Required Packages and Versions Used -We use an indicator variable (STATUS) to denote when 0 = a transect was not surveyed, 2 = a transect was surveyed but no scent was sprayed, 3 = a transect was surveyed and fresh scent was applied, and 4 = a transect was surveyed and scent had been applied the day before +`R version 4.1.2` -We fit two models in a Spatially Explicit Capture-Recapture framework. +`viridis_0.6.2` `viridisLite_0.4.0` `DHARMa_0.4.4` `glmmTMB_1.1.2.3` `TMBhelper_1.3.0` `TMB_1.7.22` `forcats_0.5.1` `stringr_1.4.0` `dplyr_1.0.7` +`purrr_0.3.4` `readr_2.1.0` `tidyr_1.1.4` +`tibble_3.1.6` `ggplot2_3.3.5` `tidyverse_1.3.1` +`here_1.0.1` `captioner_2.2.` ## Details of article -Details of this work can be found in the published journal article on this topic: +Details of this work can be found in the in-press journal article on this topic: Sorel MH, Murdoch AR, Zabel RW, Jorgensen JC, Kamphaus CM, and Converse SJ. Juvenile life history diversity is associated with life-long demographic heterogeneity in a migratory fish. Ecosphere. +### Abstract + +Differences in the life history pathways of juvenile animals are often associated with differences in demographic rates in later life stages. For migratory animals, different life-history pathways often result in animals from the same population occupying distinct habitats subjected to different environmental drivers. Understanding how demographic rates differ among animals expressing different life history pathways may reveal fitness tradeoffs that drive the expression of alternative life history pathways and enable better prediction of population dynamics in a changing environment. To understand how demographic outcomes and their relationships with environmental variables differ among animals with different life history pathways, we analyzed a long-term (2006–2021) mark-recapture dataset for Chinook salmon (*Oncorhynchus tshawytscha*) from the Wenatchee River, Washington, USA. Distinct life history pathways represented in this population include either remaining in the natal stream until emigrating to the ocean as a one-year-old (natal-reach rearing) or emigrating from the natal stream and rearing in downstream habitats for several months before completing the emigration to the ocean as a one-year-old (downstream rearing). We found that downstream-rearing fish emigrated to the ocean 19 days earlier on average and returned as adults from the ocean at higher rates. We detected a positive correlation between rate of return from the ocean by downstream-rearing fish and coastal upwelling in their spring of outmigration, whereas for natal-reach-rearing fish we detected a positive correlation with sea surface temperature during their first marine summer. Different responses to environmental variability should lead to asynchrony in adult abundance among juvenile life history pathways. A higher proportion of downstream-rearing fish returned at younger ages compared to natal-reach-rearing fish, which contributed to variability in age at reproduction and greater mixing across generations. Our results demonstrate how diversity in juvenile life history pathways is associated with heterogeneity in demographic rates during subsequent life stages, which can in turn affect variance in aggregate population abundance and response to environmental change. Our findings underscore the importance of considering life history diversity in demographic analyses and provide insights into the effects of life history diversity on population dynamics and tradeoffs that contribute to the maintenance of life history diversity. + ## How to use this repository -Start in the files `manuscript\fit_Wen_MSCJS_play3.Rmd` file. This can be knitted to run the entire analysis and create all the results, figures, and tables included in the paper. \ No newline at end of file +Start in the `manuscript\fit_Wen_MSCJS_play3.Rmd` file. This can be knitted to run the entire analysis and create all the results, figures, and tables included in the paper. + +Questions regarding this repository can be directed to Mark Sorel, [marksorel8\@gmail.com](mailto:marksorel8@gmail.com) diff --git a/manuscript/fit_Wen_MSCJS_play3.Rmd b/manuscript/fit_Wen_MSCJS_play3.Rmd index 36f2af7..17d1eb6 100644 --- a/manuscript/fit_Wen_MSCJS_play3.Rmd +++ b/manuscript/fit_Wen_MSCJS_play3.Rmd @@ -793,7 +793,7 @@ Occasion/interval|Variables| # Figures {-} ```{r map, echo=FALSE, out.width = '100%'} -knitr::include_graphics("2_panel_map_4-12_elev.png") +knitr::include_graphics(here("2_panel_map_4-12_elev.png")) ``` `r fig_nums("map")`