Reducing bias in density estimates for unmarked populations that exhibit reactive behaviour towards camera traps

Density estimates guide wildlife management, and camera traps are commonly used to estimate sizes of unmarked populations. Unfortunately, animals often alter their natural behaviour in the presence of camera traps, which may bias subsequent density estimates. We simulated 100 populations of known density to test several new and existing methods that aimed to reduce bias in density estimates from camera trap distance sampling (CTDS) and the random encounter model (REM). Within our simulated populations, we introduced different behavioural reactions including attraction towards cameras, freezing when near cameras and fleeing from cameras. CTDS and REM provided density estimates with decent coverage of confidence intervals (CTDS = 94%, REM = 87%), mean coefficient of variation (CTDS = 0.121, REM = 0.071) and minimal bias (root‐mean squared error: CTDS = 1.336, REM = 0.913) for simulated populations with no reactive behaviour. However, failure to implement a method to account for reactive behaviour resulted in low coverage, large bias and potentially imprecise density estimates when 30% of the simulated population potentially reacted by attraction to or fleeing from camera traps. We identified a corrective strategy that enhanced confidence interval coverage, increased precision and reduced bias for every behavioural reaction except when individuals potentially fled from cameras. Synthesis and applications. We provide empirically tested methods for reducing bias of density estimates. Wildlife managers requiring population estimates of animals that exhibit reactive behaviour can use our methods to reduce inaccuracy. We encourage future studies to quantify behavioural responses to camera traps and to implement, test and possibly extend our methods to reduce bias through simulation.


| INTRODUC TI ON
Density estimates aid many decisions in wildlife management (Williams et al., 2002), and camera traps have become an effective method for estimating the density of unmarked populations (Palencia et al., 2021).Many statistical approaches exist for estimating population density with camera traps (Gilbert et al., 2021).Regardless of the specific approach, all density estimators rely on an estimated relationship between the detections from a camera trap and the animal population (Becker et al., 2022;Howe et al., 2017;Nakashima et al., 2018;Rowcliffe et al., 2008).Many of these approaches either need to account for the probability of detecting animals within the field of view (FOV) of the camera (Howe et al., 2017;Rowcliffe et al., 2008) or require sampling designs that ensure perfect detection (Moeller et al., 2018;Nakashima et al., 2018).
While cameras are collecting data, animals often react to these foreign objects, and in so doing alter their natural behaviour (Henrich et al., 2020;Ladd et al., 2022;Meek et al., 2016).Common reaction types towards cameras include attraction, freezing and fleeing (Houa et al., 2022).Attraction is when animals spot the camera trap and subsequently change their movement path towards the camera.In such instance, animals will often walk directly up to a camera trap and remain in extremely close spatial proximity to the camera trap before resuming their natural behaviour (Figure 1A).Freezing is when animals halt their natural movement upon detecting a camera trap.After halting, animals commonly stare directly at the camera trap before resuming their natural behaviour (Figure 1B).Lastly, fleeing is when animals immediately run away from camera traps.
Fleeing usually occurs when an animal is startled as the camera trap captures a photo (e.g. by the camera's flash; Figure 1C), although fleeing before detection also is possible.
Camera trap distance sampling (CTDS; Howe et al., 2017) and the random encounter model (REM; Rowcliffe et al., 2008) are two of the most widely applied density estimation methods for unmarked populations using camera trap data (Delisle et al., 2021).
Density estimation from CTDS relies on counts of animals in the FOV of camera traps during defined snapshot moments (Howe et al., 2017).Because the probability of detecting an animal passing in front of the camera declines as the distance between the animal and camera increases, counts of animals are corrected using a modelled detection probability.An estimate of detectability is achieved by collecting the distances between observed animals and cameras, and fitting key function shapes to these distances (henceforth, detection function; Buckland et al., 2001).Reactive behaviour may bias CTDS in multiple ways.An assumption of CTDS is that the distribution of animal locations is independent of camera locations (Howe et al., 2017).Reactive behaviour violates this assumption.
In so doing, any reactions will almost certainly bias the number of times animals are detected and thus counted; theoretically, we expect an overestimation of counts due to attraction or freezing and an underestimation due to fleeing, resulting in positive and negative bias in the estimated density, respectively.Reactive behaviour may also introduce bias into model estimates of the detection function.
First, attraction towards the camera, or freezing that is more likely to occur at closer distances, may cause an unnatural spike of detections at close distances from the camera.If spikes in detections at close distances occur, some detection functions may fit the biased detection distances better than others (e.g.hazard rate models; Buckland et al., 2015).This may cause a negative bias in the modelled detection probability and subsequent positive bias in the estimated density.Secondly, if fleeing is more probable near the camera trap, fewer detections than expected may result at short distances.
Such distance-dependent flight responses may thus cause a biased sample of detection distances due to fewer-than-expected detections near cameras.
The REM utilizes independent animal observations while considering imperfect detection in the camera trap FOV and the average movement speed of the sampled population (Rowcliffe et al., 2008).
If animals exhibit attraction or fleeing when outside of the FOV of a camera, then the number of independent observations, and subsequent estimated density, will be biased positively and negatively, respectively.When reacting to cameras, animals often alter the speed at which they are travelling.If the movement speed parameter of the REM is directly derived from the camera trap observations (as is common practice currently in REM; Rademaker et al., 2016;Rahman et al., 2017;Monteiro-Alves et al., 2019;Schaus et al., 2020;Palencia et al., 2021), attraction and freezing behaviour will decrease the distance travelled per unit time in the camera trap FOV.The resulting decrease in travel speed will negatively bias average travel speed of the population and positively bias the estimated population density.
Similarly, fleeing responses increase the travel speed in the camera FOV leading to positive bias in the overall travel speed of the population and negatively biased density estimates.Lastly, imperfect detection is addressed in REM by estimating an effective detection distance (EDD; defined as the threshold beyond which the number of animal detections recorded equals the number of animal detections that are missed within the distance; Buckland et al., 2001).Detection functions for REM are fitted to only the first animal detection within each independent observation, which are then used to estimate EDD (Rowcliffe et al., 2011).An important distinction between CTDS and REM is that the assumption of animal locations being independent of camera locations only concerns the first detection for REM.Considering this distinction, attraction and fleeing reactions starting before the first detection will cause an unnatural increase and decrease, respectively, of first detections within the distance where animals begin to react to the camera.Attraction before first detection potentially leads to a biased sample of detection distances (i.e. more short detection distances than expected), an underestimation of the EDD and an overestimation of density.Similarly, fleeing before detection near the camera may lead to fewer-than-expected detections at closer distances, causing a biased sample of distances at which animals are first detected.
Different methods have been used to reduce suspected bias caused by reactive behaviour.For CTDS, these include left-truncating all detections close to the camera trap (Cappelle et al., 2019), removing detections of animals reacting to the camera (Bessone et al., 2020;Houa et al., 2022) and additionally omitting from consideration certain detection functions when estimating the detection probability (Delisle, McGovern, et al., 2023;Delisle, Miller, et al., 2023).For REM, independent observations, during which animals react to a camera trap, commonly are removed for the estimation of the movement speed parameter (Monteiro-Alves et al., 2019;Palencia et al., 2021Palencia et al., , 2022Palencia et al., , 2023;;Rowcliffe et al., 2016).True density is rarely known when using field data, and, hence, inference on bias of density estimates in such situations is limited to differences between corrected and uncorrected estimates.In contrast, simulations, in which the actual density is known, enable the assessment of the true efficacy of different methods to deal with bias arising from animals reacting to camera traps.Therefore, our goal was to employ simulations

| Simulation
All simulations occurred within a virtual square 9-km 2 landscape in which locations of 50 cameras were randomly chosen, subject to the constraint that cameras were ≥150 m apart.

| No reaction to cameras
We first simulated random walk movements of animals that at no point reacted to cameras.Animal movements were simulated for 3 days, during which animals were active for 50% of the time.
Adopting the algorithm of Howe et al. (2019), we obtained step lengths from an exponential distribution with a rate parameter of 2 m −1 (mean step length = 0.5 m), and bearing angles from a normal distribution with a mean of 0 and standard deviation of 0.05 radians.Time between steps was set to 2 sec, which resulted in a mean day range (i.e.daily distance travelled) of 10.8 km.Animals that moved past the boundary of the landscape reappeared on the opposite edge and kept the same bearing.The angle of the detection zone of each camera (i.e. the sector of area being sampled by a camera) was set to 0.9599 radians, and the maximum distance of possible detection was set to 40 m.We modelled detection probability for cameras using a half-normal key function with σ = 8 m.We did not model a decrease in detectability near the outer edges of the detection zone, nor did we simulate animals that travelled in groups.

Attraction
We simulated a cohort of individuals that could be attracted towards the camera when moving across the landscape.If an animal was located <8 m from the camera, there was a 0.8 probability at each step that the animal would be attracted towards the camera.If attraction towards the camera was induced, the animal reoriented its trajectory to move directly towards the camera.Once attracted towards the camera, step lengths were drawn from an exponential distribution with a rate parameter of 5 (i.e. the animal slowed down).We only allowed for an animal to be attracted towards the camera for a maximum of 30 steps (i.e. 1 min) per encounter with a camera.

Freezing
We also simulated a cohort of individuals that could freeze when near cameras.If a member of the cohort was standing <8 m from the camera, there was a 0.8 probability at each step that the animal would remain in place until the next step.As with attraction, we only allowed an animal to freeze in the presence of a camera for a maximum of 30 steps per encounter with a camera.

Fleeing
We simulated an additional cohort of individuals that could flee from cameras.If standing <8 m from the camera, there was a 0.8 probability at each step that the animal would flee.We simulated two types of fleeing behaviour: (1) animals that could flee only if detected by the camera; and (2) animals that could flee regardless of being detected by the camera.If fleeing occurred, step lengths were drawn from a uniform distribution with a minimum of 7.5 m and maximum of 9.5 m (i.e. the animal fled at a speed 15-to 19-fold above the mean speed for non-reactive animals) and the trajectory was reoriented away from the camera.Animals ceased fleeing once >8 m away from the camera.The first type of fleeing was designed to simulate fleeing in response to the camera flash or sound of the camera as it captured an image.The second type of fleeing was designed to simulate a generalized neophobic or olfactory response.

| Constructing populations
We constructed several different populations from which we estimated density.All populations contained 10 animals/km 2 (90 total animals).First, we constructed a control population composed of only nonreactive individuals (henceforth, control simulation).Next, we constructed populations with two different mixtures of nonreaction and attraction classes.In the first mixture, 10% of the animals (9 animals) were potentially attracted towards the camera and 90% (81 animals) were nonreactive (henceforth, 10% attraction simulation).
In the second mixture, 30% of animals (27 animals) were potentially attracted towards the camera and 70% (63 animals) were nonreactive (henceforth, 30% attraction simulation).We repeated these 10:90% and 30:70% mixtures of reactive and nonreactive classes to include individuals that exhibited freezing (henceforth, 10% or 30% freezing simulation), fleeing regardless of being detected (henceforth, 10% or 30% fleeing-if-not-detected simulation) and fleeing if detected (henceforth, 10% or 30% fleeing-if-detected simulation), resulting in nine simulated populations (one nonreactive and eight with reactive individuals).For each of the eight mixture populations, all reactive individuals in a population shared the same behavioural reaction rule.We chose the mixture percentages to be representative of values commonly reported in previous field studies.For To assess effects of multiple behavioural reactions in a population, we simulated two populations in which not all reactive animals responded to the camera in the same way.The first population contained the following composition: 10% potentially attracted, 10% potentially fleeing if detected, 10% potentially freezing and 70% of animals remaining nonreactive towards cameras (henceforth, 10% combination simulation).Secondly, we simulated a population with a composition of 25.6% (23 animals) potentially attracted, 25.6% potentially fleeing if detected, 25.6% potentially freezing and 23.3% (21 animals) of animals remaining nonreactive towards cameras (henceforth, 25% combination simulation).
For each mixture type, we simulated 100 different populations using unique simulated movement paths.

| Camera trap distance sampling
We estimated population density with CTDS by where D = estimated density (animals/km 2 ), k = the camera trap sampled, n k = the total detections at camera trap k, t = the time interval (sec) over which consecutive detections could occur at a camera trap, = the angle of view (radians) of the camera trap, w = the right truncation distance (km), T k = the total time sampled (sec) and Pk = the probability of detection in the camera trap sampling area at a given t demarcated by and w.In real-world applications, the fraction of the day the sampled animal population spends active is used as a multiplier to correct density for sampling availability (Howe et al., 2017), but we simulated populations where every individual was equally active for 12 h each day and considered that for T k .Therefore, this multiplier was not needed for our purposes.
For each of the bias reduction methods described below, we estimated densities using CTDS by fitting half-normal detection functions with 0 or 1 Hermite polynomial adjustment term, uniform detection functions with 1 or 2 cosine adjustment terms and hazard rate key functions with 0, 1 or 2 cosine adjustment terms (unless specified otherwise).We binned distances at 0, 1, 2, … 8, 10, 12, 15 m intervals.We right truncated the detections at 15 m due to a decline in detectability followed by prolonged low probabilities of detection associated with distances >15 m (Buckland et al., 2015).Following this, we used the two-step process in Howe et al. (2019) to select the final detection function.We used nonparametric bootstrapping to estimate the standard error and confidence interval of D.

| Methods for reducing bias in CTDS
Using each of the constructed populations, we first estimated density without using any method to reduce bias caused by reactive movements (henceforth, naïve method).

Removal method
For simulations involving attraction or freezing reactions, we estimated density after removing all detections in which animals were reacting to the camera (henceforth, removal method).We did not use the removal method for simulations that involved the fleeing reaction, because we expected removal to accentuate the negative bias in n k and hence CTDS density estimates.

Ignoring the hazard rate method
For simulations involving attraction or freezing reactions, we also tested the effects of not considering the hazard rate key function when fitting detection functions (henceforth, ignore-HR method).
We tested the ignore-HR method only on populations including attracted and freezing individuals, because the hazard rate key function can fit large spikes in detections close to the sampling location, which were expected in these scenarios (Buckland et al., 2001).Such a fit results in an underestimation of detection probability and subsequent overestimation in density.

Removal and ignore-HR method
For simulated populations containing the attraction or freezing reaction, we tested a combination of the removal method and ignore-HR method above (henceforth, removal+ignore-HR method).Specifically, we first removed any detections when animals were freezing or being attracted to the camera.Then, when fitting detection functions, we did not consider the hazard rate key function.

Multiplier method
For simulations with any reactive behaviour, we classified encounters (defined as a sequence of consecutive detections captured when a camera detects an individual that passes through the field of view) with simulated animals into two object strata (Buckland et al., 2015): (1) reactive and (2) nonreactive.All encounters in the reactive strata contained an animal reacting to the camera for ≥1 detection.All encounters in the nonreactive strata contained animals that never reacted to the camera.After classifying all encounters with cameras into these two strata, we estimated all detection functions using only the nonreactive stratum.We then used this detection function to model the detectability of both the nonreactive and reactive strata, as we expect true detectability between the two strata to be similar.
Next, we estimated a multiplier (Buckland et al., 2001), denoted by m, with the following ratio where n r = the mean number of detections per reactive encounter, and n nr = the mean number of detections per nonreactive encounter.We then used m to correct the density of only the reactive strata, similar to the application of multipliers in conventional distance sampling (Buckland et al., 2001), by For the simulations with 10% and 25% combinations of each reaction, we used the most effective method(s) from those above for each reactive behaviour.

| Random encounter model
We estimated simulated animal density using REM with the following formula: where D = the estimated density (animals/km 2 ), y = the number of independent animal observation events across all cameras, T = the total amount of time that all cameras were sampling (days), v = the estimated day range of the animal (km/day; i.e. the total length an animal travelled in 1 day), r = the estimated effective detection distance (km; EDD) and = the angle of view of the camera trap (radians).
In Equation 5, y ∕ T describes the encounter rate (ER).Using the frequency of time intervals between detections, we defined an observation event as all detections at a camera trap location with a time lag of less than 100 s between them (i.e. if two consecutive detections were >100 s apart, we classified these as two different observation events; Supporting Information).To estimate v, we first computed the average movement speed inside the camera FOV by summing the distances between detections within an event and dividing them by the temporal duration of the event.We fitted exponential functions to these speeds (Rowcliffe et al., 2016) and obtained v based on maximum likelihood.
Following Rowcliffe et al. (2011), we estimated r by fitting detection functions to the first detection of every event.However, we did not simulate a decrease in detection probability as animals approached the edges of the camera's angle of view, and under such circumstances detections at larger distances are expected to be positively biased from animals approaching the camera through the arc of the sector (Howe et al., 2017).Therefore, we only used first detections within 0.5 m of the two edges of the FOV when estimating r (Z.J. Delisle, M. Henrich, P. Palencia, & R. Swihart, unpublished data).Because of this, we estimated r using the framework of conventional line (rather than point) distance sampling (Buckland et al., 2001).We used the largest distance of a simulated animal to the camera at first detection to determine our right truncation distance when estimating r (Z.J. Delisle, M. Henrich, P. Palencia, & R. Swihart, unpublished data).We used Akaike's information criterion to select between half-normal and hazard rate detection functions with 0, 1 or 2 cosine adjustment terms (Rowcliffe et al., 2011).We did not bin distances when estimating r .We used non-parametric bootstrapping to derive confidence intervals for the density estimates from REM by resampling cameras with replacement for y ∕ T and resampling events for v and r.

| Methods for reducing bias in REM
Identical to CTDS, we first estimated density without using any method to reduce bias caused by reactive movements for each of the seven compiled populations.

Speed removal method
For simulations involving either attraction, freezing or fleeing reactions, we removed all events containing an animal reacting to the camera for ≥1 detection before estimating v (henceforth, speed removal method).

Speed+EDD removal method
For simulations involving either attraction, freezing or fleeing reactions, we removed all encounters for which an animal reacted to the camera for ≥1 detections before estimating v and r (henceforth, speed+EDD removal method).

Speed+EDD+ER removal method
Lastly, for simulations involving the attraction reaction, we removed all encounters containing an animal reacting to the camera for ≥1 detection before estimating v and r , and calculating y (henceforth, speed+EDD+ER removal method).We only used this method on individuals that could be attracted towards cameras because attraction resulted in a change in the direction animals travelled before detection by the camera and, hence, could bias the encounter rate.The other behavioural reactions either did not change the trajectory before detection or the trajectory change was unknown (fleeing before detection) and thus so too was bias of the encounter rate.
Similar to CTDS, for the simulations with 10% and 25% combinations of each reaction, we used the most effective method(s) from those above for each reactive behaviour.

| Assessing corrective methods
For both CTDS and REM, we assessed the efficacy of each corrective strategy for reactive behaviour using several metrics.Across all 100 density estimates for the simulated populations of each mixture, we estimated root-mean squared error (RMSE), mean coefficient of variation (CV) and coverage (i.e. percentage of estimates with (4) confidence intervals that overlapped true density).We estimated , where N = the total number of densities estimated from simulated populations (N = 100).

| Camera trap distance sampling
Of all the simulated behavioural reactions to camera traps, attraction caused the strongest bias in the population density estimates for CTDS (Figure 2a, Supporting Information).When 10% or 30% of simulated individuals possibly exhibited attraction, the removal+ignore-HR method performed best in terms of confidence interval coverage (10% attraction population = 94%; 30% attraction population = 84%), CV (10% attraction population = 0.097; 30% attraction population = 0.106) and RMSE (10% attraction population = 0.961; 30% attraction population = 1.461;Table S1).The multiplier method ranked second in terms of performance, and all corrective methods were superior to using the naïve estimate derived by assuming that no reactive behaviour existed (Supporting Information).
Freezing behaviour had the smallest effect on population density estimates out of all tested reactions to camera traps, and bias was small even when 30% of simulated individuals possessed the freezing reaction (Figure 2a, Table S1).For 10% freezing, the HR + removal method was superior in coverage (94%), precision (mean CV = 0.096) and bias (RMSE = 0.989), and all corrective methods performed better than the naïve estimator (Table S1).For 30% freezing, the HR + removal method was most precise (mean CV = 0.103) and least biased (RMSE = 1.268), whereas coverage of all corrective methods was similar, just slightly below the nominal level (85%-87%), except for the HR method which performed poorly (62%).
When applied to fleeing behaviour, our multiplier method provided only modest improvement in confidence interval coverage and no improvement in either precision or bias.Overall estimator performance declined sharply as the percent of potentially reactive individuals increased from 10% to 30%, with a 57% decline in confidence interval coverage (from an average of 78%-33.8%), a 19% increase in CV (0.12-0.14) and an 82% increase in RMSE (1.6-2.9;Table S1).Fleeing behaviour by 30% of the population led to lower confidence interval coverage (25% and 50%) compared to other reactive behaviours (Table S1).
Lastly, for the simulations containing all combinations of behavioural reactions, we used the multiplier method for fleeing individuals and the removal+ignore-HR method for attractive and freezing individuals.To combine the best methods, we implemented a simple object stratification (similar to Equation 4) between the densities of the fleeing stratum and non-reactive, attractive and freezing strata for estimation of total density for combination populations.This 'best' method was superior in terms of coverage of confidence intervals (10% combination: naïve = 75%, best method = 77%; 25% combination: naïve = 35%, best method = 86%), CV (10% combination: naïve = 0.257, best method = 0.103; 25% combination: naïve = 1.607, best method = 0.353) and RMSE (10% combination: naïve = 3.559, best method = 1.365; 25% combination: naïve = 46.320,best method = 2.451), with relatively greater improvements in performance for the higher percentage of reactive individuals (Figure 2a, Supporting Information).However, for the 25% combination populations, the average CV from the best method was still imprecise.

| Random encounter model
In the attraction scenario for the REM, the Speed+EDD+ER method performed best in terms of RMSE (Table S2) regardless of the fraction of animals potentially being attracted towards cameras (10% attraction population = 1.007; 30% attraction population = 2.180).
Precision was identical for Speed+EDD+ER and Speed+EDD methods, and the latter method provided slightly greater coverage at 30% attraction (83% vs. 77%, Table S2).The Speed method only exceeded the naïve method's performance when 30% of the population was potentially attracted to cameras (Table S2).
In the freezing simulations, the Speed+EDD method had the smallest RMSE (Figure 2b, Table S2).Confidence interval coverage (10% freezing population = 86%; 30% freezing population = 85%) and mean CV (10% freezing population = 0.074; 30% freezing population = 0.080) were similar between the populations in which 10% or 30% of simulated individuals potentially froze in reaction to the camera for the Speed+EDD method.The Speed method offered no improvement over the naïve method when dealing with freezing behaviour (Table S2).
Confidence interval overlap, mean CV and RMSE were similar between the naïve, speed removal and speed+EDD removal methods when only 10% of simulated individuals potentially fled upon being detected by cameras (Supporting Information).However, when 30% of simulated individuals potentially fled upon being detected by cameras, overlap of confidence intervals was appreciably better for the naïve method (Naïve = 72%; speed removal = 64%; speed+EDD removal = 61%).For simulated populations where 10% or 30% of individuals fled regardless of being detected by cameras, the speed+EDD removal method worked best in terms of confidence interval overlap (10% fled regardless of detection = 83%; 30% fled regardless of detection = 44%), mean CV (10% fled regardless of detection = 0.074; 30% fled regardless of detection = 0.083) and RMSE (10% fled regardless of detection = 1.029; 30% fled regardless of detection = 1.672); although overlap of confidence intervals was poor when 30% potentially reacted.
For the combination simulations, we used the Speed+EDD+ER, Speed+EDD and naïve methods for individuals that potentially were attracted, frozen and fled upon detection, respectively, for the 'best' method.The coverage of confidence intervals (10% combination: naïve = 81%, best method = 82%; 25% combination: naïve = 68%, best method = 73%), CV (10% combination: naïve = 0.089, best method = 0.081; 25% combination: naïve = 0.159, best method = 0.127) The average density estimates (animals/km 2 ± 95% confidence intervals [CI]) from detections of simulated animals at camera traps across 100 total simulations for each reaction type.Densities were estimated using camera trap distance sampling (CTDS; a) and the random encounter model (REM; b).Simulated populations contained a fraction of the population (reactive individuals in the population [%]) that froze in response to cameras (Freezing), fled from the camera when the camera detected the individual (Fleeing if detected), fled from the camera regardless of being detected by the camera (Fleeing) and were attracted to cameras (Attraction).Additionally, we simulated a population that did not contain any reactive individuals (None).
For each density estimate, we enacted a specific method to reduce bias associated with reactive movement (Method).Methods for CTDS included doing nothing (Naïve), removing detections of reactive individuals from consideration (Removal), ignoring the hazard rate key function (Ignore HR), combining Ignore HR and Removal, and using the ratio of average number of detections of reactive and nonreactive individuals as a multiplier (Multiplier).Methods for REM included doing nothing (Naïve), removing reactive encounters when estimating the speed parameter (Removal for speed), removing reactive encounters when estimating the speed parameter and the effective detection distance (Removal for speed +EDD) and removing reactive encounters when estimating the speed parameter, effective detection distance and the encounter rate (Removal for speed +EDD + ER).The grey dotted line represents true density (10 animals/km 2 ).Some density estimates are above the upper limit of the y-axis due to severe bias (see Tables S1 and S2 for these estimates and the extent of their confidence intervals in the Supporting Information).

| Comparison of CTDS and REM
We compared the best-performing methods from each simulation to gain insight into the relative performance of CTDS and REM estimators.Neither type of estimator universally outperformed the other.For attraction to cameras, the best CTDS method (ignore HR+Removal) yielded lower bias and greater confidence interval coverage than the best REM method (Speed+EDD+ER); levels of precision were similar (Tables S1 and S2).For simulations involving fleeing, the best REM method (Speed+EDD) performed better than the best CTDS method (multiplier) for all metrics.For freezing behaviour, the best REM method (Speed+EDD) resulted in lower bias and higher precision than the best CTDS method (ignore HR+Removal), but coverage of the CTDS method was greater at high incidence of freezing.Finally, for populations with mixtures of these behaviours, the best REM method yielded lower bias and higher precision but lower confidence interval coverage than the best CTDS method at 25% incidence of each reactive class (Tables S1 and S2).

| DISCUSS ION
We used simulations to empirically test strategies for reducing bias in density estimates of populations containing individuals that react behaviourally to camera traps.Many strategies used previously in published studies were far less effective at reducing bias than the best strategies we found for both CTDS and REM.We therefore believe our work will help establish a foundation for others sampling reactive animals in future applications of CTDS and REM.
Attraction caused especially strong bias in CTDS, and, to a lesser degree, REM.But in our study, estimates from many previously used strategies to minimize bias from attraction did not perform as well as other competing methods.Therefore, when animals are attracted towards cameras, we recommend the adoption of the removal+ignore-HR method for CTDS and the speed+EDD+ER removal method for the REM.
Interestingly, when animals could flee after detection, we observed small or no improvements in performance of our methods over the naïve method.In most instances, the flight speed we sim-  (Caravaggi et al., 2020;Delisle, McGovern, et al., 2023).Olfactory cues from camera deployers or cameras, and flash types can also influence reactivity in animals (Caravaggi et al., 2020;Henrich et al., 2020).The use of 'black flash' is a solution that can minimize obtrusiveness (Henrich et al., 2020).Although these considerations may reduce reactivity, complete elimination of reactive behaviour may not be possible in some animal populations or under large-scale sampling protocols.
Simulations are critical for a deeper understanding of stochastic latent variables that are commonly estimated and studied in ecological sciences (Kéry & Royle, 2015, 2020).Our results are entirely dependent on simulations that followed a rule set based on previous field research conducted on multiple continents, and should be interpreted accordingly.Some species may exhibit complex behavioural responses to camera traps that are not reflected in our simulations and thus potentially fall beyond the scope of the solutions we propose.
Moreover, numerous study systems are likely to be extremely different than our simulation (e.g. more or fewer cameras deployed, faster or slower animal movement rates, smaller or larger study sites and study sites where space use by animals is heterogeneous).If density estimates using CTDS or REM are desired for populations that exhibit such complex behaviour, potentially within extremely different study systems, additional customized simulations will be needed to test methods for reducing bias before implementation.
Many wildlife species that react to camera traps travel in groups (Delisle, Miller, et al., 2023;Henrich et al., 2020;Palencia et al., 2021).The results of our simulation showed a wide range of bias in density estimates caused by reactive behaviour.Bias appeared to be largest when dealing with populations containing individuals that were potentially attracted towards cameras.In some instances (e.g. when not implementing a method to reduce bias from attraction for CTDS), bias was large enough that we would expect researchers to intuitively realize that the density estimates are not believable.Depending on the degree of bias, judging whether an estimate is unreasonable may be challenging when conducting surveys on unknown populations or with limited prior information on population status.Nevertheless, we encourage future users of camera traps to carefully check images for the occurrence of behavioural responses to camera traps, reduce the risk of behavioural reactions through appropriate field protocols and, when warranted, apply correction strategies when conducting analyses.For the last step, the recommendations from our work offer guidance for the choice of procedure depending on the kind of behavioural reactions the population exhibits and the statistical estimator of density being used by the researcher.

F
Conceptual movement paths in which animals exhibit a variety of different reactive behaviours towards camera traps: (A) attraction towards the camera trap; (B) freezing normal travel; (C) fleeing in response to being detected by the camera trap; and (d) fleeing in response to the presence of the camera trap regardless of being detected.Panels depicting actual animals exhibiting a variety of reactive behaviours towards camera traps: (A) white-tailed deer (Odocoileus virginianus) that is attracted towards the camera trap; (B) white-tailed deer that freezes in front of a camera trap; and (C) coyote (Canis latrans) that flees in response to being detected by a camera trap.to test several previously used and new methods for reducing bias in density estimates caused by reactive movement in camera trap studies.
instance, Houa et al. (2022) documented a single type of reactive behaviour in <1% to 37% of detections; Henrich et al. (2020) documented a single type of reactive behaviour in 2%-43% of events; Henrich et al. (2022) recorded a single type of reactive behaviour in 2%-25% of events; and Bessone et al. (2020) recorded any reactive behaviour in 7%-22% of detections for five species and 80% of detections for forest elephants (Loxodonta cyclotis).
3) Dr = Drnaive * 1 m where Dr = the corrected reactive density, and Drnaive = the naïve reactive density before applying the multiplier.We estimated cumulative density encompassing both object strata via where Dc = the cumulative density, and Dnr = the density of the nonreactive strata.When conducting nonparametric bootstrapping to estimate the standard error and confidence intervals of Dc , uncertainty from m was incorporated by estimating a unique m for each bootstrapped sample.Henceforth, we refer to this method as the multiplier method.
ulated (i.e.speed increase exhibited by animals if they fled) was fast enough that the animal exited the camera's field of view before the next potential detection.Such fast flight responses can occur in ecological research with camera traps (Meek et al., 2014; Z. J. Delisle, M. Henrich, P. Palencia, & R. Swihart, personal communication).If no subsequent detection is recorded after an animal flees, then neither the speed parameter nor the EDD would be biased.We based our simulated flight speed on observed coyote (Canis latrans) flight responses to cameras after detection (Z.J. Delisle, M. Henrich, P. Palencia, & R. Swihart, personal communication).Therefore, if future researchers are estimating density of animals that are likely to have multiple detections after fleeing, we encourage additional simulations with slower flight speeds.We were unable to find a satisfactory solution for reducing bias caused by fleeing irrespective of detection, although our REM Speed+EDD method provided modest improvements in terms of bias and confidence interval coverage.In real-world applications, it is difficult to know if animals are fleeing before the camera trap captures a photograph.Fleeing before detection results in even larger negative bias and is conceptually challenging to solve.We can think of no feasible way to tackle this issue on real-world populations without auxiliary data from other sources than the camera trap.If fleeing before detection is suspected to occur, researchers could potentially test the occurrence of such behaviour with a continuously filming camera surveilling the camera trap, or by equipping animals with GPS collars featuring accelerometers or video cameras.The estimated fraction of flights before detection could then be used to adjust density estimates by the fraction of the population available for detection.However, if animals in a population frequently flee before detection and estimates of flight rates are not available, it may not be feasible to estimate population density with camera traps.The potential occurrence of reactions to camera traps before first detection may strongly depend on visibility of the camera trap.When the FOV is the only area where the camera can be seen by animals due to dense vegetation, the likelihood that behavioural responses occur before first detection is low.For example, in heavily forested regions of Germany, a low probability of reactions was noted for red deer (Cervus elaphus) and roe deer (Capreolus capreolus) facing away from or parallel to the camera(Henrich et al., 2020).Conversely, in an open field where poles may be erected to secure camera traps, the probability that animals spot cameras and alter their behaviour within a larger radius likely increases.Perhaps the best way to reduce bias from reactive behaviour is to minimize the probability of reactions in the field.Setting cameras well in advance of data collection and allowing animals to become accustomed to camera presence can reduce reactive behaviour, especially flight responses

For
group-forming species that exhibit reactive behaviour, all members of a group may react similarly after only a single individual responds to the camera trap (Z.J. Delisle, M. Henrich, P.Palencia, &   R. Swihart, personal communication).This can be particularly challenging for scenarios when the study population has a propensity for fleeing behaviour, as the first individual detected may flee and cause other individuals outside of the camera field of view to also flee before being detected.If a group-forming population exhibits both fleeing and nonreactive behaviour (i.e.not every group flees), then the average group size of the study population could be estimated from the detections of nonreactive groups and used to further correct density estimates with the multiplier method for CTDS or potentially the encounter rate for REM.We encourage future work on group-forming species that flee when detected by cameras.Moreover, CTDS considers individual animals as sampling units even when study species form groups (i.e. the group is not the sampling unit).Therefore, for populations that exhibit freezing or attraction behaviour, diagnosing encounters or detections as reactive or nonreactive should be done for each individual regardless of the behaviour of other group members.