**By: Erin Peterson, Research Scientist, CSIRO Division of Mathematics, Informatics & Statistics**

** Jay Ver Hoef, Research Statistician, NOAA National Marine Mammal Laboratory**

**Spatial Autocorrelation in Streams and Rivers:** Tobler’s first law of geography states that, ‘‘Everything is related to everything else, but near things are more related than distant things.’’ In the field of spatial statistics, this phenomenon is referred to as spatial autocorrelation. Spatial statistical models tend to make more accurate predictions when data are spatially correlated. However, in rivers and streams there’s an extra complication because both Euclidean and in-stream distances can be used to describe patterns of spatial autocorrelation. For example, some variables like water temperature are physically connected by flow; while others, such as land use or rainfall, may be similar in neighboring locations – even when they don’t share flow. Statistical modelers often assume spatial independence, but in highly connected systems like streams this may not be a valid modeling assumption – even when working with sparse data locations that are not connected by stream flow. Statisticians have developed sophisticated spatial statistical stream-network models that account for 1) spatial autocorrelation using both Euclidean and in-stream distance, 2) the branching structure of the network, and 3) directional flow. Now, we’ve provided software to help users integrate the geospatial processing undertaken in GIS with the statistical analyses: the **STARS** ArcGIS custom toolset and the **SSN** package for **R** Statistical software.

**STARS: ArcGIS Custom Toolset**

The purpose of the **Spatial Tools for the Analysis of River Systems **(**STARS**) toolset is to generate and format the spatial information needed to fit spatial statistical models. It is used in conjunction with the **Functional Linkage of Waterbasins and Streams** (**FLoWS**) geoprocessing toolbox (see freebies below) for ArcGIS v 9.3.

**STARS** takes advantage of the **FLoWS**-based hydrologic modeling framework to calculate 1) the distance upstream from the network outlet to each location; 2) information used to weight converging stream segments based on ecological relevance (e.g., flow or watershed area); and 3) the predictors for all sites. **STARS** contains eight tools that are used to transform GIS data into an **SSN** object, which contains all of the spatial, topological, and attribute information needed to fit a spatial statistical model to stream data in the **SSN** package. The **STARS** toolset is currently available for ArcGIS version 9.3, but will be updated later this year to be compatible with the most recent version of ArcGIS.

**SSN: An R Package**

Once the spatial data have been formatted using **STARS**, the **SSN** package allows users to

1) import and store their spatial data in R;

2) efficiently calculate pair-wise distances and spatial weights between all observed and prediction sites (flow-direction is preserved);

3) perform exploratory data analysis,

4) fit models that account for spatial autocorrelation using Euclidean and in-stream relationships;

5) use model selection and model diagnostics,

6) make predictions with estimates of uncertainty; and

7) create artificial networks and simulate data.

A suite of options have also been included, such as models for continuous, count, and presence/absence, repeated measurements at a site, and random effects.

**How are these models being used to inform management?**

For example, **STARS** and **SSN** are currently being used to generate regional stream temperature models for the Interior Columbia River Basin (ICRB), U.S.A. as part of the NorWeST Stream Temperature project. The model is being used to predict temperatures throughout all fish-bearing streams in the ICRB under historic and future climate scenarios. Model outputs are linked to the USGS NHDPlus 1:100,000-scale stream layer. Maps of stream temperature will be filtered by species-specific thermal criteria to delineate a range of habitat conditions, with potential changes in these habitats summarized under different climate scenarios.

**Tutorials, Vignettes, and Example Datasets**

http://www.fs.fed.us/rm/boise/AWAE/projects/SpatialStreamNetworks.shtml

**Downloads**

SSN & STARS:http://www.fs.fed.us/rm/boise/AWAE/projects/SSN_STARS/software_data.html

FLoWS:http://www.fs.fed.us/rm/boise/AWAE/projects/SSN_STARS/other_software.html

R: statistical software http://cran.r-project.org/

## Article Discussion: