Data and code from: Migratory nightjars roost on asphalt to reduce thermoregulatory costs and increase fuel accumulation
Data files
Jun 17, 2026 version files 31.42 KB
-
Dataset_migratory_nightjars_substrate_choice.txt
23.40 KB
-
MigratoryNightjars-Script.R
4.48 KB
-
README.md
3.53 KB
Abstract
This dataset includes standard measurements and individual observations of red-necked nightjars (Caprimulgus ruficollis) taken during capturing sessions. Data on the date of capture, substrate type where nightjars were captured, temperature and percentage of moon face illuminated of that night, and time elapsed since sunset until capture are also included in the dataset. Fieldwork was carried out between 2011 and 2018 (8 years) in a protected area of the Doñana Natural Park (Spain). Nightjars were captured during the night (1-6 h after sunset) along a road network (7.27 km of asphalt and 17.67 km of gravel roads) using a butterfly net and measured for standard morphological traits.
Description of data and code
Data file: Dataset migratory nightjars substrate choice.txt
Article: Migratory nightjars roost on asphalt to fuel faster
Journal: Journal of Avian Biology (accepted)
Authors: Paula Hidalgo-Rodríguez, Pim Edelaar, Julio Rabadán-González, Jairo Robla, Lars Ursem, Pedro Sáez-Gómez, Carlos Molina, Mark Brigham, Carlos Camacho
| Variable | Description |
|---|---|
| RING | Reference number for the identity of each bird. |
| DOY | Capture date (Day of year) |
| YEAR | Year of capture date |
| TEMPM | Day of year |
| SUBS | Substrate type where the nightjar was captured, coded as 1 = asphalt, 0 = gravel |
| SX | Bird sex, coded as 1 = male, 2 = female |
| AGECLASS | Age of the captured nightjar, coded as 1 = juvenile, 2 = adult |
| STOMACH | Gizzard fullness, coded as 0 = empty, 1 = ¼, 2 = ½, 3 = ¾ or 4 = full |
| WEIGHT | Body mass to the nearest 0.1 g. |
| HFROMDUSK | Time elapsed since sunset until the nightjar was captured |
| X.MOON | Percentage of the moon face illuminated |
R SCRIPT DESCRIPTION
The uploaded R script (MigratoryNightjars-Script.R) was used to analyse substrate choice in migratory Red-necked nightjars using binomial generalized linear mixed models. The script reads a tab-delimited dataset named Dataset migratory nightjars substrate choice.txt, prepares the variables for analysis, centres/scales the predictor variables, fits a set of candidate binomial GLMMs using glmmTMB, performs model selection with MuMIn::dredge, removes duplicated models after merging model-selection tables, and conducts model averaging on the set of models contributing to 95% of the cumulative Akaike weight.
The response variable in the models is SUBS, representing substrate choice. The explanatory variables considered include temperature (TEMPM), time from dusk (HFROMDUSK), moonlight (X.MOON), body mass (PESO), stomach content/body condition-related variable (ESTOMAGO), sex (SX), age class (AGECLASS), and year (YEAR). Year was included as a random intercept in the models. Several alternative global models were fitted, each including different three-way interaction structures among environmental and individual-level predictors. All possible submodels were then generated using the dredge function.
SOFTWARE AND PACKAGES
The analyses were run using: R version 4.2.3 (2023-03-15 ucrt) -- "Shortstop Beagle"
The following R packages were loaded in the script:
latticelmerTestlme4effectsMuMInggplot2sjPlotglmmTMBdplyr
REQUIRED INPUT AND WORKING DIRECTORY
The script requires the input file: Dataset migratory nightjars substrate choice.txt
This file must be located in the active R working directory, or the file path in the read.table() function must be modified accordingly. The input file is expected to be a tab-delimited text file with headers, decimal points, NA values coded as NA, and Latin-1 file encoding.
Notes for rerunning the script
The script uses options(na.action = "na.fail"), which is required for the MuMIn::dredge() function. Therefore, the dataset should not contain missing values in the variables used in the models, unless these are handled before model fitting.
Address questions to Carlos Camacho, e-mail: ccamacholmedo@gmail.com
