Input data, Code, and outputs
Creators: name: He, Peng
name: Klarevas-Irby, James
name: Papageorgiou, Danai
name: Strauss, Eli D.
name: Farine, Damien R
name: Christensen, Charlotte
Publisher: name: figshare
Year: 2022
Subjects: subject: 60801 Animal Behaviour
subject: FOS: Biological sciences

description: <strong>R scripts for replicating simulations and empirical analyses found in manuscript.</strong><em> Note: file paths have not been altered for general use, and will need to be changed to match local system for code to be replicated.</em><br> <strong>Empirical input data are as follows:</strong> <br> <em>Data used for testing GPS accuracy</em>- <strong>Figure_2.3.4_Data.Rdata </strong>contains GPS data from tags used for field tests of accuracy and sampling regimes, based on static deployments of tags under controlled conditions <br> <strong>Input data from 2 groups of Vulturine guineafowl </strong>(<em>Acryllium vulturinum</em>) used in Figures 5, 7, and 8 of He et al. 2022 for analyses of sub-sampling effects. Groups of size N=11 and N=25.<strong> Figure5_data.Rdata </strong>contains x and y axis and corresponding timestamps from 3 days of data from a group of 25 individuals. <br> <strong>Figure_7.8._subset_data.Rdata </strong>contains 100 random snapshots of GPS data (x and y coordinates in UTM, plus timestamps) for all members of each group. Named as "N11_ - or "N25_subset_[variable]", where [variable] is x, y, or timestamp data for all individuals in group of size N (e.g., <strong>N25_subset_xs</strong> contains all used x axis positions for the group of 25 individuals). <em>For any questions regarding larger dataset from which these random points were derived, please contact the authors.</em> <br> <strong>Code is as follows:</strong> Rscripts are named in corresponding fashion to the figure in the final manuscript that they produce. <br> <strong>Figure2.R</strong>--Uses data from field tests of GPS accuracy to produce plots of error and temporal syncrony according to habitat type. <br> <strong>Figure3.R</strong>--Uses data from field tests of GPS accuracy to produce plots of error according to temporal sampling regime (i.e. length of time between bursts of samples). <br> <strong>Figure3.S1.R</strong>--Uses data from field tests of GPS accuracy to produce plots of error according to temporal sampling regime (i.e. length of time between bursts of samples). It also test the relationship between on-tag estimates of accuracy and tag error. <br> <strong>Figure4.R</strong>--Uses data from field tests of GPS accuracy to produce plots showing how GPS measures of dyadic distances between tags are consistently over-estimated, and further how these estimates are affected by habitat <br> <strong>Figure5.R</strong>--Uses vulturine guineafowl data to perform temporal subsetting (simulating different configurations of GPS sampling, e.g. large bursts of sampling in a short period vs. small bursts over larger times), and generate social networks. Plots results in terms of how well subsamples recapitulate 'true' observed network. <br> <strong>Fig_7.8_empirical_sizes.R</strong>--Uses vulturine guineafowl data to perform sub-setting and measurement extraction for 4 key social measures used in study. Further performs a simulation which mirrors the empirical data for each group size/ set of timestamps. Produces outputs in terms of raw results and summary medians. <br> <strong>Figure_7.8_simulated_sizes.R</strong>-- Performs pure simulation (i.e., not informed by empirical data) for group sizes 10-300 and produces outputs in terms of summary medians. General structure similar to empirical data outputs, but with simulated points drawn from uniform distribution between 0-1. <strong>Figure_7.8_plotting.R</strong> :code for visualizing the results in Figure 7 &amp; 8 in the main texts <br> <strong>PLOT_EMP_SIM.R</strong> : function used in "Figure_7.8_plotting.R" for visualizing the results from both the empirical and simulated data <br> <strong>PLOT_SIM_CURVES.R :</strong> Function used in "Figure_7.8_plotting.R" for visualizing the results from the purely simulated data <br> <strong>METRIC_SUBSETTING.R</strong> : Function used to subset the behavioural metrics for results from both the empirical and simulated data <br> <strong>SUMMARIZE_SIM_DATA.R :</strong> Function used to obtain the summary statics of subsets for results from both the empirical and simulated data <br> <strong>FigureS2.S4.R</strong>--Simulations demonstrating the effects of tag error on the estimates of inter-tag distance. This includes how the overestimate in inter-tag distance is affected by tag error and the true distance between tags. <strong>FigureS3.R</strong>--Uses the same data as Figure 4, but randomising the timestamps to break the spatiotemporal correlations in tag errors. <br> <strong>FigureS5.R</strong> : simulation and visualization code for section 5 in supplementary materials <strong>FigureS6.R</strong> : simulation and visualization code for section 7 in supplementary materials <br> <strong>Output objects are as follows:</strong> <br> Outputs of code and results for He et al 2022. Generally, outputs are in the form of figure pdfs. Exceptions include the outputs of scripts for figures 7 and 8, which are as follows: <br> <strong>Total_errors_100.Rdata: </strong>Error values generated by sumsampling composition of vulturine guineafowl groups (N=11 and 25). <br> <strong>All_sim_errors.Rdata: </strong>Error values generated by simulating groups which correspond to guineafowl groups in size and spatial distribution (N=11 and 25).<br> <br> <strong>Simulation_outs.Rdata: </strong>Error values generated from purely-simulated groups of size 10-300, not scaled to spatial units of empirical data. <br> See scripts for source of outputs.<code><strong><br> </strong></code>