generated from Aariq/paper-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
73 lines (50 loc) · 3.12 KB
/
README.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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
<!-- badges: start -->
[![pages-build-deployment](https://github.com/BrunaLab/lagged-ipms/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/BrunaLab/lagged-ipms/actions/workflows/pages/pages-build-deployment)
<!-- DOI badges go here -->
<!-- badges: end -->
This repository contains data and code for a manuscript by Eric Scott and Emilio Bruna written for submission to The American Naturalist tentatively titled: *Context-dependent consequences of including lagged effects in demographic models*.
The idea here is to investigate the consequences of including lagged effects (such as those modeled by distributed lag non-linear models) into population models (integral projection models, IPMs).
We'll compare population growth rates (lambda) with deterministic, stochastic (matrix shuffling), and lagged effects IPMs.
The most recent draft of the manuscript is available [here](https://brunalab.github.io/lagged-ipms/docs/paper.html).
[Notes for collaborators](https://brunalab.github.io/lagged-ipms/notes/index.html)
# Roadmap
Before June 3:
- [x] Finish building all IPMs
- [x] Document functions and \_targets.R
- [ ] Calculate bootstrapped 95% CIs around all lambdas
- [x] Finish draft of methods section
- [x] Draft tables & figures
- [ ] Archive draft of code in Zenodo
Future:
- [ ] Finish writing and revising
- [ ] Submit
# Reproducibility
This research compendium has been developed using the statistical programming language R.
To work with the compendium, you will need installed on your computer the [R software](https://cloud.r-project.org/) itself and [RStudio Desktop](https://rstudio.com/products/rstudio/download/).
You can download the compendium as a zip file from from this URL: [master.zip](/archive/master.zip).
To run the compendium and reproduce all outputs:
- Open the project in RStudio by double-clicking the `.Rproj` file.
- This project uses `renv` for package management, which should be installed automatically when opening the project. Run `renv::restore()` to install all required packages.
- This project uses `targets` for workflow management. The functions used in the project are defined in `R/` and the steps are defined in `_targets.R` and summarized in the schematic below. Run `targets::tar_make()` or `targets::tar_make_clustermq()` from the R console to run all code and produce all outputs.
```{r echo=FALSE, message=FALSE, warning=FALSE, results='asis'}
cat(
"```mermaid",
targets::tar_mermaid(targets_only = TRUE),
"```",
sep = "\n"
)
#this should display correctly on GitHub, or code can be pasted into https://mermaid.live
```
### NOTES:
- The targets `lambda_bt_dlnm_ff` and `lambda_bt_dlnm_cf` will take a very long time to run (days), so you may want to comment those out before attempting to reproduce results.
- If you want to make use of HPC, follow instructions [here](https://github.com/BrunaLab/hipergator-targets-ssh) to customize templates and options.