### The script below describes how the authors estimated extra sums of squares for this research. ## First, let us import a data set into R. # The data consist of three columns, each labeled as "topo," "soil," and "vege." # "topo" = the first singular axis scores of the topography block extracted by 3-B PLS # "soil" = the first singular axis scores of the soil block extracted by 3-B PLS # "vege" = the first singular axis scores of the vegetation block extracted by 3-B PLS data = read.table("E:/data.txt", header=T) ## Then, treating "vege" as response variable, perform the following regression. summary(regression1 <- lm(data$vege ~ data$topo + data$soil)) ## This is same as Eq. 6 in the main body of the manuscript. anova(regression1) ## The resulting ANOVA table will show you the following two variances: # The amount of vegetation variance, not explained by soil and topography (= residual sum of squares) # The amount of vegetation variance, explained by soil only # This latter is equivalent to the pure influence of soil on vegetation, excluding topogrpahy's effect ## Now, let us estimate the pure influence of topography on vegetation, excluding soil's effect. summary(regression2 <- lm(data$vege ~ data$soil + data$topo)) ## This is same as Eq. 7 in the main body of the manuscript. anova(regression2) ## The resulting ANOVA table will show you the amount of vegetation variance, explained by topography only. ## Now, let us switch Eq. 6 into: summary(regression3 <- lm(data$soil ~ data$vege + data$topo)) ## This is same as Eq. 8 in the main body of the manuscript. anova(regression3) ## The resulting ANOVA table will show you the following two variances: # The amount of soil variance, not explained by vegetation and topography (= residual sum of squares) # The amount of soil variance, explained by topography only # This latter is equivalent to the pure influence of topography on soil, excluding vegetation's effect