APPENDIX S1: Supplementary methods Sampling To minimize the reduction of herbivore numbers over consecutive sampling rounds, each transect was moved one meter away from that sampled during the previous month, such that the same plants were not sampled on multiple rounds. To better quantify the number of interactions between herbivores and parasitoids (i.e. to make webs more representative of the diverse interactions occurring at a site), extra plants were sampled in sites where the total number of herbivores collected was less than fifty. These samples were taken as close to the transect as possible, and were used to increase the sample size of herbivores and parasitoids that emerged from them. Plant biomass estimation To estimate the plant biomass sampled, we counted the number of leaves from each plant species that were beaten on each transect, and then multiplied this number by the average leaf mass per species. To calculate an average leaf mass (dry weight) per species, we weighed between 30-60 dried leaves of each plant species (depending on how variable they were in size). For 14 out of 99 species sampled, we estimated their weights based on the leaf weights of other species of similar leaf size (13 of them within the same genus), because of their scarce presence at the locations sampled. To obtain dry weight of leaves, foliage was dried in a drying oven at 60 C° for two weeks. Morphological identification of herbivores Lepidoptera specimens were identified at least to genus level, according to current taxonomic classification. The only exception to this was the family Psychidae (Lepidoptera), for which only two species could be identified and the rest (6 specimens) were lumped into a 1 family-level morphospecies which we excluded from analyses to be consistent with other identifications (which were at least to the genus level), though their inclusion would not have qualitatively affected the results. Molecular identification of parasitoids We identified parasitoids morphologically after their emergence. However, for male parasitoids that could not be identified to species level using morphology, we used molecular techniques. For molecular identification, we sequenced a region of the mitochondrial cytochrome C oxidase subunit I (COI), used in previous studies for parasitoid identification (Kaartinen et al. 2010), of unidentified specimens and representative specimens of each species within those families. DNA was extracted using a prepGEM™ Insect kit (Zygem, USA). A portion of the COI gene was amplified using primer pair HCO2198 and LCO1490 (Folmer et al. 1994) using the KAPA Blood PCR Kit (Kapa Biosystems, USA) following, in both cases, the manufacturer’s protocol. PCR products, of approximately 658 bp, were purified and then Sanger sequenced by Macrogen Inc (Seoul, Korea). We then related the unidentified specimen sequences to those of specimens that had been identified morphologically. Specimens with sequences that had a pairwise similarity > 96% were considered to be the same species, as this captured most of the species defined without molecular means (Smith et al. 2013). Phylogenies An ultrametric plant phylogeny was extracted from the Phylomatic megatree for plants (R20120829), using the Phylomatic software (Webb & Donoghue 2005). Branch lengths were assigned using the bladj function in Phylocom (Webb, Ackerly & Kembel 2008) (Fig. S2a). 2 An herbivore phylogenetic tree (Fig. S2b) was constructed using one nuclear marker (Wgl) and one mitochondrial marker (COI) sequence, both obtained from GenBank (Benson et al. 2005). The Wgl marker sequence was used at the family level (i.e. the same Wgl sequence for all the genera within the same family) to create a backbone phylogeny at the family level, and the COI marker at the genus/species level (i.e. for each species or genus a different COI sequence) (Table S1). We could not use Wgl for every genus/species because they were not available for all our genera/species, nor were other markers. We aligned the Wgl and COI sequences separately using MUSCLE (Edgar 2004) and then concatenated them in MEGA6 (Tamura et al. 2013), resulting in a concatenated two-gene sequence (Wgl + COI) for each herbivore species. We included Pogonomyrmex subdentatus (Hymenoptera: Formicidae) as outgroup. We used BEAST v 1.8.0 (Drummond et al. 2006, Drummond & Rambaut 2007) to infer phylogenies in a Bayesian ultrametric approach. The tree prior was set using Yule speciation model. The searches used a lognormal uncorrelated relaxed molecular clock, and were run for 10000000 generations, sampling parameters every 1000 trees. A maximum credibility tree was obtained using Tree Annotator v 1.8.0 (available as part of the BEAST package). A burn-in of the initial 1000 trees was applied and the final tree was reconstructed from the remaining trees. Herbivore species for which no sequences were available, even at the genus level, were not included in the herbivore phylogeny or considered in the analyses. From a total of 59 herbivore genera collected and taxonomically identified, 37 were included in the analyses (a total of 39 genera/species), with 12 out of 14 families represented in the analyses (5322 herbivores were used in the analyses out of 5744 collected). To construct the parasitoid phylogeny (Fig S2c), we used ribosomal marker (28s) sequences obtained from GenBank (Benson et al. 2005) and mitochondrial marker (COI) sequences obtained from field samples (see Appendix S1: Molecular identification of 3 parasitoids) or, for those species that we did not sequence, COI sequences available in GenBank (Table S1). We used the same phylogeny construction methods as explained for herbivores, but this time using the 28s ribosomal sequences at the genus level and the COI sequences at the species level (Table S1). From 719 parasitoids reared, 535 could be accurately placed on the phylogeny and were therefore used in the analyses, representing 36 out of 60 species and morpho-species collected in the field (14 out of 26 genera and 4 out of 4 families were represented). Finally, distance matrices for plants, herbivores and parasitoids were derived from the phylogenies using the cophenetic function in the ape R package (Paradis et al. 2004). Phylogenetic diversity metrics To determine the phylogenetic community composition of plants, herbivores and parasitoids, we selected two metrics that merge species phylogenies with different aspects of community composition: phylogenetic species variability (PSV) and phylogenetic species evenness (PSE) (Helmus et al. 2007). These metrics assume that there is an unspecified trait shared by all the species in the phylogeny, which evolves neutrally at a fixed rate. Phylogenetic species variability (PSV) quantifies the variance of this hypothetical trait by combining phylogeny and species variability with community information. The higher the relatedness among species in a community, the lower the variance of this hypothetical trait, and PSV decreases towards zero. PSV equals 1 when all species in a community evolved independently (i.e. they are equally distant) from a common ancestor, a pattern known as a ‘star’ phylogeny (Helmus et al. 2007). This metric is particularly useful for comparing between habitat types because it is unbiased by differences in species richness (Helmus et al. 2007a, Helmus et al. 2007b). 4 Phylogenetic species evenness (PSE) incorporates species abundances into PSV and is therefore a measure of both phylogenetic and species evenness. If all species have the same abundance, PSE equals PSV; if species were to evolve in the form of a ‘star’ phylogeny, PSE represents the evenness in species abundances, with PSE reaching its maximum value of 1 when all species have the same abundances (Helmus et al. 2007). In order to avoid biased in PSV and PSE due to differences in sampling effort between sites, we used Monte-Carlo rarefaction for calculating PSV and PSE of each trophic level. To accomplish this, we used the phyloRarefy function (Bennet 2013) in R. ParaFit and ParaFitLink2 tests The null hypothesis of the ParaFit test is that consumers use resources randomly with respect to the phylogenetic tree of the resources, while the alternative hypothesis is that consumers and their resources occupy corresponding positions in their phylogenetic trees. To test this, the ParaFit test maps the principal components of the consumer and resource phylogenies onto adjacent sides of the presence/absence interaction matrix, to generate a ‘fourth corner’ matrix (Legendre, Galzin & Harmelin-Viven 1997). A global statistic is then derived from the fourth corner matrix by using the sum of squares of the elements of the matrix, and its significance is tested by performing permutations of the resources associated with each consumer and creating a distribution of the statistic under permutation. Subsequently, the ParaFitLink2 test assesses the null hypothesis that each individual trophic interaction might have arisen by chance with respect to the phylogenetic structure of the interacting groups (Legendre, Desdevises & Bazin 2002). Those interactions (pairwise consumer-resource associations) for which the null hypothesis is rejected are considered to have a signal of coevolution (Legendre, Desdevises & Bazin 2002). 5 References Bennet, J.D. Phylogenetic rarefaction. https://github.com/DomBennett/EcoDataTools/wiki/Phylogenetic-Rarefacation Benson, D.A., Karsch-Mizrachi, I., Lipman, D.J., Ostell, J. & Wheeler, D.L. (2005) GenBank. Nucleic Acids Research, 33, D34-D38. Drummond, A.J., Ho, S.Y.W., Phillips, M.J. & Rambaut, A. (2006) Relaxed phylogenetics and dating with confidence. PLoS Biology, 4, e88. Drummond, A.J. & Rambaut, A. (2007) BEAST: Bayesian evolutionary analysis by sampling trees. BMC Evolutionary Biology, 7, 214. Edgar, R.C. (2004) MUSCLE: multiple sequence alignment with high accuracy and high throughput. Nucleic Acids Research, 32, 1792–1797. Folmer, O., Black, M., Hoeh, W., Lutz, R. & Vrijenhoek, R. (1994) DNA primers for amplification of mitochondrial cytochrome c oxidase subunit I from diverse metazoan invertebrates. Molecular Marine Biology and Biotechnology, 3, 294-299. Helmus, M.R., Bland, T.J., Williams, C.K. & Ives, A.R. (2007a) Phylogenetic measures of biodiversity. The American Naturalist, 169, E68-E83. Helmus, M.R., Savage, K., Diebel, M.W., Maxted, J.T. & Ives, A.I. (2007b) Separating the determinants of phylogenetic community structure. Ecology Letters, 10, 917–925. Kaartinen, R., Stone, G.N., Hearn, J., Lohse, K. & Roslin, T. (2010) Revealing secret liaisons: DNA barcoding changes our understanding of food webs. Ecological Entomology, 35, 623–638. Kembel, S.W., Cowan, P.D., Helmus, M.R., Cornwell, W.K., Morlon, H., Ackerly, D.D., Blomberg, S.P. & Webb, C.O. (2010) Picante: R tools for integrating phylogenies and ecology. Bioinformatics, 26, 1463-1464. 6 Legendre, P., Galzin, R. & Harmelin-Viven, M.L. (1997) Relating behavior to habitat: Solutions to the fourth-corner problem. Ecology, 78, 547-562. Paradis, E., Claude, J. & Strimmer, K. (2004) APE: analyses of phylogenetics and evolution in R language. Bioinformatics, 20, 289-290. Smith, M.A., Fernández-Triana, J.L., Eveleigh, E., Gómez, J., Guclu, C., Hallwachs, W., Hebert, P.D.N., Hrcek, J., Huber, J.T., Janzen, D., Mason, P.G., Miller, S., Quicke, D.L.J., Rodriguez, J.J., Rougerie, R., Shaw, M.R., Várkonyi, G., Ward, D.F., Whitfield, J.B. & Zaldívar-Riverón, A. (2013) DNA barcoding and the taxonomy of Microgastrinae wasps (Hymenoptera, Braconidae): impacts after 8 years and nearly 20.000 sequences. Molecular Ecology, 13, 168-176. Tamura, K., Stecher, G., Peterson, D., Filipski, A. & Kumar, S. (2013) MEGA6: Molecular evolutionary genetics analysis version 6.0. Molecular Biology and Evolution, 30, 2725-2729. Webb, C.O., Ackerly, D.D. & Kembel, S.W. (2008) Phylocom: software for the analysis of phylogenetic community structure and trait evolution. Bioinformatics, 24, 2098-2100. Webb, C.O. & Donoghue, M.J. (2005) Phylomatic: tree assembly for applied phylogenetics. Molecular Ecology Notes, 5, 181-183. 7 APPENDIX S2: Species richness and abundance across a habitat edge gradient We used GLMMs with plant richness, plant biomass, herbivore richness, herbivore abundance, parasitoid richness and parasitism rates as response variables and forest type, location (edge vs. interior) and their interaction as predictors. We also incorporated sampling plot nested within site as random factors to account for the non-independence of samples within a site. For the species richness models, we included abundance of the trophic level (or biomass for plants) as covariates, to control for differences in the sample size. For testing herbivore abundance, we also included plant biomass as a covariate (first in the model, before all the other fixed terms), and to test abundance of parasitoids we used parasitism rates as the response variable to weight the number of parasitoids by the number of herbivores collected. For all the species richness models we used a Poisson error distribution, for parasitism rates we used binomial errors, and for plant biomass we used a Gaussian error distribution. For the herbivore abundance model we used a negative binomial distribution because the equidispersion assumption of the Poisson model was not achieved (Zuur 2009). We checked for overdispersion in all Poisson and binomial models, and to fulfill the homoscedasticity and normality assumptions of the Gaussian model, we log transformed plant biomass. We found that plant species richness in native forest interiors was significantly lower than in native edges (Z = 2.03, P = 0.042), but higher than in plantation forest interiors (Z = 4.48, P < 0.001) (Fig. S3, Table S2). Despite these differences in species richness across habitats, plant biomass did not change across forest types (Z = 1.87, P = 0.083), and location (edge vs. interior) was not even retained in the best-fitting model. In contrast, no differences were observed for herbivore or parasitoid species richness between forest types (Z = -1.012, P = 0.311, and Z = 0.992, P = 0.321 respectively), nor was location (edge vs. interior) retained in the best-fitting models for herbivore and parasitoid richness (Fig. S3, Table S2). 8 The abundance of herbivores tended to increase from the native interior across the edge to the plantation interior (Fig. S3, Table S2). Herbivore abundance was lower in native forest interior compared with plantation forest edge (interaction term: Z = -3.76, P <0.001), and plantation interior (Z = 4.50, P < 0.001) and native edge, although in this case there was no significant difference (Z = 1.79, P = 0.073). Finally, we found no differences in parasitism rates across edge vs. interior locations (Z = 1.50, P = 0.134), nor was forest type retained in the best-fitting model (Fig. S3, Table S2). However, parasitism rates by native parasitoids were higher in plantation than native forests (Z = 2.49, P = 0.013) (Table S2). References Zuur, A.F., Ieno, E.N., Wlaker, N.J., Saveliev, A.A., Smith, G. (2009) Mixed Effects Models and Extensions in Ecology with R. Springer, New York. 9 APPENDIX S3: Phylogenetic diversity of native species Phylogenetic diversity of native plants To determine if differences in phylogenetic diversity in the plant communities across habitat types were due to the presence of introduced, non-native species, we removed nonnative species from the dataset and re-calculated the phylogenetic diversity metrics (PSV, PSE). Species were classified as non-native if they were introduced into New Zealand by humans, deliberately or accidentally. We used GLMMs (with a Gaussian error distribution) in order to determine whether there were differences across habitats in the phylogenetic diversity of plant communities, considering only native plant species. We used forest type, location (edge vs. interior), and their interaction as predictor variables, and sampling plot nested within site as a random factor. We tested for normality, homoscedasticity of variances and for outliers, and one of our sampling plots exhibited strong leverage for both plant PSV and PSE. Therefore, we removed it from these analyses, in order to avoid spurious trends, even though the results did not change qualitatively. Finally, we used the same model selection procedure as explained in the Methods section (main text). The best-fitting GLMM model for native plant PSV was the full model. PSV of native plants was higher in native interior forest than plantation edge (interaction term: t = -3.58, P = 0.003), with no significant differences between interior and edge of native forest (t = 2.09, P = 0.056) or between native interior and interior plantation (t = 1.500, P = 0.166). Despite the differences in PSV of native plants between native interior and plantation edge, we found no differences in PSE of native plants across forest types (t = -0.08, P = 0.140) nor was location (edge vs. interior) retained in the best fitting model (Fig. S4, Table S3). Phylogenetic diversity of native parasitoids 10 To determine whether there were differences in phylogenetic diversity of parasitoids when only considering native species, we used the same procedure/analyses as for native plants. Given that some of our parasitoids were only identified to morphospecies level, we only conducted this analysis for specimens formally identified to species by Linnaean classification, and specimens belonging to a genus for which no non-native species have been registered in New Zealand (Aleiodes, Campoletis, Campoplex, Carria, Casinaria, Choeras, Ophion). Morphospecies that belonged to genera containing both native and non-native species were excluded from the analyses, because we could not be certain of their origin. Six sampling plots (out of the 32) presented only one native parasitoid species and since PSV and PSE cannot be calculated for single species communities, these plots were not included in the analyses. For the parasitoid PSE model, we included herbivore abundance as a covariate before the fixed terms, in order to account for potential variability in parasitoid abundance due to herbivore abundance. Phylogenetic species variability (PSV) of native parasitoids was lower in interior forests compared to edges (t = 3.50, P = 0.002) (Fig. S4, Table S3). Similarly, parasitoid phylogenetic species evenness was higher in edges than interiors habitats (t = 3.51, P = 0.002). 11 Table S1: GenBank a) herbivore and b) parasitoid sequence accession numbers. For herbivores, one nuclear marker (Wgl) at the family level and one mitochondrial marker (COI) sequence at the genus/species level were used. Pogonomyrmex subdentatus (Hymenoptera: Formicidae) was used as outgroup in the construction of the herbivore phylogeny. For constructing the parasitoid phylogeny, we used ribosomal marker (28s) sequences at the genus level and mitochondrial marker (COI) sequences at the species level. a) HERBIVORES (LEPIDOPTERA) family Carposinidae Carposinidae Gelechiidae Oecophoridae Oecophoridae Oecophoridae Oecophoridae Oecophoridae Oecophoridae Geometridae Geometridae Geometridae Geometridae Geometridae Geometridae Geometridae Geometridae Geometridae Geometridae Geometridae Gracillariidae Erebidae Noctuidae Crambidae Crambidae Tineidae Tortricidae Tortricidae Tortricidae Tortricidae Tortricidae Tortricidae Tortricidae Tortricidae Tortricidae Tortricidae Tortricidae genus Heterocrossa Paramorpha Thiotricha Eutorna Gymnobathra Nymphostola Phaeosaces Proteodes Stathmopoda Cleora Declana Ischalis Pseudocoremia Austrocidaria Chloroclystis Helastia Hydriomena Pasiphila Poecilasthena Tatosoma Caloptilia Rhapsa Chrysodeixis Musotima Deana Erechthias Holocola Strepsicrates Cnephasia Ctenopseustis Dipterina Epichorista Epiphyas Leucotenes Planotortrix Planotortrix Planotortrix species sp. sp. sp. phaulocosma sp. galactina sp. sp. sp. sp. sp. sp. sp. sp. sp. sp. sp. sandycias sp. sp. sp. sp. eriosoma nitidalis hybreasalis sp. sp. sp. sp. sp. sp. sp. postvittana coprosmae excessana notophaea octo GenBank accessions (Wgl) GU829699 GU829699 GU829604 JF818596 JF818596 JF818596 JF818596 JF818596 JF818596 GU593337 GU593337 GU593337 GU593337 GU593337 GU593337 GU593337 GU593337 GU593337 GU593337 GU593337 GU829617 GU829660 JN674977 JF497070 JF497070 GU829657 HQ541597 HQ541597 HQ541597 HQ541597 HQ541597 HQ541597 HQ541597 HQ541597 HQ541597 HQ541597 HQ541597 GenBank accessions (COI) GU929815 KF390278 JF818795 KF392848 JF818751 JF818771 JF818778 JF818782 JF818792 JF784734 JF784716 JF784723 KF394835 KF388840 KF395068 JF784719 EU443350 JF784725 JF784720 JF784721 KF394999 KF392511 KF394354 GU929784 JF497029 KF396896 KF399527 KF399800 JF859655 FJ225574 KF404521 KF399534 GU827570 AF016473 AF016475 AF016477 AF016478 12 Plutellidae Yponomeutidae Formicidae (outgroup) Orthenches Kessleria sp. sp. GU829637 GU829672 KF405319 HQ968333 Pogonomyrmex subdentatus JQ742895 JQ742639 b) PARASITOIDS family Tachinidae Eulophidae Braconidae Braconidae Braconidae Braconidae Braconidae Braconidae Braconidae Braconidae Braconidae Braconidae Braconidae Braconidae Braconidae Braconidae Braconidae Campopleginae Campopleginae Campopleginae Campopleginae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae Ichneumonidae genus Trigonospila Sympiesis Aleiodes Aleiodes Choeras Cotesia Dolichogenidae Dolichogenidae Glyptapanteles Glyptapanteles Glyptapanteles Glyptapanteles Glyptapanteles Glyptapanteles Glyptapanteles Meteorus Meteorus Diadegma Diadegma Diadegma Diadegma Campoletis Campoletis Campoletis Campoletis Campoplex Campoplex Campoplex Campoplex Campoplex Campoplex Carria Carria Carria Carria Casinaria Ophion species sp. sp. declanae sp. sp. sp. darklegs sp. 4 lightly punct dark sp. 2 sp. 3 sp. 4 sp. 5 sp. 6 sp. 9 cinctellus pulchricornis brown gold setae sp. 1 sp. 3 sp. 1 sp. 4 sp. 5 sp. 9 sp. 1 sp. 13 sp. 2 sp. 3 sp. 4 sp. 9 fortipes petiolate areolet sp. 2 sp. 3 sp. 3 sp. GenBank accessions (28S) AB466052 FJ812246 JF979752 JF979752 AY044218 DQ538976 AF102743 AF102743 AF102738 AF102738 AF102738 AF102738 AF102738 AF102738 AF102738 HQ263734 HQ263734 EU378397 EU378397 EU378397 EU378397 EU378388 EU378388 EU378388 EU378388 EF374043 EF374043 EF374043 EF374043 EF374043 EF374043 EU378665 EU378665 EU378665 EU378665 EF406252 EU378715 GenBank accessions (COI) GU142770 HM574130 KM106895 KM106896 KM107122 KM107110 KM107132 KM107070 KM107101 KM107118 KM107119 KM107094 KM107078 KM107108 KM107089 KM107164 HQ264010 KM107176 KM107045 KM106863 KM106859 KM106882 KM107173 KM107174 KM107181 KM106909 KM106910 KM107149 KM107187 KM107186 KM107190 KM106987 KM106851 KM106852 KM106853 KM106927 KM107171 13 Table S2. Coefficient tables from generalized linear mixed effects models to determine changes in the species richness and abundance of plants, herbivores and parasitoids across a habitat edge gradient. These are the results from the best-fitting models, which were simplified from a maximal model including forest type (native vs. plantation), location (edge vs. interior) and their interaction as fixed effects. All models included plot nested within site as random factors. For each species richness model, the respective abundance (biomass for plants) was incorporated as a covariate to control for potential variation in abundance. Parasitoid abundance was tested as parasitism rates, to control for differences in the abundance of herbivores, and for the herbivore abundance model we included plant biomass as a covariate. We used a Poisson distribution for all the species richness models (Z-values), Gaussian for log transformed plant biomass (t-value), negative binomial for herbivore abundance (Z-values) and binomial for parasitism rates (Z-value). Forest P = plantation forest; Location E = edge location. Bold values indicate significant results (α = 0.05). Response variable Plant species richness Plant biomass Herbivore species richness Herbivore abundance Parasitoid species richness Parasitism rates Native parasitoid species richness Parasitism rates (by native parasitoids) Predictors Intercept Forest P Location E Intercept Forest P Intercept Herbivore abundance Forest P Intercept Plant biomass Forest P Location E Forest P*Location E Intercept Parasitoid abundance Forest P Intercept Location E Intercept Native parasitoid abundance Forest P Intercept Forest P Estimate± SE 3.012 ± 0.110 -0.527 ± 0.118 0.169 ± 0.083 3.936 ± 0.117 0.309 ± 0.165 2.557 ± 0.132 10e-4 ± 80e-4 -0.108 ± 0.107 4.788 ± 0.145 30e-4 ± 0.002 0.598 ± 0.133 0.210 ± 0.117 -0.628 ± 0.167 1.618 ± 0.142 0.020 ± 0.006 0.126 ± 0.132 -2.291 ± 0.108 0.140 ± 0.093 0.661 ± 0.177 Z/t-value 27.325 -4.485 2.028 33.612 1.868 19.431 0.239 -1.012 32.990 0.220 4.500 1.790 -3.760 11.400 3.081 0.954 -21.160 1.500 3.730 P-value < 0.001 < 0.001 0.042 < 0.001 0.083 < 0.001 0.811 0.311 < 0.001 0.826 < 0.001 0.073 < 0.001 < 0.001 0.002 0.340 < 0.001 0.134 < 0.001 0.038 ± 0.013 2.878 0.004 0.100 ± 0.238 -3.586 ± 0.225 0.550 ± 0.221 0.419 -15.933 2.487 0.675 < 0.001 0.013 14 Table S3: Results from GLMMs (with Gaussian distribution) showing differences in phylogenetic diversity of native plants and parasitoids across forest types (native vs. plantation) and location (edge vs. interior). Results are from the best-fitting model (with lowest AIC), after model selection. Herbivore abundance was entered as a covariate in the parasitoids PSE model. PSV = phylogenetic species variability, PSE = phylogenetic species evenness. Bold values indicate significant results (α = 0.05). Forest P = plantation forest. Phylogenetic diversity metric PSV of native plants PSE of native plants PSV of native parasitoids PSE of native parasitoids Fixed effects Estimate ± SE t-value P-value Intercept Forest P Location E Forest P*Location E Intercept Forest P Intercept Location E Intercept Herbivore abundance Location E 0.682 ± 0.022 0.045 ± 0.030 0.035 ± 0.017 -0.088 ± 0.025 0.585 ± 0.038 -0.085 ± 0.054 0.412 ± 0.038 0.196 ± 0.056 0.345 ± 0.009 30e-4 ± 40e-4 0.199 ± 0.006 31.518 1.500 2.092 -3.584 15.426 -1.569 10.853 3.503 3.995 0.851 3.515 <0.001 0.166 0.056 0.003 <0.001 0.140 <0.001 0.002 <0.001 0.404 0.002 15 Table S4: Coefficient tables from generalized linear mixed effects models to determine changes in community phylogenetic diversity of different trophic levels across habitats (with a Gaussian error distribution). These are the results from the best-fitting models, which were simplified from a maximal model including forest type (native vs. plantation), location (edge vs. interior) and their interaction as fixed effects. All models included plot nested within site as random factors. The herbivore and parasitoid PSE models included plant biomass and herbivore abundance respectively as a covariate, to control for potential variation in resource abundance. Forest P = plantation forest; Location E = edge location. Bold values indicate significant results (α = 0.05). Trophic level Phylogenetic diversity metric PSV Plant PSE PSV Herbivore PSE PVS Parasitoid PSE Fixed effects Estimate ± SE t-value P-value Intercept Forest P Location E Forest P*Location E Intercept Forest P Location E Intercept Location E Intercept Plant biomass Forest P Location E Forest P*Location E Intercept Location E Intercept Host abundance Location E 0.653 ± 0.025 0.059 ± 0.031 0.051 ± 0.016 -0.100 ± 0.022 0.533 ± 0.035 -0.230 ± 0.034 0.085 ± 0.034 0.473 ± 0.009 -0.009 ± 0.012 0.375 ± 0.026 -10e-4 ± 30e-4 -0.066 ± 0.025 -0.025 ± 0.020 0.085 ± 0.029 0.583 ± 0.022 0.036 ± 0.031 0.542 ± 0.005 -60e-5 ± 20e-4 0.003 ± 0.003 26.556 1.911 3.308 -4.544 15.091 -6.768 2.490 55.056 -0.767 14.197 -0.460 -2.648 -1.197 2.872 26.949 1.194 11.161 -0.270 1.012 <0.001 0.088 0.005 <0.001 <0.001 <0.001 0.021 <0.001 0.449 <0.001 0.650 0.018 0.252 0.012 <0.001 0.242 <0.001 0.789 0.322 16 Table S5: Results of GLMMs with binomial error distribution testing whether a) the proportion of total native interactions (i.e. parasitism events) with coevolutionary signal and b) the proportion of unique native herbivore-parasitoid links with coevolutionary signal changed across forest types. Both models included host abundance as a covariate and plot nested within site as a random factor. Bold values indicate significant results (α = 0.05). A) B) Response variable Proportion of native parasitism events with coevolutionary signal Proportion of unique native herbivoreparasitoid links with coevolutionary signal Fixed effects Intercept Host abundance Forest P Intercept Host abundance Forest P Estimate ± SE 0.886 ± 0.677 -0.003 ± 0.003 1.226 ± 0.379 1.114 ± 0.597 -0.004 ± 0.003 Z-value 1.310 -0.802 3.233 1.865 -1.177 P 0.190 0.422 0.001 0.062 0.239 0.647 ± 0.426 1.519 0.129 17 Native forest Edge Native forest Plantation forest Edge NI 10 m 10 m 10 m 10 m NE A B 500 m 500 m Pine forest PE C D PI 500 m 500 m Fig. S1: Schematic diagram of each sampling site. Each site (of eight sites in total) comprised a native forest adjacent to a pine forest. The dotted line indicates the centre of the edge zone, defined as the last row of pine trees in the plantation forest. In each forest type there were two locations (edge vs. interior), represented by black and white circles respectively. Each forest type within a site was treated as a plot, and each subplot was a specific location (edge vs. interior) within the plot. Therefore, at each site four subplots were sampled: NI = native interior forest, NE = native edge, PE = plantation edge, and PI = plantation interior forest. In total, 32 subplots were sampled across the eight sites, and a quantitative parasitoid-host food web was constructed for each subplot. 18 Pseudopanax anomalus Pseudopanax arboreus Pseudopanax sp. Schefflera digitata Pittosporum eugenioides Pittosporum rigidum Pittosporum sp. Griselinia littoralis Griselinia lucida Pennantia corymbosa Leycesteria formosa * Quintinia serrata Brachyglottis repanda Helichrysum lanceolatum Olearia avicenniifolia Olearia rani Senecio sp. * Carpodetus serratus Nestegis montana Digitalis purpurea * Hebe sp. Coprosma areolata Coprosma colensoi Coprosma foetidissima Coprosma grandifolia Coprosma linariifolia Coprosma lucida Coprosma microcarpa Coprosma propinqua Coprosma rhamnoides Coprosma robusta Coprosma rotundifolia Erica lusitanica * Gaultheria antipoda Leptecophylla juniperina Leucopogon fasciculatus Myrsine australis Coriaria arborea Nothofagus fusca Nothofagus menziesii Nothofagus solandri Rubus cissoides Rubus fruticosus * Chamaecytisus palmensis * Ulex europaeus * Weinmannia racemosa Aristotelia serrata Elaeocarpus dentatus Elaeocarpus hookerianus Passiflora tetrandra Melicytus ramiflorus Kunzea ericoides Leptospermum scoparium Metrosideros sp. Neomyrtus pedunculata Lophomyrtus obcordata Lophomyrtus bullata Fuchsia excorticata Alectryon excelsus Berberis sp * Cortaderia richardii Dianella nigra Phormium tenax Rhipogonum scandens Beilschmiedia tawa Hedycarya arborea Pseudowintera axillaris Pseudowintera colorata Pinus radiata * Pinus sylvestris * Pseudotsuga menziesii * Dacrydium cupressinum Podocarpus hallii Prumnopitys ferruginea Prumnopitys taxifolia Asplenium oblongifolium Asplenium polyodon Blechnum discolor Blechnum minus Histiopteris incisa Pteridium aquilinum Polystichum vestitum Cyathea colensoi Cyathea dealbata Cyathea medullaris Cyathea smithii Dicksonia sp Leptopteris hymenophylloides Marattia salicina a) Araliaceae Pittosporaceae Griseliniaceae Pennantiaceae Caprifoliaceae Paracryphiaceae Asteraceae Rousseaceae Oleaceae Plantaginaceae Rubiaceae Ericaceae Primulaceae Coriariaceae Nothofagaceae Rosaceae Fabaceae Cunoniaceae Elaeocarpaceae Passifloraceae Violaceae Myrtaceae Onagraceae Sapindaceae Berberidaceae Poaceae Xanthorrhoeaceae Rhipogonaceae Lauraceae Monimiaceae Winteraceae Pinaceae Podocarpaceae Aspleniaceae Blechnaceae Dennstaedtiaceae Dryopteridaceae Cyatheaceae Dicksoniaceae Osmundaceae Marattiaceae 50.0 19 b) Caloptilia sp. Gracillariidae Orthenches sp. Plutellidae Ctenopseustis sp. Leucotenes coprosmae Planotortrix excessana Planotortrix octo Planotortrix notophaea Epiphyas postvittana * Tortricidae Dipterina sp. Epichorista sp. Holocola sp. Strepsicrates sp. Cnephasia sp. Tatosoma sp. Austrocidaria sp. Chloroclystis sp. Pasiphila sandycias Poecilasthena sp. Hydriomena sp. Geometridae Helastia sp. Pseudocoremia sp. Cleora sp. Ischalis sp. Declana sp. Deana hybreasalis Crambidae Musotima nitidalis Heterocrossa sp. Carposinidae Paramorpha sp. Chrysodeixis eriosoma Noctuidae Rhapsa sp. Erebidae Gelechiidae Thiotricha sp. Gymnobathra sp. Phaeosaces sp. Stathmopoda sp. Eutorna phaulocosma * Oecophoridae Nymphostola galactina Proteodes sp. Erechthias sp. Yponomeutidae Tineidae Pogonomyrmex subdentatus Formicidae (outgroup) Kessleria sp. 0.08 20 c) Choeras sp. Glytapanteles dark * Glyptapanteles sp. 5 * Glyptapanteles sp. 3 * Glyptapanteles sp. 9 * Glyptapanteles sp. 2 * Glyptapanteles sp. 4 * Glyptapanteles sp. 6 * Braconidae Cotesia sp. 1 * Dolichogenidea lightly punct * Dolichogenidea darklegs sp. 4 * Meteorus cinctellus * Meteorus pulchricornis * Aleiodes declanae Aleiodes sp. Sympiesis sp. * Eulophidae Diadegma sp. 1 * Diadegma sp. 3 * Diadegma gold setae * Campoletis sp. 9 Campoletis sp. 1 Campoletis sp. 5 Campoplex sp. 4 Campoplex sp. 1 Campoplex sp. 9 Campoplex sp. 13 Ichneumonidae Campoplex sp. 3 Campoplex sp. 2 Campoletis sp. 4 Casinaria sp. 3 Carria petiolate areolet Carria sp. 2 Carria sp. 3 Carria fortipes Ophion sp. Trigonospila_sp. * Tachinidae 0.05 Fig. S2: a) Ultrametric plant phylogeny extracted from the Phylomatic tree for plants (R20120829), using the Phylomatic software. b) Ultrametric herbivore phylogeny of the species found in the study area, with phylogenetic relationships inferred using DNA sequences obtained from GenBank, including one nuclear marker (Wgl) and one mitochondrial marker (COI). Because all herbivore species were from the same order (Lepidoptera) Pogonomyrmex subdentatus (Hymenoptera: Formicidae) was included as outgroup. c) Ultrametric parasitoid phylogeny, with phylogenetic relationships based on one ribosomal marker (28s RNA) and one mitochondrial marker (COI). White bars represent families, and non-native species are indicated with *. Voucher specimens of plants have been deposited at the University of Canterbury Herbarium (CANU), Ichneumonidae and Tachinidae parasitoids at the New Zealand Arthropod Collection (NZAC) in Auckland, and 21 Braconidae and Eulophinae parasitoids at the Te Papa Museum Entomology Collection in Wellington, NZ. 22 15 20 10 30 10 20 0 0 5 10 0 NE PE PI NI NE PE PI NI NE PE PI NI NE PE PI NE PE PI NI NE PE PI 20 200 0 0 10 100 80 40 0 NI 30 300 NI 120 Species richness Abundance Parasitoids Herbivores Plants Fig. S3: Mean and SE of species richness and abundance of plants, herbivores and parasitoids (including native and non-native species) across a habitat edge gradient from native interior (NI) forest, across native forest side of the edge (NE), plantation forest side of the edge (PE) and plantation interior forest (PI). Plant abundance represents biomass sampled (kg), while abundance of herbivores is the number of individuals collected, and of parasitoids, the number that emerged from herbivores. 23 0.5 0.0 0.5 0.0 PE PI NI NE PE PI PSE NE PE PI NI NE PE PI 0.0 0.5 0.0 PSE NI 1.0 NE 1.0 NI 0.5 PSV 1.0 Parasitoids 1.0 Plants Fig. S4: Phylogenetic species variability (PSV) and phylogenetic species evenness (PSE) of native plant and parasitoid species across a habitat edge gradient from native interior (NI) forest, across native forest side of the edge (NE), plantation forest side of the edge (PE) and plantation interior forest (PI). 24 Fig. S5: Plant-herbivore food web. The top and bottom rectangles represent herbivore and plant species respectively, with different colours indicating different families. Links between both trophic levels indicate an herbivory event, coloured according to herbivore family. Plant phylogeny was constructed using the Phylomatic software, and herbivore phylogeny was built using one nuclear marker (Wgl) and one mitochondrial marker (COI). 25 26