Description Usage Arguments Details Value Examples
View source: R/estimate_sensitivity.R
For every species/population combination this function will:
- Format the laying date data using format_data
.
- Use this format data to run climwin and detect the 'best window' where
temperature affects laying date. Using the function run_climwin
- Run randwin to determine the distribution of deltaAICc values that would
be expected from the same population with no climate signal.
Using the function run_climwin
- Run an SEM to detrend data.
Using the function run_SEM
1 2 3 4 5 6 7 8 9 10 | estimate_sensitivity(
input_data,
first_clutch_method = "calc",
temp_data,
randwin = FALSE,
repeats,
SEM = FALSE,
i = 1000,
dummy_test = FALSE
)
|
input_data |
Dataframe. Full dataset containing brood information of all birds from all populations. |
first_clutch_method |
Logical. Whether first clutch is determined by data owner or >30 day rule |
temp_data |
A stacked raster. Mean daily temperature data. Stored as 'tg_0.25deg_reg_v17.0' in extdata. |
randwin |
Logical. Should randwin be run with climwin? |
repeats |
Numeric. If randwin is TRUE, how many repeats should be run. |
SEM |
Logical. Should SEM analysis also be run. |
i |
Numeric. If SEM is TRUE, the number of bootstrap iterations. |
dummy_test |
Logical. If TRUE, will only use the first two rows of data. Used to test code. |
Important decisions that were made as part of the process: - We only include years where there were at least 2 values of laying date recorded. - We only include populations where there were at least 9 years of data recorded that met this criteria.
A list with climwin and (if requested) SEM results.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
### EXAMPLE FOR HOGE VELUWE ###
#Load mean temperature data
#Temperature data file can be requested from https://www.ecad.eu/ archive
temp_data <- raster::stack(here::here("data/unshared_files/tg_0.25deg_reg_v17.0.nc"))
#Load Brood_data.csv
input_data <- read.csv(here::here("data/unshared_files/Brood_info.csv"),
stringsAsFactors = FALSE, header = T, sep = ",")
#Create a subset of data for just Hoge Veluwe
input_data_test <- dplyr::filter(input_data, Pop_ID %in% "HOG")
#Run climwin and randwin
HOG_output <- estimate_sensitivity(input_data = input_data_test,
temp_data = temp_data,
randwin = TRUE, repeats = 100)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.