Does the Presence of Shade Trees and Distance to the Forest Affect Detection Rates of Terrestrial Vertebrates in Coffee Home Gardens?

: Complex agroforestry systems can host similar biodiversity levels to adjacent continuous forests and can offer important ecosystem services for wildlife. Species inhabiting adjacent forests, as well as species that prefer agroforestry systems, can beneﬁt from this habitat matrix. It is necessary, however, to understand the species-speciﬁc adaptability to such a complex matrix. Indonesia is a biodiversity hotspot and hosts many endemic species that are threatened with extinction. Its human population relies heavily on agriculture, meaning that ﬁnding a balance between crop productivity and biodiversity is key for the long-term sustainability of local communities and wildlife. We aim to determine the inﬂuence of the presence of shade trees and distance to the forest on the detection rates of wildlife in coffee home gardens. In West Java, Indonesia, we monitored 23 gardens between April 2018 and March 2021 via camera traps, totalling 3856 days of monitoring in shade-grown and 3338 days in sun-exposed gardens. We also collected data in the nearby montane rainforest, totalling 1183 days of monitoring. We used Generalized Additive Models to estimate the inﬂuence of shade cover and distance to the forest on the detection rates of wildlife. The Sunda leopard cat Prionailurus javanensis was found more frequently in shade-grown gardens and used both the forest and agroforest matrix. Wild boars Sus scrofa mostly occurred in gardens adjacent to the forest, while barred buttonquails Turnix suscitator were associated with gardens far (>1 km) from the forest. Several species (civets Viverricula indica and Paradoxus musangus javanicus , Horsﬁeld’s treeshrew Tupaia javanica , Javan ferret badger Melogale orientalis , Javan mongoose Herpestes javanicus ) were not inﬂuenced by shade cover and distance to the forest, suggesting they are well adapted to the agroforestry system. Still, species of high conservation importance, such as Javan leopard Panthera pardus melas , Sunda porcupine Hystrix javanica , and grizzled langur Presbytis comata , were present in the forest but not in the agroforest, suggesting that the replacement of the forest by the agroforestry matrix is still detrimental. Nevertheless, it is important to maintain the complexity of the agroforestry system and connectivity with the neighbouring continuous forest to favour the long-term sustainability of this environment and the conservation of endemic species.


Introduction
Tropical ecosystems host most of the global diversity and offer important ecosystem services that are beneficial to local communities [1,2].Many tropical ecosystems, however, are threatened by environmental alterations due to human activities [3].Habitat shift to agriculture is the main threat for tropical ecosystems and will be even more impacting in the future [2,4].The main challenge is to promote sustainable farming practices that can provide economic and social benefits to local communities and protect ecosystem services at the same time [2,5].Two main strategies are adopted to meet the growing demand for agricultural expansion whilst also reducing its effect on ecosystems: land sparing and land sharing [5,6].Land sparing involves concentrating high yields in specific areas and putting more effort into the protection of nearby ecosystems.Land sharing (also called wildlife-friendly farming) promotes the coexistence of crops and wildlife within the same area [7].Complex agroforestry systems formed by several strata of understory crops and shade trees that are adjacent to continuous forests are the ideal form of land sharing and can host similar biodiversity levels to continuous forests [8,9].
Coffee (Coffea spp.) complex agroforestry systems (shade-grown coffee) represent only 24% of the coffee management systems worldwide, 20% lower than in 1996 [10].This shift to more intensive management systems has been particularly evident in South-East Asia where the total production increased by at least 50% compared to the 1990s [10].Shadegrown coffee has been shown to bring benefits in terms of increased carbon sequestration, soil fertility, pest control, and pollination services [10,11].In addition, shade-grown coffee constitutes a habitat matrix that can connect forest fragments for migratory species [12,13], and/or represents a border habitat to nearby continuous forests [14].Several forest species can use adjacent shade-grown coffee to obtain key resources or as corridors [14,15].From a conservation perspective, it is important to understand the taxon-specific use of the shadegrown coffee in relation to the distance to continuous forests to improve the planning of conservation interventions.
Camera traps are important tools to estimate detection rates of wildlife, especially of cryptic and rare species [16][17][18].Camera traps can also reveal detailed information about animal behavioral ecology such as social interactions and activity patterns [16].Camera trap data can allow the estimation of population densities, although individual recognition is not always possible; therefore, detection rate (i.e., number of independent photographs taken over a certain time) has been used as a proxy of relative abundance [19].Camera traps, thus, represent a suitable tool to compare relative abundance between different habitat types and environmental conditions [20].
We aimed to determine the influence of garden complexity (sun-exposed vs. shadegrown coffee) and distance to the forest on the detection rates, revealed via camera traps, of terrestrial vertebrates in coffee home gardens in West Java, Indonesia.We have worked in the area since 2012 and have identified ten mammal species that regularly use the agroforestry habitat [21].Indonesia is the fourth largest coffee producer [22], and one of the 17 megadiverse countries in the world, and a biodiversity hotspot with many endemic species at risk of extinction [23].Still, relatively few studies have investigated the impact of different coffee management systems on biodiversity in the Indonesian context.This is a huge gap in the knowledge considering that the response to different management systems is taxon-specific, with the need to consider regional and environmental variables [24].We predict that, overall, species would be detected more frequently in shade-grown than in sun-exposed coffee gardens and that detection would be higher close to the forest, although we expect taxon-specific differences.Several species of civets and other non-threatened carnivores, for example, are known to adapt to human-modified habitats [25], thus we expect no preference in terms of habitat use.Other carnivores, such as leopard cats, have been suggested as an indicator of forest disturbance [26], thus we expect a preference for the forest and also shade-grown gardens close to the forest.

Study Site
We collected data in an agroforestry environment, adjacent to a continuous forest, in the municipality of Cipaganti, Cisurupan District, Garut Regency, West Java, Indonesia (7.2786 • S, 107.7577 • E; elevation ~1350 m a.s.l.; a detailed description is provided in [27]).The adjacent forest is part of the Western Java montane rainforests ecoregion.The site is near Mt Puntang, which is part of the mountain range containing the active volcano Mt Papandayan.The area consists of an agroforestry system of interconnected crops usually separated by trees and with trees planted inside gardens [27,28].Nearly 400 small-holder coffee gardens are present in the area.We sampled a subset of randomly chosen gardens to have an equal number of sun-exposed and shade-grown ones.We considered the gardens with no shade trees or with very sparse shade cover mainly given by trees at the border of gardens as sun-exposed gardens.Shade-grown gardens were those with diverse shade tree species mixed in with coffee plants.

Data Collection
We installed camera traps in 11 shade-grown and 12 sun-exposed gardens between April 2018 and March 2021.The mean survey effort was 318 (SD = 91) days per garden, for a total of 3856 days in shade-grown and 3338 days in sun-exposed gardens.We considered distance from the nearest forest edge and calculated it in ArcGIS v 10.7.1.Gardens were at different distances (mean: 1016 m; range: 50-1990 m) from the nearest edge of the adjacent continuous rainforest, with which they are connected by a series of home gardens and bamboo forest patches.The further gardens were in proximity to the village.We also collected data in the nearby forest (control group) via two camera traps between 20 June 2017 and 20 August 2019 for a total of 1183 sampling days.We placed the camera traps inside the forest at around 50 m from the forest edge, just outside the border delimiting the protected area (cagar alam).We used heat motion-triggered infrared cameras (Bushnell HD, model 119836, Overland Park, KS, USA) to monitor animal use, set up to take three photographs per capture with a 3 s delay.We set the sensor level on automatic mode, meaning the sensors can switch from low, to mid, to high sensitivity based on the weather as it is the suggested setting to obtain reliable camera trap detections in areas with high climatic variability.We inserted cameras into metal cases placed at around 0.5 m off the ground, tied to trees with wire and locked to prevent theft.We swapped batteries and SD cards every one to two months.We considered a separate encounter when the picture taken on the same species was not temporally dependent, considering a threshold of one hour [29].We set the camera traps in similar conditions and in a standard way, ensuring that the visibility in front of the camera was similar (e.g., no obstruction from close trees or bushes).We considered, however, that the maximum detection distance might still change, and we calculated the maximum detection distance from where the animals were detected for each camera trap.K. Hedger estimated this distance (in meters) based on known distances from camera traps to landscape features.It is thus a consistent estimate from the same observer.

Data Analysis
In this analysis, we focused on terrestrial mammals and birds.We were not able to identify small rodents (i.e., murids and squirrels; the Sunda porcupine Hystrix javanica was considered separately) in most of the photos and we thus grouped them together.For nonterrestrial taxa, we only present descriptive data on the Critically Endangered Javan slow loris Nycticebus javanicus, which is a focal species of our project [30].We used 95% Confidence Intervals (CI) to compare the detection rates in coffee gardens and the detection rates in the forest.We used Generalized Additive Models (GAMs) to test the influence of home garden complexity (sun-exposed vs. shade-grown) and distance to the forest (i.e., distance between camera trap locations and the nearest edge of the forest) in shaping the encounter rates (individuals encountered per day) of the mammal species detected via camera traps.We ran the models via the "gam" command in R 4.0.4package "mgcv" [31].We used GAMs as they provide a flexible approach by not assuming a linear or another parametric form of relationship a priori and can be used to reveal and estimate non-linear effects of covariates (distance to the forest) on dependent variables [32].We used the full restricted maximum likelihood method for the model selection [32].We used a quasibinomial distribution for the dependent variables (detection rate-individuals detected per day per field) since the values ranged from 0 to 1.We used the sampling effort (log10 of days of observation) as weight in the analyses to account for the different sampling efforts for each field.The maximum detection distance ranged from 3.0 to 10.0 m, with a mean of 5.2 (SD = 1.7) m.The maximum detection distance was similar between different habitats (forest: 4.5 ± 95% CI 2.5 m; shade gardens: 5.3 ± 95% CI 1.6 m; sun gardens: 5.3 ± 95% CI 0.9 m).We thus included the maximum detection distance as a predictor in the models to account for the different visibility in front of camera traps.To test for spatial and temporal associations among species, we ran a correlation matrix via the "cor.mest"function in the package "corrplot" and corrected the p-value via the Bonferroni-Holm method in the "p.adjust" function [33].For all the analyses, we considered p = 0.05 as the threshold level for significance.

Detection Rates
We detected ten mammal species (excluding small rodents) and barred buttonquail Turnix suscitator in the coffee home gardens (Table 1).We detected the small Indian civet Viverricula indica most frequently.It was present in most of the coffee gardens (82.6%) with presence not related to garden complexity or distance to the forest and higher detection rates in coffee gardens than in the forest (Tables 1 and 2).Another civet species, the Javan palm civet Paradoxurus musangus javanicus, was also present in most of the fields but was encountered less frequently and its detection rate was similar between coffee gardens and forests.We frequently detected wild boars Sus scrofa, but they were only present in 39.1% of gardens and their detection was influenced by their distance to the forest (mainly encountered in gardens within 500 m from the forest; Table 2; Figure 1).We often recorded wild boars in groups ranging from two to five individuals in coffee gardens, and groups of up to nine individuals in the forest.We detected Sunda leopard cats Prionailurus javanensis more frequently in shade-grown gardens with higher complexity (Table 2; Figure 1).We mainly detected barred buttonquails in proximity to the village, and rarely detected them within 1000 m of the forest.The detection rates of small rodents and yellow-throated martens Martes flavigula were significantly higher in the forest than in coffee gardens.We detected Javan leopards Panthera pardus melas, grizzled langurs Presbytis comata and Sunda porcupines Hystrix javanica in the forest but not detected in coffee gardens (Table 1).

Spatial and Temporal Correlations
The detection rates of small rodents were spatially correlated to the detection rates of Javan palm civets (r = 0.586) and Javan mongooses (r = 0.617).The detection rates of small Indian civets were temporally correlated to the detection of Javan palm civets (r = 0.770) and small rodents (r = 0.504).There were no other significant spatial or temporal relationships between detection rates.Barred buttonquails, Horsfield's treeshrews, and Javan mongooses were strictly diurnal, while the other species were detected almost exclusively at night, with just a few detections during the day (Figure 2).The detection rates of small rodents were spatially correlated to the detection rates of Javan palm civets (r = 0.586) and Javan mongooses (r = 0.617).The detection rates of small Indian civets were temporally correlated to the detection of Javan palm civets (r = 0.770) and small rodents (r = 0.504).There were no other significant spatial or temporal relationships between detection rates.Barred buttonquails, Horsfield's treeshrews, and Javan mongooses were strictly diurnal, while the other species were detected almost exclusively at night, with just a few detections during the day (Figure 2).

Discussion
Contrary to our predictions, the detection rates of most of the species were not affected by the management system or distance to the forest, although several species were

Discussion
Contrary to our predictions, the detection rates of most of the species were not affected by the management system or distance to the forest, although several species were detected more frequently either in the forest or in coffee gardens.There were also three species (Javan leopard, Sunda porcupine, and grizzled langur) that were exclusive to the forest, thus suggesting that the replacement of the forest by the agroforestry matrix can be detrimental to most of the species except the ones that are more adaptable.Of the species present in the agroforestry matrix, wild boar was the only species that was detected more frequently in the proximity of the forest than in the other fields close to the village, where the detection rate was close to zero.This might be the consequence of the common practice of hunting wild boar since they are considered to be pests as they destroy crops [34,35].They are also the main commercial meat in some regions of Indonesia where Christians and Hindus are present [34].Even though the people in our study area are almost exclusively Muslim, there is a market for wild boar meat in nearby large cities such as Bandung and Jakarta.This hypothesis, however, might not fully explain the pattern found in the study area as hunting is very limited after almost ten years of conservation efforts resulted in a complete hunting ban approved in 2020 [27].It is possible that wild boar might need to habituate to the reduction in hunting and might be detected close to the village in the near future.The more likely hypothesis, however, is that wild boars prefer forested habitats and only visit gardens close to the forest in search of food, as confirmed by the significantly higher detection rates in the forest.Barred buttonquails, conversely, avoided fields close to the forest, possibly indicating an avoidance to diurnal predators, such as eagles, that are more present in the proximity of the forest [36].
Significantly more detections of leopard cats were registered in shade-grown gardens but they were homogeneously present in both forest and agroforest matrices.Unprotected agroforestry systems are predicted to represent the majority of the habitat where Sunda leopard cats can be detected, although they are expected to prefer forested areas [37].Irawan et al. [37] further indicated the importance of the agroforestry matrix in the proximity of protected forests for Sunda leopard cats.While no information is presently available on the home range of Sunda leopard cats, leopard cats in other regions can have large home ranges, from 1.4 to 37.1 km 2 [38,39].These data suggest that the range of single individuals can potentially encompass both forest and agroforest, where they can find more prey, although we do not have direct support for this hypothesis.Leopard cats may extensively use the agroforestry matrix thus avoiding competition with other species, such as leopards, but they still prefer gardens with higher complexity.
The agroforest habitats can also bring benefits to the species that were detected exclusively in the forest.The agroforestry matrix, in fact, can act as a buffer zone to reduce the human pressure on the forest, reduce human-wildlife conflicts, and help maintain ecosystem services [40,41].For example, the Critically Endangered Javan leopard, the remaining largest carnivore in Java, is predicted to be mainly present in primary forests.MaxEnt modelling, however, suggested that human-modified landscapes adjacent to the primary forests are of paramount importance [42].The populations of Javan leopard are very fragmented and isolated, and creating opportunities for connecting them via agroforestry matrices can be pivotal for their survival [42].Still, there are reports of leopards killed when moving far from the primary forests [43]; thus, ensuring regulation of hunting pressure in buffer zones is critical.The Endangered and largely arboreal grizzled langur is restricted to the western part of Java, where it is found from sea level up to 2500 m a.s.l.[44].It is fully dependent on the last remaining patches of natural forest, but it still can come into conflict with humans there where the forest abuts the agroforests or forest plantations.Conflicts can arise if they raid crops in the agroforestry environment, as is indeed reported in other sites [45,46].Although we did not report grizzled langurs in coffee gardens, it is possible that they forage on other crops (e.g., fruit trees) in proximity to the forest and we did not detect them with our camera traps.There are surprisingly few data on the distribution and habitat use of the Sunda porcupine on Java, but camera trapping studies do suggest they are occasionally found in more open or regenerating habitats over a large altitudinal range [47][48][49][50].
There is a general idea that a reduction in vegetation complexity in crops is harmful to native species.We found, however, that the detection rates of the two species of civets, the Javan ferret badger, the Javan mongoose, and the Horsfield's treeshrew were not significantly influenced by shade cover or distance to the forest.There, species might be attracted by the presence of fruit and insects in the agroforestry environment and the variety of different crops and fruit trees present in the home gardens.Civets in particular are known to be attracted by several crops and fruit trees [51].Their detection rates were also temporally and spatially related to the detection rates of small rodents, an important food item for civets when fruit is scarce [52].Small rodents were more abundant in the forest than in coffee gardens, but civets might prefer to hunt them in the gardens to avoid competition with leopards.Several species (barred buttonquail, Horsfield's treeshrew, Javan palm civet, Javan ferret badger, Javan mongoose) are well adapted to agroforestry systems and are not influenced by the complexity of gardens, so species-specific differences should be considered.For example, in cocoa agroforestry systems in the proximity of a patch of Atlantic forest in Brazil, only one mammal species out of three was influenced by the vegetation complexity of the agroforestry system [53].It is important to note that our results are based on an agroforestry system with high connectivity as it is formed by a matrix of shade-grown and sun-exposed gardens normally connected by trees at the border, interconnected with several patches of bamboo forests, and nearby a continuous forest.Animals are, thus, relatively free to move between gardens.
The agroforestry matrix in the study area supports a high diversity of pollinators and hosts several other key species, such as several threatened species of songbird [54,55].In addition, local communities banned hunting practices in the area in 2020, although hunting was common in the past, particularly for the pet trade [27,56].It is thus pivotal to keep the relationships with the local communities via conservation education and outreach initiatives to avoid a new spread of hunting activities [40].Given the high value of this agroforestry matrix that hosts threatened species and provides a buffer zone for populations living in the nearby montane rainforest, it is also important to maintain the complexity of the agroforestry system and connectivity with the forest to favor the longterm sustainability of this environment.
We have to note that the approach of using detection rates from camera traps as a proxy of animal abundance is not always advised, considering that this relation is only valid under the assumption that movements remain constant across densities [57].We were, however, not able to identify the individuals or to obtain enough information on animal movements of the different species object to this study to analyze the data in a more robust way.We did not attempt the camera trap distance sampling method (CTDS; [58]) as with our reduced sample size in terms of locations of camera traps the coefficient of variation would have been too high [59].Additionally, one of the main limitations in the use of CTDS can be the delay between the time the sensor is activated and the time the first image is recorded [58].Since we set the cameras to record at an automatic sensor level, we believe that this would have biased the estimates via CTDS as the trigger speed in automatic mode varies depending on the weather.We still think that the data presented are an important contribution to literature as detection rates are often used to compare animal use of different habitats or general spatial and temporal trends (reviewed in [57]), as we used in this paper.Furthermore, almost no systematic published data are available on Java for most of the species presented here, and such data provide a valuable starting point for further studies.

Conclusions
We found that an agroforestry matrix in proximity to a continuous forest has the potential for increased biodiversity; it was used by at least ten mammal species.Most of these detections were not dependent on distance to the forest or the presence of shade trees.This indicates that the matrix of gardens interconnected by border trees and small forest patches can sustain high levels of biodiversity, at least for small to medium-sized mammals.The forest maintains higher species richness, but the agroforestry matrix proved very important for several species that were either detected more often in coffee gardens (small Indian civet) or equally detected in coffee gardens and forests (barred buttonquail, Horsfield's treeshrew, Javan palm civet, Javan ferret badger, Javan mongoose, and Sunda leopard cat).The agroforestry matrix can also be beneficial as a buffer zone for the species that were detected exclusively in the forest (Javan leopards, grizzled langurs and Sunda porcupines).The forest, however, cannot be fully replaced by the agroforestry matrix as key species for conservation would disappear.Funding: This research was funded by Augsburg Zoo, Brevard Zoo, Cleveland Zoo and Zoo Society, Columbus Zoo and Aquarium, Disney Worldwide Conservation Fund, Global Challenges Fund Initiative-Oxford Brookes University, International Primate Protection League, Lee Richardson Zoo, Mohamed bin al Zayed Species Conservation Fund (152511813, 182519928), Margot Marsh Biodiversity Fund, Moody Gardens Zoo, National Geographic (GEFNE101-13), NaturZoo Rhein, People's Trust for Endangered Species, Primate Action Fund, San Francisco Zoo, and Shaldon Wildlife Trust.

Institutional Review Board Statement:
The study was conducted according to the guidelines of the Declaration of Helsinki, and approved by the Animal Ethics Subcommittee of Oxford Brookes University (12OxbansceA2719).The study was authorized by RISTEK in Indonesia (research permit 24/FRP/E.5/Dit.KI/I/2019).

Figure 1 .
Figure 1.Significant results from the Generalized Additive Models (GAMs) shown in Table 2. Data are based on detection rates from camera traps in 23 coffee home gardens in an agroforestry environment in West Java, Indonesia.Shaded areas represent 95% CI. (a): We encountered Sunda leopard cats more frequently in shade-grown gardens than in sun-exposed gardens (represented via box

Figure 1 .
Figure 1.Significant results from the Generalized Additive Models (GAMs) shown in Table 2. Data are based on detection rates from camera traps in 23 coffee home gardens in an agroforestry environment in West Java, Indonesia.Shaded areas represent 95% CI. (a): We encountered Sunda leopard cats more frequently in shade-grown gardens than in sun-exposed gardens (represented via box plots embedded in violin plots); (b): We encountered wild boar in gardens up to 500 m from the forest (represented via smooth term from GAM results); (c): We detected barred buttonquail more frequently at distances further than 1500 m from the forest.

Figure 2 .
Figure 2. Proportion of detections (total number in parenthesis) per time of the day of the species detected by camera traps in 23 coffee home gardens in West Java, Indonesia.

Figure 2 .
Figure 2. Proportion of detections (total number in parenthesis) per time of the day of the species detected by camera traps in 23 coffee home gardens in West Java, Indonesia.
acquisition, M.B. and K.A.I.N.All authors have read and agreed to the published version of the manuscript.

Table 1 .
Detection rates of species in camera traps in 23 coffee home gardens in an agroforestry environment and the adjacent rainforest (2 camera traps) in West Java, Indonesia, between April 2018 and March 2021.

Species Detection Rate Per Coffee Home Garden (Ind./Day) Detection Rate Forest (Ind./Day)
* Detection rate significantly higher based on 95% CI.

Table 2 .
Results of the Generalized Additive Models with the encounter rate of species (individuals/day) as a response variable and coffee home garden complexity (sun-exposed vs. shade-grown) and distance to the forest as predictors.Maximum detection distance is a control variable to account for the different visibility in front of camera traps.The response variables were fit to quasibinomial distribution.Data are from camera traps in 23 gardens from April 2018 to March 2021.