APPENDIX S3 Reciprocal causal modeling: (partial) Mantel correlations between isolation by distance (IBD), landscape resistance (IBR) and clustering (IBB) hypotheses We used reciprocal causal modelling (Cushman et al. 2013) to compete the alternative hypotheses governing gene flow (i.e. IBD, IBB and IBR), and identify the hypothesis in the set that was uniquely supported relative to the others. First, the Rousset’s ar inter-individual genetic distance (Rousset 2000) was computed using the program SPAGeDI (Hardy & Vekemans 2002) since this parameter of relatedness does not rely on a reference population (Vekemans & Hardy 2004) and has been successfully applied to infer the effect of landscape on genetic structure of continuously distributed vertebrates (Coulon et al. 2004; Broquet et al. 2006; Blair & Melnick 2012; Dudaniec et al. 2013). Later, the pairwise genetic distances matrix (Rousset’s ar) was correlated with different distances matrices representing the different hypothesis potentially driving gene flow (i.e. IBD, IBR and IBB). The correlation between distance matrixes was calculated by means of the Mantel test (Mantel 1967) and partial Mantel tests (Smouse et al. 1986) as implemented in the ECODIST package (Goslee & Urban 2007) in R version 2.7 (R Development Core Team 2008) with 10 000 permutations. Given the potential sensitivity of Mantel tests to non-linear relationships between genetic and cost-distances (Rousset 1997), we compared results between two sets of analyses, one log transforming the effective and Euclidean distances, and one using the original untransformed cost-distance matrices. We used reciprocal causal modeling (Cushman et al. 2013c) to compete the alternative hypotheses governing gene flow (i.e. IBD, IBB and IBR), and identify if any hypothess in the set that was uniquely supported relative to the others. Cushman & Landguth (2010) found that the inherent high correlation among alternative models results in a high risk of spurious correlations using simple Mantel tests. Several refinements, including causal modeling (Cushman et al. 2006), have been developed to reduce the risk of affirming spurious correlations and to assist model selection. However, Cushman et al. (2013c) showed these still suffer from elevated Type I error rates. Consequently, Cushman et al. (2013c) proposed “reciprocal causal modeling”, which they showed greatly lessens Type I error rates observed by Meirmans (2012) and Amos et al. (2012) in landscape genetic analysis, allowing rigorously testing for the joint and independent effects of alternative resistance models (e.g. Yang et al. 2013; Castillo et al. 2014; Ruiz-Gonzalez et al. 2014). The method of reciprocal causal modeling directly competes all alternative hypotheses based on relative support. The approach uses a pair of "reciprocal" Mantel tests for each pair of alternative resistance hypotheses (Fig. S1). The first is a partial Mantel test which calculates the partial Mantel correlation between the first hypothesis and genetic distance, partialling out the second (G ~ A|B). The second is a partial Mantel test which calculates the partial Mantel correlation between the second hypothesis and genetic distance, partialling out the first (G ~ B|A) (Fig. S1). The difference between the partial correlations of these two tests (A|B - B|A) is a measure of the relative support for hypothesis A relative to hypothesis B (e.g. Cushman et al. 2013b,c; Yang et al. 2013; Castillo et al. 2014) (Fig. S1). Specifically, if hypothesis A is correct then the difference A|B - B|A should be positive. Conversely, if hypothesis B is correct then (A|B - B|A) should be zero or negative. The reciprocal causal modeling approach works by calculating a full matrix of all the A|B - B|A differences between each pair of alternative hypothesis. For a model that is fully supported all values in the column associated with that hypothesis would be positive, while all values in the row associated with that hypothesis would be negative. This would indicate that that hypothesis is supported independently of all alternative hypotheses (positive values down the column) and that no alternative hypotheses are supported independently of it (negative values across the row). In addition to the reciprocal causal modelling matrix (Cushman et al. 2013c), we calculated the raw form of the partial Mantel matrix that provide further insights when competing hypothesis could be jointly true (Castillo et al. 2014). References Blair ME, Melnick DJ (2012) Scale-Dependent Effects of a Heterogeneous Landscape on Genetic Differentiation in the Central American Squirrel Monkey (Saimiri oerstedii). Plos One, 7. Broquet T, Ray N, Petit E, Fryxell JM, Burel FDO-10. 1007/s1098.-005-5956-y (2006) Genetic isolation by distance and landscape connectivity in the American marten (Martes americana). Landscape Ecology, 21, 877–889 ST – Genetic isolation by distance and la. Castillo JA, Epps CW, Davis AR, Cushman SA (2014) Landscape effects on gene flow for a climatesensitive montane species, the American pika. Molecular Ecology, 23, 843–856. Coulon a., Cosson JF, Angibault JM et al. (2004) Landscape connectivity influences gene flow in a roe deer population inhabiting a fragmented landscape: an individual-based approach. Molecular Ecology, 13, 2841–2850. Cushman SA, Landguth EL (2010) Spurious correlations and inference in landscape genetics. Molecular Ecology, 19, 3592–3602. Cushman S a, McKelvey KS, Hayden J, Schwartz MK (2006) Gene flow in complex landscapes: testing multiple hypotheses with causal modeling. The American Naturalist, 168, 486–99. Cushman SA, Wasserman TN, Landguth EL, Shirk AJ (2013) Re-Evaluating Causal Modeling with Mantel Tests in Landscape Genetics. Diversity, 5, 51–72. Dudaniec RY, Rhodes JR, Wilmer JW et al. (2013) Using multilevel models to identify drivers of landscape-genetic structure among management areas. Molecular Ecology, 22, 3752–3765. Goslee SC, Urban DL (2007) The ecodist package for dissimilarity-based analysis of ecological data. Journal of Statistical Software, 22, 1–19. Hardy OJ, Vekemans X (2002) SPAGEDi: a versatile computer program to analyse spatial genetic structure at the individual or population levels. Molecular Ecology Notes, 2, 618–620. Mantel N (1967) Detection of disease clustering and a generalized regression approach. Cancer Research, 27, 209–220. Rousset F (1997) Genetic differentiation and estimation of gene flow from F-statistics under isolation by distance. Genetics, 145, 1219–1228. Rousset F (2000) Genetic differentiation between individuals. Journal of Evolutionary Biology, 13, 58–62 ST – Genetic differentiation between indivi. Ruiz-González A, Gurrutxaga M, Cushman SA et al. (2014) Landscape Genetics for the Empirical Assessment of Resistance Surfaces: The European Pine Marten (Martes martes) as a Target-Species of a Regional Ecological Network. PLoS ONE, 9, 19. Smouse PE, Long JC, Sokal RR (1986) Multiple-regression and correlation extensions of the mantel test of matrix correspondence. Systematic Zoology, 35, 627–632. Vekemans X, Hardy OJ (2004) New insights from fine-scale spatial genetic structure analyses in plant populations. Molecular Ecology, 13, 921–935. Yang J, Cushman SA, Yang J, Yang M, Bao T (2013) Effects of climatic gradients on genetic differentiation of Caragana on the Ordos Plateau, China. Landscape Ecology, 28, 1729–1741.