Population dynamics are often correlated in space and time due to correlations in environmental drivers as well as synchrony induced by individual dispersal. Many statistical analyses of populations ignore potential autocorrelations and assume that survey methods (distance and time between samples) eliminate these correlations, allowing samples to be treated independently. If these assumptions are incorrect, results and therefore inference may be biased and uncertainty underestimated. We developed a novel statistical method to account for spatiotemporal correlations within dendritic stream networks, while accounting for imperfect detection in the surveys. Through simulations, we found this model decreased predictive error relative to standard statistical methods when data were spatially correlated based on stream distance and performed similarly when data were not correlated. We found that increasing the number of years surveyed substantially improved the model accuracy when estimating spatial and temporal correlation coefficients, especially from 10 to 15 yr. Increasing the number of survey sites within the network improved the performance of the nonspatial model but only marginally improved the density estimates in the spatiotemporal model. We applied this model to brook trout data from the West Susquehanna Watershed in Pennsylvania collected over 34 yr from 1981 to 2014. We found the model including temporal and spatiotemporal autocorrelation best described young of the year (

Ecologists are concerned with understanding the abundance and distribution of organisms in space and time, as well as the biological processes and interactions that cause these patterns. Surveys are frequently employed to estimate spatiotemporal variation in abundance, with the goal of inferring biological process. However, most statistical methods used in ecology have not explicitly accounted for spatial correlation in the data beyond including covariates that are themselves spatially autocorrelated and random effects related to study design (e.g., ANOVA, GLM, linear and generalized linear mixed models; Hocking et al. , Peterman and Semlitsch , DeWeber and Wagner ). Therefore to use these regression methods, researchers must design their studies to ensure that sample points are spaced such that statistical residuals are not correlated. It is difficult to know a priori how close is too close. Any residual autocorrelation violates regression model assumptions and leads to biased results and potentially incorrect inference regarding population distributions and environmental relationships (Dormann et al. ). Additionally, information about the spatial and temporal patterns provides potentially interesting ecological insights that would not be gained if the data were collected in a way to avoid autocorrelation. For these reasons, a large field of spatial statistics has been developed and applied to ecological problems (e.g., Ross et al. , Thorson et al. , Conn et al. ).

Streams in a network are likely to have significant correlation in time and space because of regional weather and the hydrologic connections allowing movements and gradients of chemical and physical properties. For example, stream flow and temperature are predictably correlated along the network and it is important to account for this correlation when modeling these systems (Caissie , Ver Hoef et al. , Peterson et al. ). Similarly, organisms living in streams are likely to respond to these underlying conditions and their movements are often restricted to the dendritic network creating spatial correlation in the abundance and distribution of stream organisms (Grant et al. , Peterson et al. , Isaak et al. ). Spatial models that use Euclidean distance are likely to perform poorly in stream networks because streams in close overland proximity can be completely unconnected or have large hydrologic distances (Ver Hoef et al. ). A variety of statistical models have been developed to account for spatial correlations in dendritic networks. These include, but are not limited to, deriving valid covariance relationships for linear models (Peterson et al. ) and linear mixed models with moving averages that account for hydrologic distance and flow (Ver Hoef et al. ). Some models also include “tail‐up,” “tail‐down,” or “two‐tail” correlations to account for directional autocorrelation (Peterson and Ver Hoef , Ver Hoef and Peterson ). Additionally, block Kriging has been used for spatial averaging (Isaak et al. ) and splines accounting for network topology and confluence points have been used effectively to model nonlinear trends in stream networks (Donnell et al. ).

While these models provide improved inference for many types of data, there are limitations with the current approaches. Current models account for spatial correlations but do not allow for changing spatial correlations over time as with spatiotemporal models (Peterson et al. ). A second limitation is the inability to distinguish between process and observation error to account for imperfect detection (Peterson et al. ). When performing count surveys of organisms, the probability of detecting each individual in the population is often <1 (imperfect). This results in a problem of inference regarding the populations and environmental effects on the population, particularly when the probability of detection is variable in time and space. To address this issue, a variety of hierarchical models have been developed separating information regarding abundance and detection (e.g., Royle , Royle and Dorazio , Dail and Madsen , Zipkin et al. ). However, these models frequently do not account for spatial correlation among sites explicitly (although exceptions exist; Royle and Wikle ). Those that do account for spatial autocorrelation often use random group effects assuming clustered sites to be more similar to each other than to other clusters (Hocking et al. , DeWeber and Wagner ). This coarse grouping does not allow for autocorrelation as a function of distance. For example, if sampling is done in a series of transects, all sites within a transect are treated the same (Hocking et al. , Peterman and Semlitsch , Milanovich et al. ) even though it is likely that adjacent sites are more correlated than distant sites at the opposite ends of the transect. A final limitation of current spatial stream models is the computational challenges with analyzing large networks due to estimating large covariance structures (Peterson et al. ).

We describe a novel and generalizable hierarchical model that includes spatiotemporal autocorrelation while accounting for imperfect detection. It also addresses unexplained random variation in abundance not explained by deterministic covariates of abundance (log‐normal overdispersion; Harrison ). We assessed the spatial component of this model with simulations varying the two parameters of the Ornstein‐Uhlenbeck (OU) process used to define the spatial relationships in the network. The OU process is a stochastic process that is similar to a continuous version of a discrete autoregressive (AR1) model with particular properties described in the *Ornstein‐Uhlenbeck process for spatial variation* section of the Materials and Methods. This makes it especially well‐suited for modeling spatial relationships with distance along a stream network. We also performed a simulation study to evaluate the effects of spatial and temporal replication on model performance. We then applied this model to brook trout (*Salvelinus fontinalis*) data from the West Susquehanna watershed within Pennsylvania, USA. These data were collected by the Pennsylvania Boat and Fish Commission and are similar to stream fish surveys conducted by state and federal agencies and other researchers throughout the United States. Brook trout were of particular interest as the only native trout in the eastern United States and are threatened by climate and land‐use change, overfishing, and exotic species (Hudy et al. ).

In the following, we assume that data arise from a sampling design where *N* sites are visited in each of *T* years (we use vector‐matrix notation throughout) and that the same site is never sampled twice in a given year. These *N* sites are embedded within a stream network where there is only one unique path from each site to every other site (i.e., the stream network is acyclic), and each sample is conducted by eliminating the possibility of movement out of the sampled area (i.e., by placing nets above and below a selected stream segment) and then repeatedly counting and removing all individuals that are observed. We use the term “triple‐pass depletion sampling” for this design, given that there are three removal samples conducted in each sampling occasion. Each removal sample has a lower expected count that the previous (because previous sampling has removed individuals), so this triple‐pass design allows the detection probability to be estimated from the slope of this decline among passes.

We then modeled intensity *t* and site *s* (numbers per 100‐m stream reach, that is, where distances are measured along a one‐dimensional stream reach) from count data following a Poisson distribution as a log‐linked generalized linear mixed model with components representing the effect of measured habitat variables, as well as otherwise unexplained spatial, temporal, spatiotemporal, and independent variation. Although some measured independent variables [*s* in a given year *t*. We therefore specify **γ** is the estimated impact of these variables on log‐density (fixed‐effect regression coefficients). Additional descriptions of all model parameters are found in Table .

See *Materials and Methods* for relevant equations and detailed descriptions.

To account for imperfect detection while sampling, we modeled counts *d* (*s*), and year (*t*) assuming that each individual is equally likely to be captured in a given depletion pass. This assumption results in a Poisson distribution for the first pass _{i} is the offset for length of stream sampled by observation *i* (length of survey/100 m) so all densities are the abundance of fish per 100 m of stream length, and *p*_{i} is the probability that each individual in the vicinity of observation *i* will be captured (where this capture probability potentially varies among observations). Counts in the second and third passes are then dependent upon not being captured in the earlier passes

In the following, we include variation in detectability among sites and years: _{p} representing average log‐detection probability, and independent unexplained variation across sites and years, *i* relative to the average sample. Detectability parameters (μ_{p}, _{i}) are estimated simultaneously with parameters representing spatial and spatiotemporal variation in intensity λ(*s,t*). Refer to Table for summary descriptions of all model parameters. The detection formulation could easily be adjusted for repeated site visits rather than depletion sampling where that is the preferred sampling method.

Working within a dendritic stream network, Euclidean distances are unlikely to represent the spatial similarity of population dynamics. Therefore, we instead approximate the similarity between two sites (i.e., correlations in spatial variation

We also assume that changes in variables along the network are “memory‐less,” that is, the value of a variable **ɛ** defined at a set of points along a stream segment follows a first‐order Markov process where sites that are not connected by a child–parent relationship are statistically independent given a fixed value of **ɛ** at all other sites. This property arises from the assumption that the value of **ɛ** varies while moving along a stream network following a first‐order stochastic differential equation.

Given these two properties (that the stream network is acyclic and that spatial variation is a first‐order Markov process), we can calculate the conditional probability distribution for *s*_{parent} for that site *s*, and the distance *s* and its parent *s*_{parent}. This allows us to factor the joint probability of a spatial variable

We further assume that variation in **ɛ** arises from a mean‐reverting Weiner process with movement along the network. A Weiner process is a continuous stochastic process with independent increments often used to describe Brownian motion. Adding a mean‐reverting component results in an Ornstein‐Uhlenbeck process with the properties of being stationary, Gaussian, and Markovian for the right‐hand side of Eq. , as we now describe in detail. This model is identical to the tail‐down exponential model from Ver Hoef and Peterson (), although defining it as we do allows for easy computation within standard computational software.

We used the Ornstein‐Uhlenbeck process to represent the spatial relationships along the network. The OU process implies that a child node will be correlated with its parent node as a function of distance following

The variance, *s* conditional on the value of its parent *s*_{parent} given an OU process is _{ɛ} is the exponential rate of decay in correlation between child and parent nodes with larger values represent less correlation,

Eqs. are specified such that the pointwise variance of

We include a temporal term *t* to represent years that are higher or lower than expected across all sites. We model vector **δ** (representing **R**_{δ} is the correlation matrix for a first‐order autocorrelation process *t* and *t**, separated by |*t* − *t**| years, and ρ_{δ} is an estimated parameter representing the correlation in **δ** for two adjacent years.

We similarly used the OU process to represent the spatiotemporal relationships along the network. We use the vector *t*, and it varies along the network as an OU process *s* given the vector *s*_{parent}

The parameter **R**_{υ} is the correlation due to temporal similarity, which we assume follows first‐order autocorrelation (Eq. but replacing ρ_{δ} with ρ_{st}, where ρ_{st} is an estimated parameter representing the temporal correlation between two adjacent years in spatiotemporal variation

We estimate parameters within a mixed‐effects model, while treating variation in detectability (**γ** is a fixed effect) and each multivariate normal distribution is valid (has a positive definite covariance). Therefore, log‐density is itself valid, as follows from the properties of an additive covariance function. Further research could formally decompose the proportion of variance in log‐density that is attributed to each additive component in Eq. , although we do not do so here. Future studies could also expand upon or modify the framework used here, although changes may not be identifiable (i.e., the Jacobian matrix of sufficient statistics for the data with respect to parameters might be rank‐deficient) or estimable (the Hessian matrix of the marginal log‐likelihood at the maximum likelihood estimator may not be positive definite). We recommend future analyses check estimability using automatic differentiation (as we have done here), and future theoretical work should examine identifiability in spatiotemporal models (e.g., following methods in Hunter and Caswell )

We conducted simulations to evaluate model performance. The first set of simulations was designed to test the ability to estimate spatial correlations and how well the model estimated abundance with varying levels of spatial autocorrelation compared with a nonspatial model. We included a single covariate on density that differed by location but was not spatially autocorrelated (**γ**^{T} = [2.3,0.5]; intercept, covariate coefficient). We used a mean density of 10 fish per 100 m (*x*_{1}(*s*) = ln(10)). Both models were identical except for the inclusion of the spatial variation component (

For the spatial model, we simulated data with all combinations of θ_{ɛ} in {0.5, 1, 2, 3} and σ_{ɛ} in {0.1, 0.25, 0.5, 0.75}. These values of θ_{ɛ} represent a large range in correlations such that when θ_{ɛ} = 0.1 then _{ɛ} = 3 then

We ran 200 simulations for each combination of θ_{ɛ} and σ_{ɛ} and fit each simulated data set with the spatial model described (single year with no temporal or spatiotemporal variation) and with a nonspatial model. We varied the spatial decorrelation per kilometer, θ_{ɛ}, and the asymptotic spatial variance, σ_{ɛ}, independently, but only examine the effects of the combined spatial component (θ_{ɛ}σ_{ɛ}) because θ_{ɛ} and σ_{ɛ} are not independently identifiable. We ran the simulation using the White River watershed in Vermont with 359 nodes because it was a reasonably sized network with sufficient distances and numbers of nodes to be diverse but not so large as to make simulation of the network correlations excessively long. Distances between child and parent nodes ranged from 0.17 to 5.13 km with a mean of 1.13 km. The R code for simulating the data is *available online*.

We also wanted to understand the effect of spatial and temporal replication on model performance. We simulated 300 independent data sets for the White River in Vermont over 20 yr for each of the 359 nodes. For each simulation, we randomly sampled the data to represent surveying various numbers of sites and years (all combinations of 4, 8, 10, 15, and 20 yr with 25, 50, 100, and 359 sites). For each survey combination and simulation, we fit the spatiotemporal model including spatial, temporal, and spatiotemporal dynamics (matching the data generating model) and a temporal model with no spatial or spatiotemporal dynamics. For each simulation, we used _{ɛ} = 0.5, ρ_{δ} = 0.6, σ_{t} = 0.2, σ_{υ} = 0.4, ρ_{st} = 0.7, detection probability *P* = 0.5, and density coefficients **γ**^{T} is the log‐mean intercept and the second value is the coefficient (slope) of a site‐level covariate. All R and TMB functions for these simulations can be found in the Data S1 supplemental materials with additional information in Metadata S1.

As the only trout native to eastern U.S. streams and rivers, brook trout are a species of social and economic importance in the region. State and federal agencies as well as organizations such as Trout Unlimited and the Eastern Brook Trout Joint Venture (EBTJV) have particular interest in supporting viable populations of brook trout. As such, there have been numerous recent modeling efforts to estimate occupancy, abundance, and population dynamics in response to landscape conditions, climate change, and management actions (DeWeber and Wagner , Kanno et al. , Letcher et al. , Bassar et al. ). However, these models generally do not account for spatial correlations beyond using random regional, watershed, or sub‐basin effects.

We identified the West Susquehanna, Pennsylvania watershed for our case study because it was a moderately large network with a high density of good quality stream fish data over a long‐time period. The electrofishing data were collected by the state of Pennsylvania Boat and Fish Commission using standard methods common across agencies and researchers throughout the eastern United States. We did not use the West Susquehanna watershed in our simulations because it is much larger than the White River network, with many more confluences, which would greatly slow the data simulation.

The West Susquehanna watershed contained 11,220 nodes, comprised of 349 survey sites and 10,871 stream reaches. Sites were surveyed a total of 34 yr from 1981 and 2014. There was a total of 683 site visits with a mean of 2.0 and a range of 1–21 visits per site. The total drainage area of the watershed was 18,068 km^{2} and the smallest stream had a cumulative drainage area of 0.4 km^{2}. The median drainage area was 4.4 km^{2}. The mean distance between nodes in the network was 1.37 km and ranged from 0.001 to 11.61 km with a median of 1.11 km.

The watershed was primarily forested (mean percent forest cover = 79%) but with a range from 0% to 100% within individual stream catchments. We used percent forest cover as a fixed‐effect covariate in our model along with surficial coarseness, mean air temperatures from the summer (previous year), fall (previous year), winter, and spring prior to summer fish surveys, and mean daily precipitation for the same seasons. Daily temperature and precipitation data were obtained from daymet (Thornton et al. , ) and spatially aggregated to the catchment scale. The surficial coarseness was the percentage of the catchment area covered by a parent soil material with texture described as sandy, gravelly, or a combination of the two. These classifications were obtained from the USDA National Resources Conservation Sciences Soil Survey Geographic Database (SSURGO; Soil Survey Staff ). Forest cover data were obtained from the 2011 National Land Cover Database (NLCD; Homer et al. ). All basin characteristics were calculated as spatial sums (precipitation) or means within each zonal catchment layer as delineated based on the truncated NHDHRDV2 flowlines. All details and ArcPython scripts are *available online*. The covariate summary statistics for the West Susquehanna watershed are presented in Table .

Susquehanna watershed was defined by catchment draining into each stream reach.

We used the National Hydrography Dataset high‐resolution flowlines truncated to >0.75 km^{2} drainage area for spatial consistency and exclusion of highly ephemeral streams (flowlines *available online*). Any survey locations or other points of interest were then snapped to the flowlines. All survey points and confluences, including the base of the network and the terminal headwaters, were considered network nodes. Except for the base node, the distance from each child node was calculated to its downstream parent node to define the network relationships and distances. All hydrography processing was done using ArcPython in ArcGIS v10.2 (Environmental Systems Research Institute, Redlands, California, USA). The full description of the process, scripts, and links to the hydrography data is archived *online*. The hydrography for the region from Maine to Virginia, USA, can be downloaded by hydrologic unit code 2 (*available online*). All continuous covariates were standardized by subtracting the mean and dividing by the standard deviation for computational efficiency. None of these variables had Pearson correlations >0.60.

For young of the year (YOY) and adult brook trout independently, we compared eight models with different combinations of spatial, temporal, and spatiotemporal correlations (2 × 2 × 2 factorial design; Table ). All other components of the model including fixed‐effect covariates were identical in all models. Meteorological conditions during the previous summer were used in the adult models but were excluded in the YOY models because spawning does not occur until the fall. We used Akaike's information criterion (AIC) to select the best model balancing model fit and model complexity (Burnham , Burnham et al. ).

Overall, we found that the spatial model had greater precision for estimates of covariate effects or population density than the nonspatial model. We found that the spatial model estimated the spatial component (θ_{ɛ}σ_{ɛ}) well when there was strong spatial correlation but tended to slightly underestimate the component when the spatial decorrelation was low (θ_{ɛ} large; Fig. ). The spatial model estimated the mean intensity (expected fish per 100 m) across the watershed much better than the nonspatial model when there was moderate to high spatial decorrelation rates (Fig. ) and the mean uncertainty (SE) of the estimated intensity was much larger for the nonspatial model compared with the spatial model when the spatial decorrelation was large (Fig. ). We used the difference between model predictions and true values to calculate the root‐mean‐squared error (RMSE) as an assessment of model predictive accuracy. The RMSE was far larger for the nonspatial model compared with the spatial model across all values of θ_{ɛ} (Fig. ), indicating that abundance estimates at individual locations were much more accurate for the spatial model. This difference in uncertainty was largest with high levels of spatial correlation. The fixed‐effect coefficient for the single covariate (**γ**^{T}) was estimated well across all values of θ_{ɛ}, but the variation in this estimate was slightly smaller for the spatial model, especially at higher levels of spatial correlation (Fig. ).

The range of σ_{ɛ} also significantly influenced the parameter estimates and the differences between spatial and nonspatial models. The spatial model recovered θ_{ɛ}σ_{ɛ} well with very slight underestimation on average, except when σ_{ɛ} was small (0.1), which resulted in good recovery on average but extremely high variation among simulations (Fig. ). The spatial and nonspatial models performed similarly in the estimation of mean intensity across the watershed when the true value of σ_{ɛ} was small but the spatial model was more accurate and more precise compared with the nonspatial model as the level of σ_{ɛ} increased (Fig. ). The uncertainty in mean network intensity went up for the nonspatial model as σ_{ɛ} increased but was constant for the spatial model across levels of σ_{ɛ} (Fig. ). The RMSE was again much smaller for the spatial model compared with the nonspatial model as σ_{ɛ} increased. The variability in the RMSE also increased greatly for the nonspatial model as σ_{ɛ} increased (Fig. ). The fixed‐effect coefficient was estimated well for both models but the uncertainty increased in the nonspatial model as σ_{ɛ} increased (Fig. ).

We found the mean network intensity was estimated fairly well for both the spatial and nonspatial models, but both models tended to slightly underestimate abundance slightly when few years were surveyed (Fig. ). The value of θ_{ɛ}σ_{ɛ} was underestimated with <15 yr of data while the estimates of θ_{υ}σ_{υ} were proportionally overestimated with <15 yr of data (Fig. ). This same pattern was observed with fewer than 100 sampled sites (Fig. ). Similarly, for both the spatial and nonspatial model, it took 15–20 yr to accurately recover the temporal autocorrelation, although it was still slightly underestimated by the spatial model. The variability in the temporal process was recovered well with the spatial model regardless of the number of years surveyed but the nonspatial model had more variation among simulations with increasing years surveyed (Fig. ). The value of the fixed‐effect covariate, γ, was estimated well for both models regardless of the number of years sites were sampled but the variation in the estimation was consistently lower for the spatial model (Fig. ).

The number of sites sampled similarly influenced the estimation of the spatial and spatiotemporal components, with an increasing number of sites improving the estimates, especially from 25 to 100 sites (Fig. ). The RMSE improved with an increasing number of sites sampled for the spatial model and was lower (more accurate) for the spatial model with 100 or more sites compared with the nonspatial model (Fig. ). The fixed‐effect coefficient was recovered well for both models although the estimate was biased low for the nonspatial model with only 25 sites. The precision in the fixed‐effect estimate improved with the number of sites sampled and was consistently better for the spatial model. Despite reasonable estimates of mean abundance and fixed effects in many simulations, the nonspatial model (Model 3 in Table ) generally did not sufficiently recover the heterogeneity and spatial pattern in density as seen in Fig. .

The top YOY model included temporal and spatiotemporal components. The null model was the worst and any model with a spatial or spatiotemporal component was ranked higher than the temporal‐only model (Table ). For adult brook trout, the spatiotemporal model and the temporal plus spatiotemporal model were the top two models with a ΔAIC of 0.3 (Table ). We chose to draw inference from the temporal plus spatiotemporal model for the easiest direct comparison with the YOY. The most complex model (containing temporal, spatial, and spatiotemporal components from Eq. ) failed to converge with the adult data and was excluded from model comparison.

The models (6 and 8) that included spatial and spatiotemporal components failed to converge with adult data and were not used in the comparison.

From the top models, we estimated the temporal and spatiotemporal model parameters along with the fixed effects, detection probabilities, and overdispersion terms. Adults exhibited strong temporal correlation per year (ρ_{δ} = 0.59) with low variability (σ_{t} = 0.16), whereas YOY exhibited no temporal correlation per year (ρ_{δ} = −0.05) but high stochastic temporal variability (σ_{t} = 0.76). The estimated values of the spatiotemporal decay θ_{υ} were at the lower end of what we tested with simulations for both YOY (0.13) and adults (0.16), indicating high spatiotemporal correlation (~50% at 5 km; Fig. ). The estimates of the spatiotemporal standard deviation σ_{υ} were high for YOY (0.65) and adults (0.59). The combination of the two parameters indicates extremely high spatiotemporal autocorrelation, which is revealed by the very high estimate of temporal decay ρ_{st} of 0.98 and 0.97 for YOY and adults, respectively (Table ). Forest cover, the previous year's mean summer temperature, spring temperature, and, to a lesser extent, the previous fall mean temperature were all important predictors of adult abundance. For YOY, only forest cover and mean spring temperature had substantial effects on abundance. Seasonal precipitation did not influence abundance for YOY or adults (Table ).

The YOY model did not include the previous summer temperature or precipitation since they were not yet laid as eggs. Parameters are defined in Table . The first 11 parameters were fixed effects on abundance contained in the vector of coefficients **γ**^{T}.

We developed a geostatistical model for estimating animal densities within dendritic networks while accounting for imperfect detection. Spatial simulations demonstrated improved estimates of animal densities even at relatively low levels of spatial correlations compared with traditional nonspatial models (Fig. ). Even when the spatial decay rate (θ_{ɛ}) was one (36% correlation at 1 km and virtually zero correlation at 10 km), the spatial model had significantly higher predictive accuracy of reach‐level density. There were no scenarios where the spatial model performed worse than the nonspatial model for estimating mean density.

Similarly, we demonstrated the benefits of our model over a large range of years and surveyed sites through simulation. The accuracy improved with increasing number of years that sites were surveyed (Fig. ; RMSE). However, there was a large improvement in recovery of the spatial and spatiotemporal components of the model given 15–20 yr of data. Although there is moderately high uncertainty in the estimation of the spatial and spatiotemporal components (in Fig. ), this is likely due in part to combining simulation replication uncertainty with variation among sites while holding the number of years constant. Similarly, the variation in recovery of the spatial and spatiotemporal components was likely inflated (in Fig. ) because of combining simulation uncertainty with variation in the number of years surveyed while only holding the number of sites constant. However, the spatial model showed clear improvement in recovery of the spatial correlation and accuracy of local density estimation (RMSE) with an increased number of surveyed sites. Based on these limited simulations, we recommend aiming for at least 15 yr of data for 100 sites (given spacing of sites similar to those considered here). However, further investigation is warranted to explore the effects of having a collection of sites that are visited at different intervals as is the case with many freshwater fisheries data sets. It is possible that only a subset of sites would have to be visited each year to adequately characterize the spatiotemporal dynamics. Although this may appear as a large number of sites and years, many state agencies already have these data from long interest in freshwater fisheries stock status. For some watersheds, multiple agencies and NGOs might have to pool data to have sufficient replication furthering the argument for regional cross‐boundary databases. When fewer years of data are available, the reduced spatial model without the temporal or spatiotemporal components can be run on each year of data with improved estimation in comparison with a traditional nonspatial model (Figs. , ).

The non‐spatiotemporal model was also good at recovering densities but did poorly at estimating temporal correlations and variability (Figs. , ). Given the large improvements of the spatial model compared with the nonspatial model in the single year simulation (Figs. , ), this may not be a general pattern and may depend on network topology and sampling density within the network and over time. Additionally, the nonspatial model will not be as useful for estimating local densities in unsampled stream reaches. Many management actions occur at small scales and therefore understanding local population dynamics is important for prioritizing local actions and understanding the effects of those actions, particularly in an adaptive management framework. Such a situation could occur for decisions that are repeated and adjusted based on population responses such as stocking programs or setting stream‐level fishing regulations (e.g., barbless hooks, catch and release, take limits). Even for one‐time decisions such as in‐stream habitat modification, and dam or culvert removal at a local site, it is important to have good estimates of local, rather than just watershed, abundance because the local change in abundance can help prioritize the location of the next project.

This spatiotemporal model can readily be applied to existing standard electrofishing data from state and federal agencies. Using this model with brook trout data collected the Pennsylvania Boat and Fish Commission, we demonstrated improved model fit compared with basic nonspatial models even accounting for increased model complexity (i.e., using AIC). For adult brook trout, the spatiotemporal model and the model with temporal and spatiotemporal components outperformed all other models (Table ). Similarly, the temporal plus spatiotemporal model performed best with the YOY data (Table ). In addition to evidence from model comparisons, the estimated coefficient values for brook trout data fell within our range of simulations indicating that the estimates are reliable. Removing spatial or temporal covariates could change which model was selected based on AIC. It would also change the estimate of the spatial and spatiotemporal correlations because they can be interpreted as the latent correlations not explained by the fixed effects resulting from unmeasured, complex, biotic and abiotic interactions exhibiting spatial autocorrelation.

Both YOY and adult densities were positively associated with forest cover and negatively associated with spring temperatures (Table ). This finding is similar to brook trout model results from a rangewide occupancy model (Wagner et al. ). A recent review of salmonid fish response to environmental drivers (Kovach et al. ) also found negative effects of increased seasonal temperature on trout populations, supporting our estimate of a strong negative summer temperature effect. Similar results were also found for an Adirondack lake (Robinson et al. ), streams in West Virginia (Huntsman and Petty ) and Michigan (Grossman et al. ), and from demographic models for brook trout in Shenandoah National Park (SNP; Kanno et al. , ). We also found that temperature had a larger effect on YOY than on adults. Similarly, Bassar et al. () found that population dynamics in a small stream system were largely driven by the effects of yearly temperature variation on YOY.

We estimated only weak relationships between seasonal precipitation and trout density. This is in stark contrast to the strongly negative effects of winter precipitation found in SNP (Kanno et al. , ). Topographical and geological differences may help explain the divergent effects of precipitation estimated for the two study areas. Trout habitat in SNP is high elevation and high gradient while the sites we studied are more variable in elevation, aspect, and gradient potentially obscuring precipitation effects. It is likely that precipitation will have a much greater effect on trout populations in high gradient, nonporous sites. It is also likely that we underestimated the importance of precipitation in general because we estimated effects of seasonal precipitation means over an area without large spatial variability in precipitation patterns. Floods can have dramatic effects on salmonids, including year class loss (Letcher and Terrick , Carline and Mccullough ) and, in extreme cases, local extirpation (Vincenzi et al. ). Recolonization ability, habitat complexity, and high fecundity, however, all contribute to high resilience of brook trout populations to floods (Nislow et al. , Roghair et al. , George et al. ). It is possible that this model could be used to assess the spatial and spatiotemporal decay rates related to the effects of major flood events such as hurricanes in the future. This could be important as flood frequency and severity is expected to increase with climate change in some parts of the world (Hirabayashi et al. ).

Adult brook trout exhibited higher temporal correlation and less unexplained random variation (overdispersion SD; Table 6) in density compared with YOY. This supports previous findings of high YOY variability due to temperature and flow conditions along with other stochastic events (Carlson and Letcher , Xu et al. , Kanno et al. , ). Both adults and YOY densities exhibited similar levels of spatiotemporal correlation with relatively slow decorrelation with distance as evidenced by the low spatiotemporal decay rates (θ_{υ} = 0.16, and 0.13, respectively) and high asymptotic spatiotemporal variances (Table 6). The effect of these parameters can be seen in Fig. , which shows correlation with distance. For example, correlation is approximately 50% at 5 km and 25% at 10 km for YOY. Adult correlations are only slightly lower than for YOY with hydrologic distance. There is virtually no autocorrelation in densities of YOY or adults at distances beyond 20 km. This suggests that these populations are generally operating independently (minimal density‐dependent reshuffling through movement) and that landscape, land‐use, and meteorological variables are sufficient to describe any long‐distance correlations in brook trout population dynamics. Our model can also be used to predict densities at unsampled sites to aid natural resource managers in making decisions at locations when there is insufficient time to collect local data prior to when an impact or management action will occur.

This is unsurprising given the general short movements and high genetic differentiation of brook trout over relatively short distances (Whiteley et al. ). This exceedingly high spatiotemporal correlation per year indicates a slow rate of change in the spatial patterning (i.e., high densities sites tended to maintain relatively high densities, indicating some temporal stability in local habitat quality or preference). The limited brook trout dispersal in headwater streams and the fine‐scale variation in habitat quality combine to create pockets of high abundances. For example, stream temperatures can vary dramatically at very small spatial scales due to local ground water input (Snyder et al. ) and topography and wood in streams can create small pools (Bisson et al. ). Both cool water reaches in the summer and pools generally create high‐quality habitat for brook trout.

In summary, we demonstrated good recovery of spatial and temporal components and good accuracy in estimating local fish densities across a stream network. Our model can be used to improve precision when estimating local densities in a network compared with traditional nonspatial models while providing additional information about the spatiotemporal population dynamics of these organisms. Given that the spatial model always performed as well or better than the nonspatial model, we recommend our approach for analysis of data even when there is previous indication of slight spatial correlations

We thank E. Childress for discussions related to the use of data and inference from the models, and J. Ver Hoef, J. Hastie, M. McClure, and two anonymous reviewers for comments that improved the manuscript. D. Hocking was partially supported by a USGS Mendenhall Fellowship and funding through the DOI Northeast Climate Science Center aided this project. B. Letcher, D. Hocking, and J. Thorson conceived of the concept and J. Thorson developed the statistical framework. K. O'Neil conducted the stream network and GIS analysis. D. Hocking and J. Thorson conducted the simulations and statistical analyses. All authors contributed to writing and editing of the manuscript and approved of the final version.

GIS and stream network data were archived and publicly available with supporting information with the Spatial Hydro‐Ecological Decision System (SHEDS) at