DOI: 10.5061/dryad.1g1jwsv3c
title: Habitat structural complexity predicts cognitive performance and behavior in western mosquitofish

description: Urbanization and stream order alter freshwater habitat complexity (defined
 as the degree of variation in physical habitat structure). More complex
 habitats have more variation in habitat structure. Habitat complexity
 affects species composition and shapes animal ecology, behavior, and
 cognition. We used a delayed detour test to measure whether motor
 self-regulation and behavior of Western mosquitofish, Gambusia affinis,
 varied with habitat structural complexity that was quantified for nine
 populations. We predicted that motor self-regulation, motivation, and
 risk-taking behavior would increase with increasing habitat complexity,
 yet we found the opposite relationship. Lower complexity habitats offer
 less refuge which could increase predation pressure and select for greater
 risk-taking by fish with greater motor self-regulation. Our findings
 provide insight into how habitat complexity is related to cognitive
 processes and behavioral outcomes, and provide an explanation for why some
 species have a higher tolerance for urbanized environments.
description: # Habitat structural complexity predicts cognitive performance and
 behavior in western mosquitofish
 [https://doi.org/10.5061/dryad.1g1jwsv3c](https://doi.org/10.5061/dryad.1g1jwsv3c) Female *Gambia affinis* from nine populations were tested in a delayed detour test to measure behavioral and cognitive differences across habitats representing gradients of varying structural complexity and urbanization. The data set includes the scores the fish received for exit time (time (s) to leave the starting chamber), motivation (time (s) for reach to reach barrier), and motor self-regulation (time (s) for fish to swim around barrier and reach social reward). We analyzed this data in R studio using Coxme proportional hazards test. We found that fish from low complexity habitats had faster exit times and faster motor self-regulation than fish from medium or high complexity environments. ## Description of the data and file structure Irwin_Biology_Letters_Data.csv - CSV file of data IRWINbiology_letters.R - R script used to perform analysis (uploaded to Zenodo) Column descriptions: Population - the name of the population associated with each collection site Date - the actual date the fish was tested SL (MM)- standard length in millimeters of each fish \#fish - Fish identification number Day - the day the fish was tested in our range of all testing dates Exit (s)- the number of seconds until the fish left the starting chamber Reachbarrier (s)- the number of seconds it took the fish to touch the barrier after exiting the starting chamber Aroundbarrier (s)- the number of seconds it took the fish to swim around the barrier after reaching the barrier Reach female (s)- the number of seconds it took the fish to reach the social reward after swimming around the barrier Total task(s)- sum of Exit (s)+ Reachbarrier (s)+ Aroundbarrier (s) + Reach female (s) Solutionspeed (s)- sum of Reachbarrier (s)+ Aroundbarrier (s) + Reach female (s) Exitornot 1- a censor for fish that did not exit. Fish that exited the starting chamber received a 1, fish that did not exit received a 0 CENSOR- a censor for fish that exited but did not solve the test. Fish that solved the test received a 1, fish that did not solve received a 0 H- a score for shannon diversity index associated with each collection site Complexity- categorical measure of habitat structural complexity. Habitats were characterized as low, medium, or high complexity based on the Complexnorm score Complexnorm- a numerical value quantifying normalized habitat complexity of each collection site %Dev- the percent of impervious cover of the sub watershed associated with each collection site Latitude- Latitude of collection site Longitude- Longitude of collection site ## Sharing/Access information If you would like help accessing data please contact Kyndal Irwin at [kbi4@txstate.edu](mailto:kbi4@txstate.edu) ## Code/Software We used a Coxme proportional hazards test in R studio (coxme) package to analyze potential differences in exit time (s), motivation (s), and motor self-regulation (s).