DOI: 10.5061/dryad.qfttdz0q8
title: Does habitat or climate change drive species range shifts?

description: A primary prediction of climate change ecology is that species will track
 their climate niche poleward and upslope. However, studies have shown
 species responding in surprising ways. In this study, we aim to understand
 the impact of global change on species ranges by considering both climate
 and habitat changes. Using occupancy analysis of acoustic survey data in
 the mountains of the northeastern United States, we tested specific
 predictions of range responses to warming (shifting upslope),
 precipitation change (shifting downslope), and forest composition change
 (shifting downslope). We found that American red squirrels (Tamiasciurus
 hudsonicus), key nodes in northern North American food webs, are not
 tracking increasing temperatures upslope, despite substantial warming in
 recent decades. Structural equation modeling indicates that red squirrel
 abundance is primarily influenced by red-spruce forest cover, which has
 shifted downslope with recovery from historical logging and acid
 deposition. Accounting for the multiple dimensions of global change will
 enable better predictions and more effective conservation strategies.
description: # Does habitat of climate change drive species range shifts? ## BUGS model
 **DynamicOcc_Ecotone_Mast_alt.txt** - .txt file that specifies the
 occupancy model in BUGS language run in JAGS via the jagsUI package. ## R
 script to execute model **Occupancy_HPC.r** - .R script to execute the
 occupancy model. ## Occupancy data **win.data.elev_April2020.rds** - .rds
 file containing all associated data to run the occupancy model. ###
 Description of data **occ**: A three dimensional array [sites, replicates,
 years] with binary occurrence data of American red squirrels **date**:
 ordinal day of the year **nsites**: number of survey locations **nyears**:
 number of years in survey **nreps**: number of replicates per year per
 site **yrs_sampled**: vector indicating the first and last year a site was
 surveyed **Elev**: centered elevation of the survey site **Elev2**:
 centered elevation^2 of the survey site **Latitude**: centered latitude of
 the survey site **Ecotone**: centered distance from center of ecotone
 **SurveyProj**: vector indicating the survey project because survey
 methods differ slightly between projects **HardinessZone**: (Not used) can
 be disregarded **beech**: centered probability of American beech mast
 **meanBeach**: mean probability of masting **balsam**: centered
 probability of Balsam Fir mast **AIBarray**: (Not used) can be disregarded
 **AIBlength**: (Not used) can be disregarded **AIBeco**: (Not used) can be
 disregarded ### Structure of occupancy data \## List of 18 \## $ occ : num
 [1:2930, 1:9, 1:27] NA NA NA NA NA NA NA NA NA NA ... \## ..- attr(*,
 "dimnames")=List of 3 \## $ date : num [1:2930, 1:9, 1:27] 167
 167 167 167 167 ... \## $ nsites : int 2930 \## $ nyears : int 27 \## $
 nreps : num [1:2963] 9 9 9 9 9 9 9 9 9 9 ... \## $ yrs_sampled : num
 [1:2930, 1:2] 8 8 8 8 8 8 8 8 8 8 ... \## $ Elev : num [1:2930] -0.936
 -0.936 -0.936 0 -0.77 ... \## $ Elev2 : num [1:2930] -1.085 -1.085 -1.085
 0 -0.957 ... \## $ Latitude : num [1:2930] -0.136 -0.134 -0.132 0 -0.129
 ... \## $ Ecotone : num [1:2930] -1.106 -1.071 -0.88 0 -0.674 ... \## $
 SurveyProj : num [1:2930] 1 1 1 1 1 1 1 1 1 1 ... \## $ HardinessZone:
 Factor w/ 2930 levels "DD_ADAM01","DD_ADAM02",..: 180
 290 377 483 495 506 517 528 539 181 ... \## $ beech : num [1:2930, 1:31]
 1.66 1.66 1.59 0 1.59 ... \## ..- attr(*, "dimnames")=List of 2
 \## $ meanBeech : num 0.358 \## $ balsam : num [1:2930, 1:31] 1.48 1.48
 1.44 0 1.44 ... \## ..- attr(*, "dimnames")=List of 2 \## $
 AIBarray : int [1:1809, 1:3] 1 2 3 5 6 7 8 9 10 11 ... \## $ AIBlength :
 num [1:3] 875 197 1809 \## $ AIBeco : num [1:2930] 1 1 1 NA 1 1 1 1 1 1
 ... ## Plot Attribute Data **PlotAttributes.csv** - .csv file containing
 associated data for each of the survey locations. ### Description of data
 **location**: Name of the survey site **latitude**: Latitude of the survey
 location in WGS84 **longitude**: Longitude of the survey location in WGS84
 **Elevation**: Elevation of the survey location in meters
 **HardinessZone**: (Not used) can be disregarded **SurveyProject**: Vector
 of integers identifying which survey locations are conducted under the
 same project **DistFromCenterEco**: Distance from the center of the
 ecotone between Montane Spruce-Fir Forest and Northern Hardwood Forest -
 negative values represent sites below the ecotone while positive values
 indicate sites above the center fo the ecotone NA- Not applicable ###
 Structure of the dat \## 'data.frame': 2985 obs. of 7 variables:
 \## $ location : chr "HBEF_1" "HBEF_2"
 "HBEF_3" "HBEF_4" ... \## $ latitude : num 43.9 43.9
 43.9 NA 43.9 ... \## $ longitude : num -71.7 -71.7 -71.7 NA -71.7 ... \##
 $ Elevation : int 516 516 516 NA 565 565 565 565 565 692 ... \## $
 HardinessZone : int 9 9 9 NA 9 9 9 9 9 9 ... \## $ SurveyProject : int 1 1
 1 1 1 1 1 1 1 1 ... \## $ DistFromCenterEco: num -324 -312 -248 NA -178
 ... ## Read the data into R occuData &lt;-
 readRDS("win.data.elev_April2020.rds") PlotAttributes &lt;-
 read.csv("PlotAttributes.csv")