## Introduction

A fundamental challenge in ecology is to understand the determinants of community composition. Traditionally, ecologists relied on environmental niches to explain community variation (e.g. Hutchinson 1957), but the role of spatial dynamics, such as dispersal differences amongst species, has increasingly been recognized (e.g. MacArthur & Wilson 1967; Hanski 1991). More recently, neutral models of biodiversity have abandoned the role of niches altogether, instead emphasizing the ability of dispersal limitation alone to produce realistic spatial distributions of competitively equivalent species (Hubbell 2001; Chave & Leigh 2002). Parallel to these theoretical advances, statistical tests have been designed to determine the relative importance of environmental heterogeneity and dispersal limitation in structuring communities (Borcard, Legendre & Drapeau 1992; Legendre & Legendre 1998; Borcard & Legendre 2002).

Developments in theory and statistical tests have precipitated dozens of comparative analyses of the influences of environmental heterogeneity and spatial dynamics on species distributions. For example, Gilbert & Lechowicz (2004) used a sampling regime that removed spatial autocorrelation in the environment sampled, and used species’ spatial and environmental correlations to show that the sampled community was inconsistent with neutral predictions. Cottenie (2005) developed a framework in which the relative importance of spatial and environmental correlations was used to infer a range of processes, from neutral to source-sink to environmental sorting. Several studies have taken similar approaches both for testing theory (e.g. Tuomisto, Ruokolainen & Yli-Halla 2003), and for a range of applied ecological questions, from elucidating scales of isolation in metapopulations (Yamanaka *et al.* 2009) to developing predictive models for species distributions under climate scenarios (e.g. Heikkinen *et al.* 2006).

There is, however, much controversy about the relative merits of the statistical options for partitioning spatial and environmental components of variation (e.g. Legendre, Borcard & Peres-Neto 2005, 2008; Tuomisto & Ruokolainen 2006, 2008; Laliberté 2008; Pélissier, Couteron & Dray 2008). This controversy over appropriate statistical methods and their interpretation is important to both theoretical and applied ecology. Indeed, understanding the theoretical underpinnings of meta-communities (Cottenie 2005) and the impacts of environmental changes such as climate warming, land-use change and eutrophication on biodiversity (e.g. McLachlan, Hellmann & Schwartz 2007), depends on correctly identifying the processes that structure species distributions.

In this study, we test the effectiveness of the most commonly used multivariate partitioning techniques, with a particular focus on a recently developed and increasingly used approach: redundancy analysis (RDA) with a principal coordinates of neighbour matrices (PCNM) spatial matrix. While recent papers evaluating these techniques (Laliberté 2008; Legendre, Borcard & Peres-Neto 2008; Pélissier, Couteron & Dray 2008; Tuomisto & Ruokolainen 2008) have focused almost exclusively on modelling spatial patterns to infer dispersal limitation in neutral communities, we took a broader approach by evaluating how well each method performs from modelling both spatial and environmental processes. Our goal was not to further develop or test the mechanics of these methods, but rather to assess how well they represent known causes of species distributions in simple yet realistic communities.

We partitioned variation amongst simulated communities using multiple regression on distance matrices (MRDM) and raw-data approaches (RDA) that differ in both environmental models (linear and eigenvector) and spatial models [trend surface, PCNM and Moran’s eigenvector maps (MEM)]. Although previous studies have argued the relative merits of these different methods (e.g. Pelletier, Fyles & Dutilleul 1999; Legendre, Borcard & Peres-Neto 2008; Tuomisto & Ruokolainen 2008; Peres-Neto & Legendre 2010), they are all widely used by ecologists and have yet to be systematically compared. We began by simulating ecological communities with known levels of environmental and spatial control of species distributions, using levels that encompassed *c.* 90% of studies reported in the most recent meta-analysis of environment–space partitioning papers (Cottenie 2005). Species distributions in our simulations were generated through three distinct processes: response to a spatially autocorrelated environmental gradient, response to a spatially random environmental gradient, and source-sink dispersal. We then used each statistical method to partition the variation explained by environment and space, and compared this to the known fractions explained. Through these analyses, we address the following questions: (i) how accurate is each method at determining both absolute and relative importance of spatial and environmental drivers; (ii) does this accuracy change as the relative importance of each driver changes; and (iii) how sensitive are the statistical methods to the spatial configuration of sampling regime?