compare_buffers: Perform sensitivity analysis of buffer size for nest...

View source: R/performance_funs.R

compare_buffersR Documentation

Perform sensitivity analysis of buffer size for nest detection

Description

compare_buffers compares nest identification results obtained using buffers of different size. This function is useful to perform sensitivity analyses of nest-detection results as the chosen buffer size varies. This helps both to demonstrate robustness of results independent of buffer size as well as to choose an appropriate buffer size for the species and data at hand. Users can specify a set of buffers that they wish to compare. Then, compare_buffers applies the same procedure as find_nests to the data using each of the different buffers. For the sake of keeping computation time at a manageable level, if the full dataset is large, it is recommended to only use a subset of data to test buffers on. If data on known nest locations are provided, compare_buffers also computes the following performance metrics for each buffer size:

Usage

compare_buffers(
  gps_data,
  buffers,
  known_coords,
  sp_tol = 100,
  min_pts,
  sea_start,
  sea_end,
  nest_cycle,
  min_d_fix,
  min_consec,
  min_top_att,
  min_days_att,
  discard_overlapping = TRUE
)

Arguments

gps_data

data.frame of movement data. Needs to include burst, date, long, lat

buffers

A vector of buffer sizes

known_coords

data.frame of coordinates for known nests. Needs to include burst, long, lat.

sp_tol

Integer. Spatial tolerance value: maximum distance tolerated between the estimated location of a nest and its actual (known) location. Defaults to 100 meters.

min_pts

Minimum number of points within a buffer

sea_start

Character string. Earliest date to be considered within the breeding season. Month and day, format "mm-dd"

sea_end

Character string. Latest date to be considered within the breeding season. Month and day, format "mm-dd"

nest_cycle

Duration of nesting cycle

min_d_fix

Minimum number of fixes for a day to be retained if no nest visit was recorded

min_consec

Minimum number of consecutive days visited

min_top_att

Minimum percent of fixes at a location on the day with maximum attendance

min_days_att

Minimum percent of days spent at a location between first and last visit

discard_overlapping

If results include temporally overlapping attempts, select only one among those? Defaults to TRUE.

Details

  • Positive predictive value, i.e., the proportion of identified nests that are known to be true nests;

  • Sensitivity, i.e., the proportion of known nests that were successfully identified;

  • False negative rate, i.e., the proportion of known nests that we failed to identify.

The false positive rate, i.e., the proportion of spurious nests among those identified, is not computed because it would require the assumption that any nests that are detected but are not known are spurious, which is not reasonable in most situations. Users can evaluate which buffer size is more appropriate based on the performance metrics. Regardless of whether data on known nest locations are provided, compare_buffers computes the total number of nests found for each buffer size as well as the number of nests found for each burst. If the user provides data on known nests, they can also specify a value of spatial tolerance to use as a cutoff to establish whether a nest was correctly identified: since coordinates of detected nests rarely match exactly the actual (known) coordinates of the nest, users can define which distance between real and estimated location they are willing to accept at most. If no data on true nests are available, these numbers can provide an indication of whether a given buffer size likely results in over- or underestimation of the number of nests. compare_buffers takes almost exactly the same arguments as find_nests, except for the argument 'buffer' which is here replaced with 'buffers' and for the additional arguments 'known_coords' and 'sp_tol'.

Value

Returns a list of variable length including:

  • As many data frames of nest locations as the number of buffers specified (formatted like 'nests' in the output of find_nests);

  • A data.frame reporting the total number of nests identified with each buffer size;

  • A data.frame reporting the total number of nests identified with each buffer size for each burst;

  • If 'known_coords' is provided, a data.frame reporting the positive predictive value obtained with each buffer size;

  • If 'known_coords' is provided, a data.frame reporting the sensitivity obtained with each buffer size;

  • If 'known_coords' is provided, a data.frame reporting the false negative rate obtained with each buffer size;


picardis/nestR documentation built on July 2, 2024, 6:35 p.m.