Exposure to Anthropogenic Activities and Age Class Mediate Movement-Explicit Habitat Selection of A Mesocarnivore in A Human-Dominated Landscape

Background: Wildlife populations are increasingly challenged by human activities that disrupt landscape connectivity and animal movement, and thus population dynamics and persistence. Yet modied habitats may provide resource subsidies for generalist species resulting in increased selection of disturbed areas. Understanding how species adjust their space use and activity in human-modied landscapes is increasingly critical to conserving wildlife populations globally. Methods: To test three competing hypotheses explaining spatiotemporal responses to human activity, we GPS-collared 26 individual adults and subadults from three contiguous subpopulations in wildland and urban-dominated regions. We investigated coarse (3 hour)- and ne (20 minute)- scale movement-explicit habitat selection using step selection functions and tested for increased nocturnality of caracals (Caracal caracal) in a human-dominated landscape in South Africa. Results: Caracals in a wildland-dominated landscape were on average > 8.0 km from the urban-natural boundary and strongly selected for proximity to the coastline. Caracals in the urban-dominated landscape were on average <500 m from the urban-natural boundary, yet strongly avoided areas within the urban matrix itself while selecting for close proximity to the urban-natural boundary. Caracals avoided vegetative cover in the wildland-dominated region but selected for vegetative cover in the urban-dominated region, likely to conceal themselves from detection by humans. Selection responses for vineyards, freshwater, the coast, and burned areas was dependent on age class, diel period, and whether individuals were in close proximity to urban areas. Caracals inhabiting the urban-dominated region did not shift their temporal activity patterns to avoid contact with humans, but they selected for closer proximity to urban areas at night, suggesting they seek spatial refugia during the day. Conclusions: Behavioral plasticity whereby individuals seek out spatial, but not temporal refugia, appears to promote the coexistence of this generalist carnivore in a human-dominated landscape. Both age class and degree of exposure to anthropogenic activities inuence habitat selection, while some individuals have learned to successfully exploit the riskiest areas at night. These data are essential to our understanding of what is viable wildlife habitat in this rapidly urbanizing landscape and provide opportunities to guide land acquisition and conservation guidelines by local management agencies. and wildland-dominated regions. We report a weighted mean log RR with weights assigned according to the inverse variance of each replicate, the proportion of replicates for which nocturnality was greater in the population in the urban-dominated region, and the 95% bootstrap condence interval based on the 25 th and 95 th greatest RRs. To interpret our results of these analyses, we back-transformed mean effect sizes and converted to unlogged risk ratios to assess percent shift towards nocturnality in areas of high risk. We assessed signicance using condence intervals – those that overlapped zero were not signicant.

selection and spatial avoidance of human activity depends on the speci c behavior under consideration (e.g., forage, rest, reproduce, defend territories, disperse, [6,20,21]), while movement itself enables animals to [22] ful ll these needs [20,22]. Functional responses (adjustments in selection of a resource or landscape features as a function of changes in the availability of that resource or particular landscape features) can reveal whether animals perceive particular habitats as risky and provide insight into the cumulative effects of anthropogenic development on wildlife populations [23], and spatial distribution dynamics [24,25]. Coupling behaviors with spatial locations to understand behavioural responses to heterogenous landscape features is essential to de ne habitat suitability, which can be incorporated into land-use planning [26].
Studies examining wildlife habitat selection, occupancy, and activity in human-dominated landscapes have frequently found that wildlife species may mitigate anthropogenic disturbances by partitioning space, time, or microhabitats [19,27,28]. By segregating the landscape spatially, sometimes at ne-scales [18,[29][30][31], species can avoid direct spatial overlap with humans. Yet spatial refugia are not always available, and thus animals may avoid diurnal human activity through increased nocturnality (reviewed in [27]). A growing body of literature is demonstrating that the presence of well-vegetated microhabitat can facilitate landscape use by wildlife even in areas with high human activity through mitigating the risk of detection [19,28,32].
Defaunation in the Anthropocene is a non-random process. Large-bodied carnivores with substantial spatial requirements and low recruitment rates are often the rst species to be extirpated in disturbed habitats [33,34]. This relative sensitivity to human disturbance is multifaceted, but loss of prey [35] and both direct and indirect human-induced mortality [8] likely play important roles in their extirpation.
Mesocarnivores may also have large spatial requirements, low density populations [33], and suffer frequent mortality linked to human-activities [8,36], but they are notorious for their ability to persist, and even thrive, in human-dominated landscapes [37]. Often the success of mesocarnivores is simplistically attributed to a release from top-down processes (i.e., 'mesopredator release'), although evidence for this is in human-impacted systems is mixed [38,39]. Rather, in human-dominated systems with altered ecosystem dynamics, this success may also be mediated by habitat heterogeneity and resource abundance [40][41][42].
Here we investigate the behavioral response of a mesocarnivore to the interrelated effects of anthropogenic development and ecological variation in a fragmented, dynamic (e.g. re-prone) landscape isolated by dense urbanization in the City of Cape Town, South Africa. The caracal (Caracal caracal) is a medium-sized, ecological generalist, and is widely considered a con ict species across southern Africathey are particularly reviled in small livestock farming areas where they thrive [36] despite being heavily persecuted for livestock losses (e.g. [43]). Recent studies con rm the persistence of caracals in large protected areas adjacent to urban areas [44,45], small reserves surrounded by urban development [46], and within heavily modi ed residential estates [47], which may act as an ecological trap where they are exposed to pathogens [48] and poisons [45]. These studies point to both risks and rewards to life on the urban edge for caracals.

Study area
We assessed habitat selection and activity of free-ranging caracals on the Cape Peninsula and within a small nature reserve (False Bay Nature Reserve, Fig.1a), both of which are isolated from other populations by dense residential and commercial development within the municipal limits of the City of Cape Town (Fig. 1a). The City of Cape Town has an average population density of 1,530 people/km 2 (Statistics South Africa Census 2011, statssa.gov.za/). Within the Cape Peninsula, we primarily sampled individuals in Table Mountain National Park (TMNP), which encompasses approximately 320 km 2 of fragmented, natural habitat, which we split into two regions (Fig. 1).
The 'urban-dominated region' of the study area comprises ve habitat patches that encompass 187 km 2 (northern half, Fig. 1), 78.4% of which is bordered by urban area. We sampled two additional individuals in an urban-dominated region within the small fragmented False Bay Nature Reserve (comprising <3 km 2 ) surrounded by an extremely densely populated region of Cape Town (Cape Flats human population densities: 9 ,000-17,000 people/km 2 ). The 'wildland-dominated region' (southern half, Fig. 1) encompasses 133 km 2 , 46.2% of which is bordered by urban area. This region consists largely of contiguous protected national park areas and small patches of vineyards (3.9%). In both regions, land uses include low to high density urban development, light industrial and commercial areas, golf courses, vineyards, eucalyptus stands, and pine plantations (urban-dominated region only). The fynbos biome dominates the natural areas of both the urban-and wildland-dominated regions and is comprised of extremely diverse, low-growing, dense shrubland with a re-dependent ecology [49]. Across the study period, 35.2% of the available wildlife habitat in the study area intensively burned. Extensive coastal sand dune elds are also a common natural feature throughout the study area.

Capture and GPS-collaring
We sampled 29 caracals spanning the period 2014-2016. Individuals were sampled throughout the urbandominated region, while in the wildland-dominated region, our permits constrained sampling to the southern-most location (Cape of Good Hope Nature Reserve, Fig. 1a) furthest (15.8 km) from urban development in our study area. Captured animals weighed a minimum of 6 kg so that the collar weighed no more than 3% of the animal's body weight. Individuals were chemically immobilized, and we recorded age class, sex, weight, and morphological measurements. Individuals were classi ed as subadults (<2 years) or adults (>2 years) based on body size, weight, tooth wear and eruption, and reproductive status [50]. Individuals were t with Tellus 1C collars (Followit TM , Lindesberg, Sweden) that collected GPS locations at three-hour intervals throughout the 24 hr cycle. To assess ne-scale movement patterns and the use of potential movement corridors through urban areas, we increased the GPS-sample rate to 20minute intervals every 10 th day for 24 -36 consecutive hours (resulting in a target of 72-96 consecutive locations). Collar data were downloaded via that FollowIt™ GEO web interface or obtained directly from collars after units dropped-off. Collars were equipped with both a timed drop-off mechanism and a rot-off cotton spacer to ensure eventual drop-off.

Landscape covariates
Caracals primarily used undeveloped habitat patches with intact shrubland vegetation (hereafter 'natural areas'), and to a lesser extent, areas within the fully transformed urban matrix (consisting of commercial, industrial, residential, and altered open areas). Therefore, to capture the in uence of the urban matrix on caracal habitat selection, we used distance measure (URBAN.DIST) that fell along a continuum of negative to positive values, where 0 indicated the line (in our GIS layer, Supplemental Table S1) demarcating the urban matrix-natural area boundary (hereafter 'urban-natural boundary'). Negative values represented the distance inside the urban matrix measured from the urban-natural boundary whereas positive values represented the distance into natural areas measured from the urban-natural boundary. We also tested whether the availability of COVER in uenced URBAN.DIST selection (COVER x URBAN.DIST).
To control for the relative in uences of both natural and anthropogenic landscape features on caracal habitat selection (modelling approach described below), we tested the in uence of a suite of natural features including topography (SLOPE, ELEVATION), distance from freshwater (WATER.DIST) and coastline (COAST.DIST), and whether individuals were located within sand dune elds (DUNES). We used three different measures of vegetation: i) Cover (COVER, binary), ii) normalized difference vegetation index (NDVI, continuous), and iii) habitat burn intensity (BURN, normalized burn ratio 2 [NBR2], continuous). Vegetative COVER was an indicator variable (high cover: intact fynbos, vineyard vines, pine plantations, etc., low cover: bare ground, beaches, manicured grass lawns, etc.).
Because of frequent wild res, we attempted to sample NDVI and NBR2 covariates within a two-week time point of each GPS-point (matching the frequency of Landsat Spectral 8 updates, usgs.gov) although in some cases, daily cloud cover precluded our ability to do so. Thus, for all locations, we extracted the nearest time point for which information was available (Supplemental Methods). The median time difference between location date and vegetation index date was seven days for 3-hour x intervals (mean = 23 days, SD = 27) and six days for 20-min x intervals (mean = 19 days SD = 26).
Other anthropogenic landscape features included pine plantations (PINE), eucalyptus stands (EUCALYPTUS), vineyards (VINEYARDS), and distance from arterial roads (ROAD.DIST, high tra c primary and secondary roads [51]). In the wildland-dominated region, ROAD.DIST and URBAN.DIST were highly colinear (VIF > 20). We thus used only URBAN.DIST in model-tting.
Each categorical variable was converted to indicator covariates (VINEYARD, EUCALYPTUS, PINE, DUNES, COVER). All covariates were standardized (mean = 0, standard deviation = 2, [52] with the exception of URBAN.DIST in the urban-dominated region, which was standardized by two standard deviations because the URBAN.DIST distribution for available locations (see modelling approach below) was disproportionately skewed towards negative values. Importantly, this method of standardizing URBAN.DIST did not change the selection coe cients that resulted from models; rather this standardization approach to aid in our ability to create representative plots of the relative probability of selection for URBAN.DIST (e.g., Fig 2). We calculated variance in ation factors (VIF) to ensure that no two covariates were strongly colinear (VIF ≤ 3.0 in all cases, [53]). Further details for each covariate are reported in the Supplemental Methods and Supplemental Table S1.

Movement-explicit step selection functions
We analyzed movement-explicit habitat selection using step-selection functions (SSFs [54]). To ensure we used only movement relocations, we ltered consecutive GPS-locations to have ≥50-meter step lengths (for both 3-hour and 20-min x intervals) because, for both x intervals, a 50-meter step length was the validated criteria for classifying GPS-clusters that formed when caracals in our study area were explicitly engaged in feeding or resting [44].
Caracals in the urban and wildland-dominated regions were subset for analyses because: i) there were stark contrasts in the degree of fragmentation by urbanization in the two-regions and sampling approach (described above), and ii) the distribution of the distance of available points from the urban matrixnatural boundary also varied substantially (Supplemental Table S2). Caracals were thus split into three subgroups: i) ve adults in the wildland-dominated region, ii) seven subadult males in the urbandominated region, and iii) 14 urban adults in the urban-dominated region. Two subadult females in the urban-dominated region were included in the adult group because, unlike subadult males, they moved and used the landscape similar to adult females in their respective areas. Speci cally, their median step length and their average distance from urban-natural boundary were similar, and for the one subadult female for which we were able to assess home range, her home range extensively overlapped the adult female in the same area (Serieys, unpubl.data).
We performed SSFs on both 3-hour and 20-min interval data separately using a 1:20 match-case control empirical design. Strata were created where each individual's end 'used' location (t) was paired with 20 'available' locations [55,56]. 'Available' locations were created using random vectors originating from the location immediately preceding 'used' location t (i.e., location t-1 ). Random vectors were drawn based on the empirical distribution of turn angles and step lengths between consecutive locations derived from data on all individuals that were the same sex and age group as the focal individual but excluding the focal individual to avoid circularity [56]. For both x intervals, three resource-independent movement parameters (STEP, LOG.STEP, and DIR.PERSIST) were calculated for all steps within each stratum to control for inherent biases in animal movement that in uence habitat use [6,55,57,58]. For the ne scale 20-min interval data subset, we additionally calculated terms to control for potential tendency for movement along the same topographic gradient (SLOPE.PERSIST). See Supplemental Methods for more details about these behavioral parameters.
To correct for autocorrelation inherent in movement datasets, we calculated robust standard errors for selection coe cients using generalized estimating equations (GEE [59][60][61] by specifying intra-group ('cluster') correlation [59,61]. To specify clusters, we used a destructive sampling approach described by [61] which required that we rst estimate the time lag past which temporal autocorrelation between successive caracal locations is no longer signi cant (α = 0.05). We t an intercept-only mixed-effects model [57] and plotted the autocorrelation function of the model (Supplemental Fig. S1). Autocorrelation decayed after a lag of 54 hours.
We collected data during 31 collaring events from 25 unique individuals. Prima et al. [61] recommend a minimum of 20 clusters per analysis group. Thus, we destructively sampled our data (by removing 54 hours of data between successive clusters) resulting in 1-6 clusters per collaring event (31 adult and 27 subadult male clusters in the urban-dominated region, and 24 adult clusters in the wildland-dominated, range: 13-92 days/cluster). Because 20-min data collection occurred every 9 th -10 th day, we assigned clusters according to the individual ID and consecutive period of collection, resulting in a total of 277 clusters. To assess whether habitat selection varied with differing degrees of exposure to human activities, we divided our data into diel period based on local sunset and sunrise times. We de ned night as the period when the sun is at least 9 o below the horizon.
We estimated selection (ß) coe cients using the coxph function in the survival package [62] for R statistics software [63]. A primary objective was to evaluate the relationship between proximity to the urban matrix and habitat selection. Thus, we built our modelling framework around the URBAN.DIST covariate. We had two a priori expectations regarding the relationship between URBAN.DIST and caracal habitat selection: i) the relationship may be non-linear, and ii) the relationship may differ between caracals in the wildland-dominated vs. urban-dominated regions. Thus, for all subgroups, we rst evaluated whether the relationship was best-captured using a simple linear, quadratic-transformed, logtransformed URBAN.DIST, or a segmented linear spline regression approach.
The segmented linear spline regression approach split the distance from the urban-natural boundary into two (or three) covariates with different slopes on either side of a breakpoint [64]. We selected the optimal breakpoint (hereafter 'knot') using a grid search approach by comparing quasi-likelihood under independence criterion (QIC) scores of candidate spline models (Supplemental Fig. S2) and selecting that with the lowest QIC. QIC is a criterion suggested by [59] as best for comparing model performance in GEEbased analyses.
We tested candidate knot values at one meter intervals ranging between the minimum and maximum standardized distances from the urban-natural boundary. At the scale of one meter intervals, multiple well-supported knots were identi ed (∆QIC < 2) but the difference in distances among the well-supported knots was trivial (< 10m). Thus, we averaged well-supported candidate knot values to obtain a single value. To validate the use of segmented regressions, we performed the segmented regression approach on each caracal subgroup and compared the segmented model QIC with models with a simple linear, logtransformed, or quadratic-transformed distance from the urban-natural boundary. The segmented approach performed best for caracal subgroups in the urban-dominated region, whereas the quadratic transformed distance performed best for caracals in the wildland-dominated region.
Next, for each caracal subgroup in the urban-dominated region, we split their data according to diel period, and performed the same grid search approach to determine whether the optimal knot shifted for each diel period. Subadults and adults thus had three knot values each (day, night, composite [day and night] dataset), ranging between 44-153 m from the urban-natural boundary. These values indicate that there exists a narrow (natural area) buffer zone around the urban matrix that caracals perceive as equal to the urban matrix itself (Fig. 2a-c). We hereafter refer to the urban matrix and the surrounding narrow, natural buffer zone as the 'urban interface.' For caracals in the urban-dominated region, we next considered that the relative probability of selecting certain landscape features was dependent on where individuals encountered this feature (urban interface vs. natural area). We considered this possibility for candidate covariates PINE, BURN.INDEX, COVER, ELEVATION, WATER.DIST, and COAST.DIST (hereafter 'split' covariates). We predicted the potential for split PINE, BURN.INDEX, and COVER because these features are indicative of available vegetative concealment that may be more strongly selected (i.e., COVER) or avoided (i.e., PINE, BURN.INDEX) within the urban interface where concealment would mitigate detection risk. Within the urban interface, we predicted that the relative importance of ELEVATION would diminish substantially. WATER.DIST within the urban interface may be linked with increased opportunity to nd urban-associated prey (e.g., Egyptian geese, Alopochen aegyptiaca [44]). Finally, we considered a split potential for COAST.DIST because we predicted that caracals would avoid coastline closely bordered by residential or commercial development. We did not consider a split potential for NDVI, DUNES, VINEYARDS, EUCALYPTUS, or ROAD.DIST (hereafter 'simple' covariates), because with rare exception, roads and eucalyptus were primarily located within, or in close proximity to, the urban interface, while vineyards were always directly adjacent to the urban interface. We could not think of a biological reason why selection for DUNES or NDVI would differ with proximity to the urban-natural boundary.
To adapt our modelling approach to incorporate split covariates in urban models, we created an indicator variable I, where I =1 when an individual was within natural areas, and I = 0 when individuals were located within the urban interface. This allowed us to model parameters α n representing the selection estimate when individuals were within the urban interface, and α n + ß n representing the selection estimate when individuals were within natural areas. For caracals in the urban-dominated region, we thus adapted our model as follows: w(x) = exp(ß 1 x 1 + (α 2 + ß 2 I)x 2 … ß n x n + (α n + ß n I)x n ) In contrast, for caracals in the wildland-dominated region, we calculated the relative probability of selection w for landscape covariate x using coe cients ß via the standard exponential model [65]: Finally, for each of the three caracal subgroups, diel period-, and x interval-speci c data subset, we modeled the relative probability of a caracal selecting a particular location as a function of NDVI, BURN, ELEVATION (or SLOPE, wildland-dominated ne-scale data subset), COVER, EUCALYPTUS, VINEYARD, PINE, COAST.DIST, WATER.DIST, URBAN.DIST, ROAD.DIST and interaction URBAN.DIST x COVER). For caracals in the urban-dominated region, we tested an additional interaction URBAN.DIST x ELEVATION to assess whether caracals select for proximity to the urban-natural boundary simply because the urbannatural boundary tends to be at low elevations in this region of the study area. For each subset, we t models consisting of every combination of these terms and compared the QIC of all resulting models. In cases where >1 candidate best-t model was identi ed with a ∆QIC < 2, we selected the most parsimonious model (the model with the fewest coe cients). In cases where there were two models with the same number of terms and ∆QIC < 2, we selected that with the lowest QIC to report in gures and results, and report both competing best-t models in the Supplemental Tables. For all top models, we report the selection coe cient ß, and 95% con dence intervals calculated using the robust standard errors (Supplemental Tables S3-S13).

Cross validation
To evaluate the robustness of all top (best-t) models we used 5-fold cross validation following [32,66]. We built case-control SSFs using covariates retained in the top model t to 80% of randomly selected strata. We used this model to predict w(x) scores for used and available locations from the 20% of withheld strata. For each stratum comprising used (n=1) and available (n=20) movement locations, we calculated the w(x) score which was then used to assign each location a rank of 1 to 21 (lowest to highest). We next used spearman rank correlations to compare the frequency with which the withheld used locations received each of the 21 possible rankings. We iterated this process 100 times for each top model. We report the mean and standard deviation values of Spearman correlation coe cients (r s ) across all iterations (Table 1). Models with strong predictive power exhibit mean r s values close to 1. We also report mean r s values expected under random habitat selection (i.e., if models have no predictive power [66]).

Activity in high risk areas
We assessed relative activity patterns to test whether caracals in the urban-dominated region changed activity patterns mitigate risk of detection in areas with high (lethal and nonlethal) human activity [27].
We additionally assessed whether subadults in the urban-dominated region alter activity patterns to avoid interactions with adults. We thus de ned risk as a function of whether: i) individuals utilized the urbandominated region (as opposed to the low-risk wildland-dominated region), and ii) individuals were of the subadult male demographic For risk scenario (i), we compared the activity data of four adults from the wildland-dominated region, and 12 adults from the urban-dominated region (for which we had 20-min data). For risk scenario (ii), we compared the activity data of 12 adults to the data of six subadult males in the urban-dominated region. We assessed effect size using log risk ratios ("RR", [27]) calculated from 20-min x interval data that we subsampled to one-hour intervals to reduce autocorrelation (as in [67,68]). RR is a ratio of the mean nocturnality at sites of high human disturbance to the mean nocturnality at sites of low human disturbance. We de ned each caracal observation as "active" if individuals moved ≥50 meters in the 20-minutes preceding each one-hour observation (otherwise, the time point was classi ed as "inactive"). This selected movement threshold is consistent with the threshold described above to isolate movement locations from the larger GPS dataset, and follows the approach previously described for classifying active periods based on GPS-movement data [67].
Our dataset was skewed towards more daytime than nighttime locations because 20-min data were collected for an interval of 36-hours beginning at 02:00. We thus used bootstrap resampling to control for individual effects and maintain even sampling among individuals. We sampled without replacement 24 daytime observations and 24 nighttime observations for each caracal for 1000 replications. For each replicate, we calculated the log proportion of active observations that occurred during the night for populations in both the urban-dominated and wildland-dominated regions. We report a weighted mean log RR with weights assigned according to the inverse variance of each replicate, the proportion of replicates for which nocturnality was greater in the population in the urban-dominated region, and the 95% bootstrap con dence interval based on the 25 th and 95 th greatest RRs. To interpret our results of these analyses, we back-transformed mean effect sizes and converted to unlogged risk ratios to assess percent shift towards nocturnality in areas of high risk. We assessed signi cance using con dence intervals -those that overlapped zero were not signi cant.

Sampling
We captured 29 individuals over a period of roughly 3,500 cage trap nights and GPS-collared 25 unique individuals presented in this study. Of the collared individuals, six individuals (2 adult males, 4 adult females) were captured in the wildland-dominated region, while 19 unique individuals (6 adult males, 6 females, 7 subadults) were sampled across the urban-dominated region. However, one individual in the wildland-dominated region presented a unique case. In brief, after being initially detected preying on endangered African penguins (Spheniscus demersus), the City of Cape Town and South Africa National Parks (SANParks) decided to capture, GPS-collar, and relocate her (on the day of capture) 21 km north to the urban-dominated region. We excluded the rst 23 days (during which time her movements stabilized after she established a home range, Serieys unpubl.data) of her data but included subsequent locations in SSFs and classi ed her as belonging to the urban-dominated region. As a result, we obtained data for ve individuals in the wildland-dominated region and 20 individuals in the urban-dominated region.
Individuals were collared for an average of 123.0 days (SD = 49.6, median = 132.0). Mean collar x success was 92% (median = 94%). In total, we collected data over a period of 3,812 tracking days. We collected a total of 26,292 3-hour GPS locations (Figure 1b The sparsity of adult (especially) and subadult caracal locations within the urban matrix itself suggests the matrix is suboptimal habitat, whereas natural areas were strongly preferred. However, the segmented models (speci c to caracals in the urban-dominated region) revealed that not all natural area is equal. Speci cally, a narrow buffer zone of natural area surrounding the urban matrix was avoided equally to the urban matrix itself (Fig. 2a-c). The width of this buffer zone (determined via the knot value) shifted marginally according to diel period and dataset used ( represented the functional shift between urban and natural areas, we consider these to be rough estimations given that the urban matrix itself is extremely heterogenous (e.g. commercial areas, low to extremely high density residential areas). What drove the differences between urban adult and subadult knot values is unclear, except that on the scale of 3,000 meter of available natural area surrounding the matrix, the differences between the subadult and adult knot values appears trivial (e.g., Fig. 2a).

Coarse-scale habitat selection varies across age, region, and diel period
Multiple natural and anthropogenic features heavily in uenced caracal habitat selection across the three subgroups, although unique trends emerged across subgroups (Fig. 2-7, Supplemental Tables S3-S14). We expect that the habitat selection of caracals in the wildland-dominated region (Fig. 4, Supplemental Tables S12-14) represents baseline habitat selection trends (with little human in uence). Further, in cases where the habitat selection of adults in the urban-dominated region deviates from that of adults in the wildland-dominated region, we posit these differences represent behavioral adaptations of caracals in the urban-dominated region to frequent exposure to anthropogenic activities. Selection for sand dunes was universal across all best-t models, while selection for greenness (NDVI) was near universal (with the exception of subadults at night). Overall, observed cross-validation scores were high, particularly for caracals in the urban-dominated region (Table 1). Observed r s scores for top models for caracals in the wildland-dominated region were lower, possibly as an artifact of smaller sample size, but still markedly outperformed r s values expected under random habitat selection.
In the wildland-dominated region, caracals generally avoided proximity to the urban-natural boundary, although this avoidance relaxed when cover (in close proximity to the urban matrix) was available at night. During the day, an interaction between available cover and distance from the urban-natural boundary was not in the best-t model, suggesting that irrespective of available cover, these caracals avoided close proximity to the urban matrix when human activity was highest. Proximity to the coast was the strongest driver of caracal movement decisions in the wildland-dominated region ( Fig. 4

-5,
Supplemental Tables S12-S14), although topographical covariate elevation was not in the composite or night top models, indicating that caracals selected for coastlines whether they were steep and rocky, or low sandy beaches. Indeed, caracals marginally selected for higher elevations during the day (p = 0.089), although selection for the coastline was strongest during the day. While these caracals selected for greenness (NDVI), they avoided vegetative cover, particularly at night, preferring instead open areas with high visibility. Unlike caracals in the urban-dominated region, they avoided proximity to freshwater. We were unable to assess the in uence of vineyards and eucalyptus stands in this region because neither used nor available locations fell within these land use types.
Caracals in the urban-dominated region exhibited remarkably different trends in habitat selection, with some trends that also differed among age classes ( Fig. 2-3,5-6, Supplemental Tables S3-S11). For adults in the urban-dominated region, they strongly avoided the 'urban interface' (the urban matrix surrounded by a narrow buffer of natural area of width determined by the knot values, Figure 2a-b). However, there were multiple lines of evidence that adults explicitly selected for close proximity to the urban interface even after controlling for elevation: i) at night, adults selected for close proximity to the urban interface, ii) when vegetative cover was available and they were situated in natural areas, adults caracals selected for close proximity to the urban interface (evident in the composite dataset, Fig. 3, Supplemental Table S3), and iii) a marginally (p = 0.054) signi cant interaction between URBAN.DIST and ELEVATION demonstrated that caracals avoided high elevations less if high elevations brought them into close proximity to the urban-natural boundary. Further, selection for proximity to freshwater was 2-3 times stronger when individuals were situated within the urban interface as opposed to when situated in natural areas. Contrary to our expectations, but in further support of selection for areas in close proximity to the urban-natural boundary, adults strongly selected for proximity to the coast when situated in the urban interface, whereas when situated in natural areas, the relationship with proximity to the coast was neutral. When situated in natural areas, selection for low elevations strongly in uenced adult movement, whereas when situated in the urban interface, elevation had no effect. Yet at night, selection for low elevation areas was stronger when this selection brought them into closer proximity to the urban interface. Unlike adults in the wildland-dominated region, adults in the urban-dominated region selected for cover irrespective of whether they were within the urban interface or in natural areas (but see 20-min data models below). When situated within the urban interface, adults avoided burned areas, while when situated in natural areas, the relationship with burned areas was neutral (but see 20-min data models below, Fig. 6). Adult caracals in the urban-dominated region avoided vineyards and roads. Avoidance of roads was strongest during the day when vehicle tra c was greatest.
Habitat selection differed among urban adults and subadults, and of note, we detected evidence of subadult males avoiding adults ( Fig. 2-3, 5). Subadult male avoidance of the urban interface itself was 3.6 times lower than that of adults. Similar to adults, we observed explicit evidence of subadult selection for close proximity to the urban interface even after controlling for elevation: i) subadults selected for close proximity to the urban interface (evident in the composite dataset), ii) at night, when cover was available and individuals were situated in natural areas, selection for proximity to the urban interface shifted from neutral to positive selection (Fig. 3, 6a), and iii) selection of low elevation areas was stronger when that selection brought subadults in closer proximity to the urban interface (evident in the composite and night datasets). Further, like adults in the urban-dominated region, subadults strongly selected for proximity to freshwater when situated within the urban interface, while selection for proximity to freshwater was relaxed or neutral when subadults were situated within natural areas. Yet in contrast with adults in both regions, subadults strongly avoided the coast (Fig. 5), possibly to avoid interactions with adults. At night, when subadults were more likely to use the urban interface, they selected for low elevations (irrespective of whether situated within the urban interface or natural areas), whereas during the day, selection for low elevations was limited to when individuals were situated in natural areas. Yet when the use of high elevation areas brought subadults into closer proximity to the urban interface, they used higher elevations. Like adults in the urban-dominated region, subadult caracals selected for cover.
Similar to adults in the urban-dominated region, subadults avoided burned areas, particularly when they were situated within the urban interface (e.g. Fig. 7). Unlike adults, subadults selected for vineyards, particularly at night when human activity was lowest. Finally, unlike adults, road avoidance was not detected.

Fine-scale habitat selection
We also assessed ne-scale movement-speci c habitat selection at 20-min because at this scale, the relative importance of natural landscape features in habitat selection has been shown to increase [6] and could provide important information to retaining viable corridors through fragmented habitat. Median step length across all individuals during 20-min intervals ( ltered to isolate movement data) was 136.8 meters, indicating that habitat use decision is often on the scale of <150 m. Overall, as observed previously, the avoidance of anthropogenic features tended to relax, while selection for natural features tended to increase (Fig. 6b, 7), with the exception for dunes and elevation in the urban-dominated region (but not in the wildland-dominated region). However, a few important new trends emerged. Here, we present notable differences (Supplemental Tables S3-S14).
For adults in the wildland-dominated regions, the most notable differences we observed included selection for burned areas (Figure 7), lower slopes, and avoidance of eucalyptus. In the urban-dominated region, the most important difference detected was that, at night, adults selected for burned areas when they were situated in natural areas and avoided burned areas when they were situated within the urban interface ( Figure 7). Interestingly, another dichotomous relationship emerged, cover was strongly selected when adults were situated within the urban interface at night, whereas when situated in natural areas, adults avoided vegetative cover (Supplemental Table S5). During the day, for both adults and subadults in the urban-dominated region, the relationship with elevation was neutral. Additionally, during the day for adults, the interaction between URBAN.DIST and COVER was particularly pronounced (Figure 6b). For subadults, primary differences included that avoidance of the coast was included in the best-t model, and interestingly, at night, subadults selected against NDVI.

Activity
We ltered a total of 26,278 20-min locations to 8,582 hourly locations collected from 19 individuals. We found no signi cant differences in nocturnality among subgroups (Supplemental Fig. S3). The variancevariance weighted mean log risk ratio among the 1,000 bootstrap replications was -0.005 (equivalent to 0.5% greater nocturnality among wildland-dominate caracals), with 48.6% of replicates indicating greater nocturnality among adult caracals in the urban-dominated region (bootstrap con dence interval: -0.20 -0.20). Overall, caracals were most active during crepuscular hours.

Discussion
Human activities increasingly isolate and disrupt wildlife populations through a range of disturbances. In extremely disturbed habitat (e.g., urban and agricultural areas), highly mobile species must navigate a broad spectrum of habitat suitability [69] often with increased risks. Yet this habitat modi cation may also result in an increase in resource abundance for generalist species, and in turn result in increased habitat suitability. We tested three hypotheses regarding whether caracals : i) completely (spatially and temporally) avoid human activities, ii) temporally avoid human activities, or iii) seek spatial refugia to shelter from human activities in the rapidly urbanizing landscape of the City of Cape Town. We additionally investigated potential differences in human-avoidance strategies among adults and subadult males in the urban-dominated region. We observed stark differences in habitat selection among caracals differing in (i) age class and (ii) living across urban-and wildland-dominated landscapes. Interestingly, we did not observe evidence of blanket avoidance of urban areas or shifted temporal activity patterns in areas with high human activities and thus reject our complete-and temporal-avoidance hypotheses.
Rather, we found most support for the spatial refugia hypothesis, particularly when considering the role of well-vegetated microhabitats as refuges within the urban boundary. Further, the tolerance of anthropogenic disturbances differed depending on subgroup exposure to them.
Differing selection for the urban edge among caracal subgroups Anthropogenic disturbances can shift species' space use to habitats perceived to have the most optimal suitability [6,19,70]. Here we focused on movement-explicit habitat selection because movement ties various life history behaviors together [6,20,71]. Disturbances in our system were not only manifest in habitat transformation but also recreational activities, res, road tra c, and poaching (Serieys, unpubl.data). Caracals in the wildland-dominated region, with access to larger tracts of natural vegetation, used areas an average of 16-fold further from urban areas than caracals living in smaller patches fragmented by urbanization. Despite this, caracals in the urban-dominated section of the study area, on average, selected for areas in close proximity (50-500 m) to the urban edge. Speci cally, in the urban-dominated region, 75% of subadult male locations were within ~270 m of the urban edge and 75% of adult locations were within ~690 m of the urban edge. In stark contrast, in the wildland-dominated region, only 9% of adult locations were within ~690 m from the urban edge. A similar trend of stronger avoidance of anthropogenic landscapes by individuals less exposed to anthropogenic activities was observed for pumas (Puma concolor) living in rural and wilderness areas [72]. In addition to documenting selection for close proximity to the urban-natural boundary itself, we observed that caracals also more strongly (or only) select for other landscape features (freshwater and the coast) when those features themselves are within the urban interface. Together, these observations strongly suggest that valuable resources lie within close proximity to the urban-natural boundary, particularly in the urban-dominated region, thus driving caracals in the urban-dominated region to selectively remain at the urban edge, where anthropogenic risks are higher.

Movement explicit habitat-selection
Several trends in habitat selection were common across all subgroups. Among the most consistent trends across subgroups was positive selection for greenness (measured by NDVI). While caracals generally selected for green spaces, the response to dense vegetation structure (measured as COVER), and its interaction with other predictor effects, was context-dependent. Adults in the wildland-dominated region generally avoided dense cover, particularly at night. In contrast, adults and subadults in the urbandominated region generally selected for cover, particularly when within the urban interface, whereas they sometimes avoided cover when in natural areas further from the urban-natural boundary. The adult response to COVER in the wildland-dominated region may represent baseline behavior for the species, and contribute to their success in extremely arid landscapes [73]. Complex vegetation offers the best cover for stalking prey [74,75], but in the context of the disturbed landscape, selection for cover may rather re ect selection for concealment from humans [6,32].
Fires are an important driver of habitat disturbance in our study system and play a key role in shaping ecosystem structure and function, resource availability [76] and faunal populations [77,78]. The general expectation is that carnivores will avoid burned areas due to decreased prey availability and increased detection probability by humans ( [79,80] but see [81]), despite the fact that res can increase the nutritive value of post-re successional vegetation [82], and increase species abundance of potential prey [82][83][84].
We found that caracals in the urban-dominated region exhibited a dichotomous selection-avoidance of burned areas with adults and subadults strongly avoiding burned areas when inside the urban interface but selecting for them in natural areas (a pattern particularly evident in the 20-min dataset, Fig. 7).
Fynbos vegetation foliage that dominates our study area has little nutritive value for mammals [85], yet the seeds released post-re can be extremely rich in energy and nutrients, and thus a valuable resource for small mammals [86]. Small mammals in fynbos ecosystems typically only leave burned areas several weeks after a re [87]. With reduced cover as a result of re, they may be more easily detected and preyed upon. Not only was this selection for burned areas evident in our habitat selection models, but we also observed in real-time several individuals to move into burned areas within a few days of the re extinguishing. We conclude that caracals are attracted to recently burned areas outside the urban interface because of greater prey availability but avoid burned areas within the urban interface because they are too exposed to humans, which may be an example of sacri cing optimal foraging to avoid risky areas.
Subadults pushed to the edge Young carnivores (particularly males) in populations disperse from their natal range [88]. Habitat selection for this age cohort is essential to understanding landscape features that promote connectivity [89,90]. In our peninsular system isolated by a dense urban matrix, successful dispersal out of the system appears near-impossible, and those young males that we observed attempt to leave the Peninsula and venture into the urban matrix were frequently hit by cars or turned back (Serieys, unpubl.data).
Nevertheless, while connectivity appears largely obstructed, our models yielded interesting differences in habitat selection amongst subadults and adults. These habitat selection differences are likely indicative of strategies that subadults use to avoid competition with adults.
Adults avoided the urban interface much more strongly than subadults suggesting that subadults are likely being pushed into marginal or risky habitat. Similar effects have been documented in numerous other carnivore species that inhabit human-dominated landscapes [90,91], including medium-sized felids such as bobcats (Lynx rufus) [92] and Iberian lynx (Lynx pardinus) [93]. Yet although ~31 % of subadult male locations were within the urban matrix, the relative probability of selection for the urban matrix remained low. Subadults also selected for vineyards (which were not considered part of the urban matrix), while adults in the urban-dominated region avoided this land use. While the objective of this paper was not to describe in detail the differences in habitat selection between males and females, this trend may have been stronger if adult male habitat selection had been isolated during analyses, and this is a potential future line of enquiry.
Beyond utilizing human-modi ed areas to a greater degree (urban matrix and vineyards), subadults avoided the coastline, which may be further evidence of avoiding con ict with adults. In the Peninsular section of our study area, most of the available land is bordered by coastline which offers caracals access to abundant seabird prey [44]. Adults from both subpopulations selected for the coast, particularly at night (Fig. 5), where (wildland adults especially) regularly hunt coastal seabirds [44]. We did not capture subadults in the wildland-dominated region and thus are unsure whether this trend holds in the wildland-dominated region. However, the lack of subadult sampling may re ect subadult avoidance of the coast in the wildland-dominated region. While our time allotted to trap in the wildland-dominated region was substantially constrained by our permits, we were also constrained by only having access to areas within several hundred meters of the coastline. Thus, if subadults in the wildland-dominated region also avoid coastline because of dominant adult use of these areas, we were unlikely to sample the subadult demographic of the wildland population. Interestingly, we detected one opportunistic wildlanddominated region subadult at a feeding cluster after it was killed and consumed by an adult male in the area [44]. The threat imposed by competing with adults is substantial for younger individuals.
Spatial refugia, not temporal refugia The mechanisms by which wildlife persist amongst human development are debated, but dominant hypotheses pivot on how individuals balance risk and energy gain [94]. Carnivore success in anthropogenic landscapes is considered to hinge on exible behavior that accommodates human disturbance through functional responses, shifted activity patterns, and altered habitat selection [6,72,95,96]. Yet, carnivore habitat selection is largely driven by prey abundance [93] and perceived vulnerability to mortality risk [97]. In human-dominated landscapes, carnivores perceive humans as apex predators [17,98], and will adjust their behavior to avoid risk of con ict with people [7,27,94,99]. While we expected caracals in the urban-dominated region to avoid human encounters via shifted activity (relative to caracals in the wildland-dominated region), we found neither shifts in activity patterns nor increased nocturnality. Rather we detected bimodal activity patterns across all subgroups. Similar activity patterns have been documented in urban bobcats (Lynx rufus) and were attributed to natural life history behavior which includes rest during the day, travel to foraging areas at dusk, forage and rest during the night, and travel to resting areas at dawn [100]. Yet we have also observed caracals in the urban-dominated region to not only selectively forage at the urban edge, but also to initiate the majority of their kills (61%) during the day (Leighton et al. in review), likely because some of their favored prey are diurnal (e.g. vlei rats, Otomys irroratus, Helmeted guineafowl, Numida meleagris, [44]). Thus, the combination of ample vegetative cover provided by natural fynbos near the urban edge, and the availability of prey at the urban edge, may rather drive our observed activity patterns.
Rather than adopting a strategy of temporal refugia from human activity, caracals in the urbandominated region may adopt subtle spatial avoidance patterns that vary as a function of surrounding land-cover availability and proximity to perceived apex predators. During the day, adults in the urbandominated region avoided areas close to the urban interface that lacked thick cover (Fig. 6b, Supplemental Table S4). Adults in the urban-dominated region also avoided roads during the day when vehicle tra c is heaviest, but we did not detect this avoidance at night. When situated in areas of high human disturbance, animals may choose more protected areas or microhabitats [101], or if individuals are located near refuge habitat, they may tolerate closer approaches by potential predators [7].
Alternatively, the near constant exposure to human activities for caracals in the urban-dominated region may habituate them to non-lethal human disturbance [102,103], or they may reduce antipredator behavior with increasing exposure to high-risk situations (risk-allocation hypothesis, [104]). The majority of human encounters in the natural portions of our study area are with recreational hikers or cyclists, and thus nonlethal, while lethal encounters with poachers or domestic dogs are far rarer.

Conclusions
In general, an understanding of the adaptability of urban wildlife outside of North America, Europe, and Australia is lacking, and has even been hypothesized to be linked with a lack of urban-adapting carnivores [105]. Here, we describe the presence and ecology of a carnivore adjacent to areas with extremely high human densities in urbanizing Cape Town, demonstrating that carnivores can adapt to life on the edge of urban-dominated landscapes in the global South.
The mechanisms that facilitate carnivore population persistence and coexistence in anthropogenically disturbed landscapes include spatial avoidance of humans [106], or temporal avoidance of human activity where they spatially overlap [27]. We have demonstrated that caracals in the wildland-dominated region appear to spatially avoid humans. We found some evidence that caracals in the urban-dominated region avoid humans as well, but at ner scales and with a greater overall tolerance for human disturbance than the wildland-dominated subpopulation. Yet the urban matrix is inhospitable for adultsthe reproductive demographic of the population. The urban matrix presents a near absolute barrier to movement (Fig. 1b), and thus, the caracal subpopulations are extensively isolated, and effectively a closed and fragmented population. The Cape Peninsula is a dynamic system not only because of frequent res, but also advancing anthropogenic development. Consequently, the long-term persistence of this population will be threatened by ongoing habitat transformation, and it is essential that this development be mitigated where feasible, including through the establishment of movement corridors.
Further, the restoration of pine plantations (that were marginally avoided) could increase the amount of viable habitat for caracals and other wildlife. Charismatic carnivores are widely reported to have profound in uence on ecosystem dynamics, provide socioeconomic bene ts to society, and earn disproportionate attention in the media [34]. Local land managers and the general public have expressed interest in the conservation of this species, and thus management action is needed to prevent the defaunation of Table   Mountain's wildlife extending to caracals. Achieving this goal, and conserving fauna globally throughout the rapidly expanding urban-wildland interface, requires new conservation strategies and initiatives that better accommodate the nuances for wildlife of living in human-dominated landscapes.

Consent for publication
Not applicable.

Availability of data
The datasets generated and analyzed during the current study will be made available in the Dryad data repository.

Competing interests
The authors declare that they have no competing interests.

Funding
We thank the Claude Leon Foundation, Cape Leopard Trust, the University of Cape Town, Botanica Wines, Stellenbosch University, the National Research Foundation, the Institute for Communities and Wildlife in Africa (iCWild), Wildlife ACT, City of Cape Town, Experiment, and numerous private donors for funding eldwork. We thank iCWild and University of California, Santa Cruz (UCSC) for support during manuscript preparation. We thank the City of Cape Town, Cape Leopard Trust, and UCSC for additional eld equipment.
Authors' contributions LEKS, JMB, and MJO conceptualized the study. LEKS collected, analyzed, and interpreted data, and wrote the manuscript. MSR analyzed data and contributed writing the manuscript. JAS, JPS, MSR, and CCW interpreted data. All authors read, edited, and approved the nal manuscript.
105. Iossa G, Soulsbury C, Baker P, Harris S: A taxonomic analysis of urban carnivore ecology. In: Gehrt S, Riley S, Cypher B, editors. Urban Carnivores: Ecology, con ict, and conservation. Baltimore, Maryland,  Tables   Table 1. Optimal knot values and the results of K-fold cross validation values across all modeled datasets and diel periods. Knot breakpoints (represented as the distance from the urban-natural boundary) were determined using segmented regressions for adults and subadults in the urban-dominated region that indicated the functional shift in avoidance-selection trends from the urban interface to natural areas.