DOI: 10.5061/dryad.70rxwdc04
title: Spatially explicit habitat selection: testing contagion and the ideal free distribution with culex mosquitoes

description: Since its inception, attempts have been made to improve Ideal Free
 Distribution (IFD) Theory in order make it better fit real-world data.
 Spatial contagion is a newer ecological concept that suggests the
 perceived quality of a patch can be affected by the quality of its
 neighbor patches. Here, we present a series of experiments testing for
 potential contagion effects, examining how contagion can interact with the
 IFD, and determining whether spatial context affects assessment of habitat
 quality. First, we tested whether the presence of conspecific competitors
 negatively impacts oviposition habitat selection by female mosquitoes
 (Culex restuans). We then used a more complex spatial landscape to
 determine whether competition can create a spatial contagion effect.
 Finally, we examined whether the density of conspecifics can adjust the
 contagion effect of nutrient availability. We found that while females
 avoided patches containing conspecifics, there was no effect of
 competition/density on neighboring patches. Additionally, we found that
 resource availability was a significant predictor of where egg rafts were
 laid, but resource availability did not have a contagion effect. These
 results provide further support for the utility of the IFD, as individuals
 were able to accurately assess patch-level habitat quality. 
description: This data was collected via on the ground field work. This was a
 mesocosm experiment, wherein researchers set up pools in the field and
 allowed them to be colonized. Once pools were set up, we checked them
 daily for mosquito egg rafts, recorded the number in each pool, and then
 removed them from the pools.
description: See ReadMe file.
description: Citation: Scott, R.C. & Resetarits Jr., W.J.. 2022."Spatially
 explicit habitat selection: Testing contagion and the ideal free
 distribution with Culex mosquitoes." The American Naturalist Authors:
 Reed C. Scott: William J. Resetarits Jr.:
 Responsibility for collecting data and
 writing code goes to R.C. Scott Directory: **P1S1_Master.csv** = data
 collected + analyzed for experiment 1. Consists of the following
 variables: Array: randomized block that Pool was in Pool: ID of pool
 within array PoolID: ID of pool within experiment. Uses Array # and Pool #
 Density: Predictor Variable. Amount of C. restuans larvae added to pool
 Day: Number of days after array was set up that data was collected. Rafts:
 Response Variable. Number of c. restuans egg rafts collected. Date: Date
 on which data was collected. **RawData.csv** = Data for experiment 2
 Block: Randomized block. Refers to grouping of pools within experiment for
 statistical purposes Locality: Within each block, pools were assigned to
 groups called localities. Each locality consisted of 3 pools in different
 combinations of Control and Comptetition Pool: Pool Number within the
 assigned locality (a number from 1 to 3) PoolID: A unique ID assigned to
 each pool based on its block, locality, and pool number PoolType: Refers
 to whether were larvae free ("Control") or contained C. restuans
 larve ("Competition") Locality Type: The combinations of pools
 within a locality determined its type. Localities were assigned the label
 CCC, CCL, CLL, or CCC, where C = Control and L = Larvae (or competition,
 as is used in the PoolType column) Pool.Locality: A combination of pool
 type and locality type. Used for contrast purposes. For each record input
 can be read as "PoolType.LocalityType". For example, in the
 first row pool 11.1 is a "Control" pool in the "CCL"
 locality and thus has a Pool.Locality value of "Control.CCL".
 Day: = days after intial setup that data was collected. Rafts = Response
 Variable. Number of c. restuans egg rafts collected. **DMC.master.csv** =
 Data for experiment 3 Block: Randomized block. Refers to grouping of pools
 within experiment for statistical purposes Plot: For each block there were
 2 "plots" of the experimental design: one with larvae and one
 without. Plot here is a number assignment (1 or 2) for denoting the 2
 plots within a block. Locality: Each plot consisted of 3 localites.
 Locality here is a numeric assignment (1,2, or 3) denoting the 3
 localities within a plot Pool: Pool Number within the assigned locality (1
 or 2) LL: Leaf litter. Refers to the amount of leaf litter (0.1 or 0.5 kg)
 added to each pool. PoolType: Pools were assigned a H (High resource, 0.5
 kg. leaf litter) or L (Low resource, 0.1 kg. leaf litter) LocalType: The
 combinations of pools within a locality determined its type. Each locality
 consisted of 2 pools. Localities were assigned the label H, M, or L, where
 H = High Resource (Both pools were H), M = Mixed (one pool was H one was
 L), or L = Low Resource (Both for L) LarvaePlot: Were Larvae added to high
 resource pools in the plot this pool was in? Values were either Y(yes) or
 N(no). LarvaeLocal: Were Larvae added to pools in the locality this pool
 was in? Values were either Y(yes) or N(no). LarvaePool: Were Larvae added
 to this pool? Values were either Y(yes) or N(no). Pool.Local.Comp: A
 combination of pool type, locality type, and plot type. Used for contrast
 purposes. For each record input can be read as
 "PoolType.LocalityType.PlotType". So for the first row, it was a
 H pool, in a H Locality, in a Y plot, so can be read as "HHY".
 Prop: Proportion of egg rafts that a pool received out of all egg rafts
 deposited within that pool's locality Sum: Total number of eggs
 collected from that pool. Day 1 -Day 7 (Columns O-U). Number of egg rafts
 collected on that day (day = days after intial setup that data was
 collected). P1S1.R = analysis for experiment 1. First read in libraries
 and data. Then aggregate data and construct a linear mixed effects model.
 Model is tested using dunnett's procedure. Then graph.
 **ComContagion2021.v2.r** = analysis for experiment 2. First read in
 libraries and data. Then aggregate data. Data is then filtered to show
 only the first 5 days of data collection. First analysis is patch level,
 which consists of a simple T-test between "Control" and
 "Competition" pools. Then graph results. Next is analysis to
 test contagion effects. Data is filtered to include only Control pools,
 and to exclude the LLL locality. Then construct and LMER with rafts as
 response variable and localitytype as predictor with block as a random
 factor. View results and graph. Repeat this process for competition (or
 "Larval") pools. For locality level analysis, construct and LMER
 with the log transformed sum of rafts (per locality) as the response and
 locality type as the predictor with block as a random factor. View
 results, with Tukey Test. Then graph. Final graph: a comparison of the the
 observed vs. expected number of egg rafts in the CCL and CLL localities. \
 **DMCContrasts.R** = analysis for experiment 3. After libraries and data
 are read in, the first step is to adjust the data. the predictor variable
 Pool.Local.Comp is transformed to a factor, and the Sum response variable
 is log transformed. Then use the predictor and response to create a linear
 mixed effect model with block as a random variable. Once the lmer is
 constructed, then establish contrasts using rbing (lines 39-45). Finally,
 test the model using DMCContrasts to test multiple comparisons.
 Additionaly comparision is added on in lines 50-53 as a post-hoc test.
 After this begin graphing. Graphs comparing the 8 pool types used the same
 schematic, only differing in the shading of pool types to display
 comparisons. At line 174 locality level comparisons begin. Construct a
 lmer then do a Tukey's test. Finally, graph. Code: All analysis for
 this set of experiments used R version 4.1.2 (2021-11-01). OS: Windows 10
 x64 (build 19043)