five

Data and R code for "Dolphin social phenotypes vary in response to food availability but not the North Atlantic Oscillation index" - post correction

收藏
DataCite Commons2024-10-14 更新2024-11-06 收录
下载链接:
https://figshare.com/articles/dataset/Data_and_R_code_for_Dolphin_social_phenotypes_vary_in_response_to_food_availability_but_not_the_North_Atlantic_Oscillation_index_/23256845/3
下载链接
链接失效反馈
官方服务:
资源简介:
Two text files containing data and one .R file with R code. These files are sufficient to recreate the analysis found in the manuscript "Dolphin social phenotypes vary in response to food availability but not the North Atlantic Oscillation index", published in Proceedings of the Royal Society B: Biological Sciences in October 2023 and corrected in October 2024 (see below).<br>In brief, the data are based on regular observations of bottlenose dolphins (<i>Tursiops truncatus</i>) off the north east coast of Scotland between 1990 and 2021 inclusive. Regular observations of dolphins co-occurring in groups allowed us to infer social associations and to build social networks. We built social networks for each month and each year there were sufficient observations. From each network we calculated three social network measures (strength, weighted clustering coefficient, and closeness) and we then analyses how these traits vary at both the yearly and monthly scale in response to variation in the North Atlantic Oscillation index and to salmon abundance (data obtained from other sources). We upload the dataset both before filtering (suffix "raw", including individuals of unknown sex and with only a few observations per year/month) and the dataset after filtering which is used for the analyses in the paper.The correction revolves around the calculation of the social network measure "closeness" using the R package <i>igraph</i>. We determined that this function treats the interaction strengths between individuals as distances or costs, where higher values mean more distant/less well-connected. This interpretation of interaction strengths is opposite to how they are interpreted for most other social network metrics, where higher values indicate closer and more well-connected individuals. The consequences are that the closeness values we analysed in the original version of the article are incorrect, and so the results and conclusions around closeness are erroneous. We then re-calculated closeness using a different R package, <i>tnet</i>, which treats interaction strengths in the manner expected i.e., higher values mean closer together, and re-ran all analyses involving closeness. See the supporting documentation of the paper for a description of the changes to the results in full.<br>"Dol Soc by Env Yearly data tC.txt" is the data frame for the yearly scale analysis, with network metrics per individual per year and environmental variables per year. Columns are:<br>dol_name - the unique ID of the dolphinyear - the year of observationsex - sex of the dolphin, 1 = male, 2 = femaleyear_nao - the north atlantic oscillation index record for that yearyear_fish - the yearly salmon abudance measureindiv_str - the individual's strength in that yearindiv_cc - the individual's weighted lcustering coefficient in that yearindiv_close - the individual's closeness in that year<br>"Dol Soc by Env Monthly data tC.txt" is the data frame for the monthly scale analysis, with network metrics per individual per month and environmental variables per month. Columns are:<br>dol_name - the unique ID of the dolphinyear - the year of observationmonth - the month of observation, coded numerically i.e., April = 4sex - sex of the dolphin, 1 = male, 2 = femalemonth_year_nao - the north atlantic oscillation index record for that monthmonth_year_fish - the monthly salmon abundance measureindiv_str - the individual's strength in that monthindiv_cc - the individual's weighted clustering coefficient in that monthindiv_close - the individual's closeness in that month<br>"Dol Soc by Env Monthly data tC raw.txt" and "Dol Soc by Env Yearly data tC raw.txt" are the above datasets but prior to filtering (see R code).<br>"Fisher &amp; Cheney code Dol Soc by Env tC.R" is the R code file to recreate the analyses found in the manuscript (a series of mixed-effect models). We used R version 4.3.1 for the analysis. Note requires loading the packages "glmmTMB" (version 1.1.7) and "car" (version 3.1-2) so they must be installed first. Additionally, you will need to save the following R script: https://github.com/hschielzeth/RandomSlopeR2/blob/master/condR.R and refer to it with the source() command to enable the calculation of conditional repeatabilities.

本数据集包含两份文本数据文件与一份R语言代码文件(.R格式),可复现2023年10月发表于《英国皇家学会学报B:生物科学》(Proceedings of the Royal Society B: Biological Sciences)并于2024年10月修订的论文《海豚社会表型随食物可获得性而非北大西洋涛动指数变化》中的分析过程(详见下文)。 简要来说,本数据集基于1990年至2021年间(含首尾年份)对苏格兰东北海域宽吻海豚(*Tursiops truncatus*)的长期观测记录。通过对同群出现的海豚的定期观测,我们可推断其社会关联并构建社会网络。在观测样本量充足的月份与年份,我们分别构建了社会网络,并从每张网络中计算了三项社会网络指标:个体连接强度(strength)、加权聚类系数(weighted clustering coefficient)与接近中心性(closeness)。随后,我们分析了这些社会特征在年际与月际尺度上,如何响应北大西洋涛动指数与鲑鱼丰度(数据来自其他公开来源)的变化。 本次上传的数据集包含未经过滤(文件名后缀为"raw",包含性别未知且每年/每月观测次数较少的个体)与经过滤后的两个版本,其中过滤后版本用于论文中的正式分析。 本次修订围绕使用R包*igraph*计算“接近中心性”的过程展开:我们发现该函数将个体间的互动强度视为距离或成本,即数值越高代表个体间距离越远、连接越弱。这一解读与绝大多数社会网络指标的常规定义相悖——后者通常以更高数值代表个体间关联更紧密、连接更强。因此,原论文版本中分析使用的接近中心性数值存在错误,相关围绕接近中心性的结果与结论均存在偏差。随后我们更换为R包*tnet*重新计算了接近中心性,该包对互动强度的解读符合常规定义:即数值越高代表个体间关联越紧密。我们基于修正后的接近中心性重新运行了所有相关分析。完整的结果变更说明详见论文的支持性文档。 1. "Dol Soc by Env Yearly data tC.txt"为年际尺度分析的数据集,包含每只海豚每年的社会网络指标与年度环境变量,各字段含义如下: - dol_name:海豚的唯一识别ID - year:观测年份 - sex:海豚性别,1代表雄性,2代表雌性 - year_nao:对应年份的北大西洋涛动指数记录 - year_fish:年度鲑鱼丰度指标 - indiv_str:该年度个体的连接强度 - indiv_cc:该年度个体的加权聚类系数 - indiv_close:该年度个体的接近中心性 2. "Dol Soc by Env Monthly data tC.txt"为月际尺度分析的数据集,包含每只海豚每月的社会网络指标与月度环境变量,各字段含义如下: - dol_name:海豚的唯一识别ID - year:观测年份 - month:观测月份(以数字编码,例如4代表4月) - sex:海豚性别,1代表雄性,2代表雌性 - month_year_nao:对应月份的北大西洋涛动指数记录 - month_year_fish:月度鲑鱼丰度指标 - indiv_str:该月度个体的连接强度 - indiv_cc:该月度个体的加权聚类系数 - indiv_close:该月度个体的接近中心性 3. "Dol Soc by Env Monthly data tC raw.txt"与"Dol Soc by Env Yearly data tC raw.txt"分别为上述两个数据集未经过滤的原始版本(详见R代码文件)。 4. "Fisher & Cheney code Dol Soc by Env tC.R"为用于复现论文分析的R代码文件(包含一系列混合效应模型)。本次分析使用的R版本为4.3.1,需预先安装"glmmTMB"(版本1.1.7)与"car"(版本3.1-2)两个依赖包。此外,需下载并保存以下R脚本:https://github.com/hschielzeth/RandomSlopeR2/blob/master/condR.R,并通过source()命令调用该脚本,以实现条件可重复性的计算。
提供机构:
figshare
创建时间:
2024-10-14
二维码
社区交流群
二维码
科研交流群
商业服务