| Title: | Analyse Mark-Release-Recapture Data from Sterile Insect Technique (SIT) Field Experiments |
|---|---|
| Description: | Import field data about the study design such as the location and types of adult and egg traps, the release events, the trap surveys and the egg hatches. Provide functions to compute and plot various parameters of interest concerning competitiveness of sterile males, dispersal behaviour, survival rates and density of the wild male population. |
| Authors: | Françoise Chirara [ctb] (Logo designer), Facundo Muñoz [aut, cre] (Package developer, ORCID: <https://orcid.org/0000-0002-5061-4241>), Joint FAO/IAEA Centre of Nuclear Techniques in Food and Agriculture [fnd, cph] |
| Maintainer: | Facundo Muñoz <[email protected]> |
| License: | GPL-3 |
| Version: | 1.1.2.9015 |
| Built: | 2026-09-17 10:55:51 UTC |
| Source: | https://forge.inrae.fr/umr-astre/sit |
Compute a data.frame with dispersal information. I.e. age and distance
from release point for each capture. Possibly adjusting for inhomogeneous
trap arrangement.
dispersal( x, spatial_adjustment = TRUE, following_releases, following_days, species = NULL )dispersal( x, spatial_adjustment = TRUE, following_releases, following_days, species = NULL )
x |
A |
spatial_adjustment |
Logical. Whether to adjust observations to account for a irregular spatial arrangement of traps. |
following_releases |
A |
following_days |
Integer or missing (default). Number of days after
releases to return, if |
species |
a character vector of species to be returned. Defaults to
|
By default, the function uses all adult surveys in the sit area of captured
individuals released from point releases. You can control this behaviour
by passing a custom sit_revents object in following_releases.
Note that the spatial adjustment is performed with the provided traps. Thus, beware of using a subset of traps only.
A data.frame with dispersal data. Specifically, for each survey of
sterile males, their population (colour), the trap, the age, the
capture size n, the spatial weights w and the distance dist_m from
the release point, in metres.
dispersal(sit_prototype) yellow_release <- sit_revents(sit_prototype)[1,] dispersal( sit_prototype, following_releases = yellow_release, following_days = 7L )dispersal(sit_prototype) yellow_release <- sit_revents(sit_prototype)[1,] dispersal( sit_prototype, following_releases = yellow_release, following_days = 7L )
A set of minimal data.frames with fake egg and adult surveys, point and areal release events, traps and trap-types.
fake_adults fake_eggs fake_rpoints fake_rareal fake_traps fake_trap_typesfake_adults fake_eggs fake_rpoints fake_rareal fake_traps fake_trap_types
A set of 6 data.frames, some of which also sf POINT objects.
A data.frame with 5 records from 4 days, 3 traps and 3
sterile populations + 1 wild population. The trap codes are consistent with
adult traps in fake_traps.
A data.frame with 4 records from 3 days and 2 traps, one
from the sit and one from the control areas. The trap codes are consistent
with egg traps in fake_traps.
A sf table with 3 point releases from 2 sites.
A data.frame with 2 areal releases.
A sf table of points with 5 traps of different types.
Four in the sit area and one ovitrap in the control area.
A data.frame with a minimal trap type
specification.
An object of class data.frame with 4 rows and 5 columns.
An object of class sf (inherits from data.frame) with 3 rows and 4 columns.
An object of class data.frame with 2 rows and 3 columns.
An object of class sf (inherits from data.frame) with 5 rows and 4 columns.
An object of class data.frame with 1 rows and 3 columns.
Manually generated for testing purposes.
Observed fertility rate from egg surveys.
fertility_rate(x, species = NULL, pool = FALSE)fertility_rate(x, species = NULL, pool = FALSE)
x |
Either a |
species |
Character. Filter results for a given species or ignore the species if missing. |
pool |
Logical. If |
The sit method uses all egg surveys in the study. For a sit object x,
fertility_rate(x) is thus equivalent to
fertility_rate(sit_egg_surveys(x)).
If pool = TRUE, a number. Otherwise, a data.frame with counts of
fertile and sterile eggs by trap and survey period, with the corresponding
proportion of fertile eggs.
fertility_rate(sit_prototype, pool = TRUE)fertility_rate(sit_prototype, pool = TRUE)
Index of the mating competitiveness of sterile males relative to wild males.
fried_index( sterile_wild_mr, natural_fertility, sit_fertility, residual_fertility )fried_index( sterile_wild_mr, natural_fertility, sit_fertility, residual_fertility )
sterile_wild_mr |
Non-negative number. Ratio of sterile to wild males in the target population. |
natural_fertility |
Number between 0 and 1. Proportion of fertile eggs in a natural (wild) population. |
sit_fertility |
Number between 0 and 1. Proportion of fertile eggs in the target population. |
residual_fertility |
Number between 0 and 1. Proportion of fertile eggs in a completely sterile population. Also called residual fertility. |
The competitiveness of the sterile male individuals is defined
as their relative capacity to mate with a wild female, compared to a wild
male.
Thus, in a homogeneously mixed population with sterile males and
wild males, the probability that a mating occurs with a sterile
individual is
where is the sterile-wild male ratio.
At a given sterile-wild male ratio we observe a
fertility rate in the field.
Assuming a residual fertility rate for sterile males and a
natural fertility rate for wild males, the observed fertility rate
in the field is:
Non-negative number.
fried_index( sterile_wild_mr = 0.3, natural_fertility = .9, sit_fertility = .71, residual_fertility = .05 )fried_index( sterile_wild_mr = 0.3, natural_fertility = .9, sit_fertility = .71, residual_fertility = .05 )
Compute a vector of weights for a set of elements (traps), to account for inhomogeneous spatial distribution relative to a reference (release) point.
inverse_radial_density(x)inverse_radial_density(x)
x |
Numeric vector of non-negative distances. |
The radial density of traps (i.e. number of traps in a ring ($r$, $r+dr$),
divided by the surface area of the ring) is proportional to the radius under
a spatially homogeneous distribution of traps, with a proportionality
constant of , where is the maximum radius.
This function performs a kernel-density estimation of the radial density of the given set of traps, using a boundary correction to avoid edge effects, and returns weights calculated as the inverse of the relative density, with respect to the expected density under homogeneity.
These weights can be used to adjust trap counts by spatial arrangement, in situations where the relationship between counts and the distance from the release point is relevant.
A inverse_radial_density object, which is a numeric vector of
weights (one for each trap in x, in the same order), with a set of
attributes used in the plot method.
## Homogeneous points set.seed(20211129) radial_dists_homog <- sqrt(runif(50)^2 + runif(50)^2) ird <- inverse_radial_density(radial_dists_homog) plot(ird)## Homogeneous points set.seed(20211129) radial_dists_homog <- sqrt(runif(50)^2 + runif(50)^2) ird <- inverse_radial_density(radial_dists_homog) plot(ird)
Estimate the size of the wild-male population.
lincoln_index(released, survival_rate, age, marked_recaptured, wild_catch)lincoln_index(released, survival_rate, age, marked_recaptured, wild_catch)
released |
Numeric. Number of sterile males released. |
survival_rate |
Numeric. Estimated survival rate. |
age |
Numeric. Number of days since release. |
marked_recaptured |
Numeric. Number of re-captured sterile males. |
wild_catch |
Numeric. Number of wild males captured. |
A simple estimate is obtained as follows (Thompson 2012, Ch. 18). Let the total captures at a day $t$ be the sum of $m_t$ marked and $n_t$ wild mosquitoes. Assuming that the proportion of marked individuals in the sample equals that in the population of size $P$:
where $M_t = R\,S^a_t$ is the number of marked individuals captured at time $t$, with $R$ the number of released adults, $S$ the daily survival rate and $a_t$ the number of days since release (age). I.e., the number of marked individuals at time $t$ is the remaining number from those released that survived for $a_t$ days.
The Lincoln Index (a.k.a. the Petersen estimator) has been used as a simple estimate of the wild male population size, assuming that the survival rate of an individual remains constant. Here we use a modified version that corrects for small samples and compensates for daily survival.
The values of $R$, $n_t$, $m_t$ and $t$ can be gathered from the adult surveys data. The calculation required the estimation of the survival rate $S$.
Thompson, Steven K. 2012. Sampling. 3rd ed. Wiley Series in Probability and Statistics. Hoboken, N.J: Wiley.
lincoln_index( released = 1e4, survival_rate = .80, age = 1, marked_recapture = 15, wild_catch = 5 )lincoln_index( released = 1e4, survival_rate = .80, age = 1, marked_recapture = 15, wild_catch = 5 )
sit objectGathers data about traps, release events and field survey data into a relational data model.
sit(traps, release_events, adult_surveys = NULL, egg_surveys = NULL)sit(traps, release_events, adult_surveys = NULL, egg_surveys = NULL)
traps |
A |
release_events |
A |
adult_surveys |
A |
egg_surveys |
A |
A sit object that can be queried with functions from the package.
sit( sit_traps(fake_traps), c(sit_revents(fake_rpoints), sit_revents(fake_rareal)), sit_adult_surveys(fake_adults), sit_egg_surveys(fake_eggs) )sit( sit_traps(fake_traps), c(sit_revents(fake_rpoints), sit_revents(fake_rareal)), sit_adult_surveys(fake_adults), sit_egg_surveys(fake_eggs) )
Import survey field data from adult traps, or retrieve the data from a sit
object.
sit_adult_surveys(x, ...) ## S3 method for class 'data.frame' sit_adult_surveys( x, trap = "trap", type = "type", survey = "survey", activation = "activation", duration = "duration", population = "population", species = "species", sex = "sex", n = "n", ... ) ## S3 method for class 'sit' sit_adult_surveys( x, area = c("control", "sit"), trap_type = sit_trap_types(x)$label, following_releases, following_days, species = NULL, ... )sit_adult_surveys(x, ...) ## S3 method for class 'data.frame' sit_adult_surveys( x, trap = "trap", type = "type", survey = "survey", activation = "activation", duration = "duration", population = "population", species = "species", sex = "sex", n = "n", ... ) ## S3 method for class 'sit' sit_adult_surveys( x, area = c("control", "sit"), trap_type = sit_trap_types(x)$label, following_releases, following_days, species = NULL, ... )
x |
A |
... |
Used to pass arguments to specific method. |
trap |
Identification code of the trap. This is the user’s code
corresponding to the |
type |
Character string. Trap type. |
survey |
Character. Date and optionally the time of the survey. See details on the date format. |
activation |
Character. Date and optionally the time of the survey
activation. See details on the date format. Either |
duration |
Numeric. Number of days (integer or fractional) that the trap has been functioning. |
population |
Character. Either |
species |
Character. Only required if the counts of wild individuals are
further categorised by species. Make sure to use the same nomenclature as
in |
sex |
Character. Either |
n |
Mandatory. An integer number of the surveyed individuals in the corresponding group. |
area |
Character vector. Either |
trap_type |
Character vector. Any subset of
|
following_releases |
A |
following_days |
Integer or missing (default). Number of days after
releases to return, if |
The argument type is mandatory only if needed to uniquely identify the trap
(i.e., more than one adult trap type is declared with sit_trap_types() and
the same code has been used for traps of different types). If the user used
unique codes for each trap, which will be checked internally, this is
redundant and will be ignored in any case.
Dates must be provided in the RFC 3339 format (a variation of the ISO 8601 format), i.e., 2021-12-31 or
2019-11-23 15:00.
A object of class sit_adult_surveys which can be used in sit().
data.frame: Imports field survey data from adult traps.
sit: Retrieve adult survey data, possibly filtering
results.
Other importing:
sit_egg_surveys(),
sit_revents(),
sit_traps()
ad_surv <- data.frame( trap = 1:3, survey = c("2021-04-01", "2021-08-21", "2021-08-21"), duration = rep(7L, 3), population = c("blue", "yellow", "yellow"), species = "aeg", sex = c("male", "male", "female"), n = 1:3 ) sit_adult_surveys(ad_surv)ad_surv <- data.frame( trap = 1:3, survey = c("2021-04-01", "2021-08-21", "2021-08-21"), duration = rep(7L, 3), population = c("blue", "yellow", "yellow"), species = "aeg", sex = c("male", "male", "female"), n = 1:3 ) sit_adult_surveys(ad_surv)
Estimate competitiveness of sterile males
sit_competitiveness( x, following_releases = sit_revents(x, type = "areal"), following_days = 7, residual_fertility = 0.01, species = NULL )sit_competitiveness( x, following_releases = sit_revents(x, type = "areal"), following_days = 7, residual_fertility = 0.01, species = NULL )
x |
A |
following_releases |
A |
following_days |
Integer or missing (default). Number of days after
releases to return, if |
residual_fertility |
Numeric. Default: 0.05. |
species |
Character. Filter results for a given species or ignore the species if missing. |
A numeric value.
sit_competitiveness(sit_prototype)sit_competitiveness(sit_prototype)
Diffusion
sit_diffusion( x, pool = FALSE, spatial_adjustment = TRUE, following_releases, following_days, species = NULL )sit_diffusion( x, pool = FALSE, spatial_adjustment = TRUE, following_releases, following_days, species = NULL )
x |
A |
pool |
Logical. Whether to aggregate data from released populations. |
spatial_adjustment |
Logical. Whether to adjust observations to account for a irregular spatial arrangement of traps. |
following_releases |
A |
following_days |
Integer or missing (default). Number of days after
releases to return, if |
species |
a character vector of species to be returned. Defaults to
|
A named numeric vector with one value for each requested level.
(diff_prototype <- sit_diffusion(sit_prototype)) plot(diff_prototype)(diff_prototype <- sit_diffusion(sit_prototype)) plot(diff_prototype)
Import survey field data from egg traps, or retrieve the data from a sit
object.
sit_egg_surveys(x, ...) ## S3 method for class 'data.frame' sit_egg_surveys( x, trap = "trap", type = "type", survey = "survey", activation = "activation", duration = "duration", species = "species", fertile = "fertile", n = "n", ... ) ## S3 method for class 'sit' sit_egg_surveys( x, area = c("control", "sit"), trap_type = sit_trap_types(x)$label, following_releases, following_days, species = NULL, ... )sit_egg_surveys(x, ...) ## S3 method for class 'data.frame' sit_egg_surveys( x, trap = "trap", type = "type", survey = "survey", activation = "activation", duration = "duration", species = "species", fertile = "fertile", n = "n", ... ) ## S3 method for class 'sit' sit_egg_surveys( x, area = c("control", "sit"), trap_type = sit_trap_types(x)$label, following_releases, following_days, species = NULL, ... )
x |
A |
... |
Used to pass arguments to specific method. |
trap |
Identification code of the trap. This is the user’s code
corresponding to the |
type |
Character string. Trap type. |
survey |
Character. Date and optionally the time of the survey. See details on the date format. |
activation |
Character. Date and optionally the time of the survey
activation. See details on the date format. Either |
duration |
Numeric. Number of days (integer or fractional) that the trap has been functioning. |
species |
Character. |
fertile |
Logical. Whether |
n |
Mandatory. An integer number of the surveyed individuals in the corresponding group. |
area |
Character vector. Either |
trap_type |
Character vector. Any subset of
|
following_releases |
A |
following_days |
Integer or missing (default). Number of days after
releases to return, if |
The argument type is mandatory only if needed to uniquely identify the trap
(i.e., more than one egg trap type is declared with sit_trap_types() and
the same code has been used for traps of different types). If the user used
unique codes for each trap, which will be checked internally, this is
redundant and will be ignored in any case.
Dates must be provided in the RFC 3339 format (a variation of the ISO 8601 format), i.e., 2021-12-31 or
2019-11-23 15:00.
A object of class sit_egg_surveys which can be used in sit().
data.frame: Imports field survey data from egg traps.
sit: Retrieve egg survey data, possibly filtering
results.
Other importing:
sit_adult_surveys(),
sit_revents(),
sit_traps()
egg_surv <- data.frame( trap = 1:3, survey = c("2021-04-01", "2021-08-21", "2021-08-21"), duration = rep(7L, 3), fertile = c(TRUE, FALSE, TRUE), n = 1:3 ) sit_egg_surveys(egg_surv)egg_surv <- data.frame( trap = 1:3, survey = c("2021-04-01", "2021-08-21", "2021-08-21"), duration = rep(7L, 3), fertile = c(TRUE, FALSE, TRUE), n = 1:3 ) sit_egg_surveys(egg_surv)
Flight Range
sit_flight_range( x, pool = FALSE, levels = c(50, 90), spatial_adjustment = TRUE, following_releases, following_days, species = NULL )sit_flight_range( x, pool = FALSE, levels = c(50, 90), spatial_adjustment = TRUE, following_releases, following_days, species = NULL )
x |
A |
pool |
Logical. Whether to aggregate data from released populations. |
levels |
Numeric vector with values between 0 and 100. Requested levels of flight range, in percentage. |
spatial_adjustment |
Logical. Whether to adjust observations to account for a irregular spatial arrangement of traps. |
following_releases |
A |
following_days |
Integer or missing (default). Number of days after
releases to return, if |
species |
a character vector of species to be returned. Defaults to
|
A named numeric vector with one value for each requested level.
sit_flight_range(sit_prototype)sit_flight_range(sit_prototype)
Mean Distance Travelled and Mean Dispersal Distance
sit_mdt( x, by = c("population", "age"), spatial_adjustment = TRUE, following_releases, following_days, species = NULL )sit_mdt( x, by = c("population", "age"), spatial_adjustment = TRUE, following_releases, following_days, species = NULL )
x |
A |
by |
Character vector. Either 'population', or 'age', both (default), or NULL. |
spatial_adjustment |
Logical. Whether to adjust observations to account for a irregular spatial arrangement of traps. |
following_releases |
A |
following_days |
Integer or missing (default). Number of days after
releases to return, if |
species |
a character vector of species to be returned. Defaults to
|
By default (i.e. by = c('population', 'age')), a table with MDT
computed for each released population at each age (i.e., number of days
since release). If by is either one of the grouping variables, the
results will be presented for each value of the corresponding variable.
Finally, if by = NULL, all populations and ages are pooled together and
the function returns a single number.
sit_mdt(sit_prototype) sit_mdt(sit_prototype, by = 'population') sit_mdt(sit_prototype, by = 'age') sit_mdt(sit_prototype, by = NULL)sit_mdt(sit_prototype) sit_mdt(sit_prototype, by = 'population') sit_mdt(sit_prototype, by = 'age') sit_mdt(sit_prototype, by = NULL)
sit object with fake dataA sit object with realistic (but fake) data for demonstration purposes.
sit_prototypesit_prototype
A sit object with 3 point releases, all from the same location, and
1 areal release; 21 adult and 14 traps in the study area, 7 ovitraps in a
control area. All ovitraps lacking coordinates. Adult traps surveyed daily
for 36 consecutive days starting the day after the first release.
Ovitraps from both areas surveyed weekly.
Manually generated for demonstration purposes.
Provide a sf object with a POINT at each record corresponding to a
release point or a data.frame for a areal release, specifying which
variables contain the required information. Or, extract the release events
used in a sit object.
sit_revents(x, ...) ## S3 method for class 'sf' sit_revents(x, date = "date", colour = "colour", n = "n", species = NULL, ...) ## S3 method for class 'data.frame' sit_revents(x, date = "date", colour = "colour", n = "n", species = NULL, ...) ## S3 method for class 'sit_revents' c(...) ## S3 method for class 'sit' sit_revents(x, type = c("point", "areal"), ...)sit_revents(x, ...) ## S3 method for class 'sf' sit_revents(x, date = "date", colour = "colour", n = "n", species = NULL, ...) ## S3 method for class 'data.frame' sit_revents(x, date = "date", colour = "colour", n = "n", species = NULL, ...) ## S3 method for class 'sit_revents' c(...) ## S3 method for class 'sit' sit_revents(x, type = c("point", "areal"), ...)
x |
Object of class |
... |
Used to pass arguments to specific method. |
date |
Character string representing a date and optionally the time, in
the RFC 3339 format (a variation of
the ISO 8601 format), i.e.,
|
colour |
Character string. Colour of the release. |
n |
Numeric. Natural number. Number of individuals released. |
species |
Optional character. Released species. |
type |
Character vector. Which types of release events to retrieve.
Either |
A object of class sit_revents which can be used in sit().
sit_revents objects can be concatenated together with c(), in order to
import a mixture of point and areal releases into a sit object. See
examples.
sf: Imports point release data.
data.frame: Imports areal release data.
sit_revents: Concatenate release events.
sit: Extracts release events.
Other importing:
sit_adult_surveys(),
sit_egg_surveys(),
sit_traps()
point_releases <- sit_revents( sf::st_as_sf( data.frame( x = 1:3, y = 3:1, date = c("2019-11-25", "2019-12-01", "2019-12-13"), colour = c("yellow", "red", "blue"), n = 1e4 ), coords = c("x", "y") ) ) areal_release <- sit_revents( data.frame( x = 1, y = 1, date = "2019-12-21", colour = "pink", n = 1e4 ) ) (c(point_releases, areal_release)) # also a `sit_revent` objectpoint_releases <- sit_revents( sf::st_as_sf( data.frame( x = 1:3, y = 3:1, date = c("2019-11-25", "2019-12-01", "2019-12-13"), colour = c("yellow", "red", "blue"), n = 1e4 ), coords = c("x", "y") ) ) areal_release <- sit_revents( data.frame( x = 1, y = 1, date = "2019-12-21", colour = "pink", n = 1e4 ) ) (c(point_releases, areal_release)) # also a `sit_revent` object
Compute the Probability of Daily Survival (PDS), the Average Life
Expectancy ALE, Recapture Rate RR, Survival Rate SR), by
population (by default, unless pool = TRUE)
sit_survival( x, pool = FALSE, spatial_adjustment = TRUE, following_releases, following_days, species = NULL )sit_survival( x, pool = FALSE, spatial_adjustment = TRUE, following_releases, following_days, species = NULL )
x |
A |
pool |
Logical. Whether to aggregate data from released populations. |
spatial_adjustment |
Logical. Whether to adjust observations to account for a irregular spatial arrangement of traps. |
following_releases |
A |
following_days |
Integer or missing (default). Number of days after
releases to return, if |
species |
a character vector of species to be returned. Defaults to
|
A sit_survival object, which is a data.frame with additional
attributes which can be plotted.
(surv_prototype <- sit_survival(sit_prototype)) plot(surv_prototype)(surv_prototype <- sit_survival(sit_prototype)) plot(surv_prototype)
Extracts the table of trap types used in a sit experiment, or defines
a table of trap types.
sit_trap_types(x) ## S3 method for class 'sit' sit_trap_types(x) ## S3 method for class 'data.frame' sit_trap_types(x)sit_trap_types(x) ## S3 method for class 'sit' sit_trap_types(x) ## S3 method for class 'data.frame' sit_trap_types(x)
x |
A |
Returns the table of trap types used in the sit object x.
Defines a table of trap types by passing a data.frame with variables
name, label, stage (either egg or adult) and optionally
description. Any other variable is ignored with a warning.
Returns the default table of trap types by calling sit_trap_types()
without any argument.
Check the default trap types with sit_trap_types().
You can store the table into an object and make edits as for a regular
data.frame. E.g. add another trap type, or edit labels or descriptions.
You can use the edited object as an input to the trap_types arguments in
sit_traps().
Table of trap types used in the sit experiment x. If x is a
data.frame, returns it as a table of trap types after some verifications.
If x is missing, returns the current table of trap types.
sit: Extract trap data
data.frame: Import trap data
sit_trap_types() # default trap types. # Define new trap types my_traps <- data.frame(name = "My New Trap", label = "MNT", stage = "adult") sit_trap_types(my_traps)sit_trap_types() # default trap types. # Define new trap types my_traps <- data.frame(name = "My New Trap", label = "MNT", stage = "adult") sit_trap_types(my_traps)
Provide a sf object with a POINT at each record corresponding to a trap
location, specifying which variables contain the required information. Or
define a set of traps without spatial coordinates. Or, extract the trap data
used in a sit object.
sit_traps(x, ...) ## S3 method for class 'sf' sit_traps( x, id = "id", type = "type", area = "area", label, trap_types = sit_trap_types(), ... ) ## S3 method for class 'character' sit_traps(x, type, area, trap_types = sit_trap_types(), ...) ## S3 method for class 'numeric' sit_traps(x, ...) ## S3 method for class 'sit_traps' c(...) ## S3 method for class 'sit' sit_traps( x, type = sit_trap_types(x)$label, stage = unique(sit_trap_types(x)$stage), area = unique(x$traps$area), ... )sit_traps(x, ...) ## S3 method for class 'sf' sit_traps( x, id = "id", type = "type", area = "area", label, trap_types = sit_trap_types(), ... ) ## S3 method for class 'character' sit_traps(x, type, area, trap_types = sit_trap_types(), ...) ## S3 method for class 'numeric' sit_traps(x, ...) ## S3 method for class 'sit_traps' c(...) ## S3 method for class 'sit' sit_traps( x, type = sit_trap_types(x)$label, stage = unique(sit_trap_types(x)$stage), area = unique(x$traps$area), ... )
x |
Object of class |
... |
Used to pass arguments to specific method. |
id |
Character. Variable name with a custom code for the trap. Jointly
with |
type |
Character. Variable name with valid values of trap types
(i.e., any of |
area |
Character. Variable name with values either |
label |
Optional character. Variable name with custom text associated to the traps. |
trap_types |
Table of trap types, created with |
stage |
Character vector of stages (i.e., |
A object of class sit_traps which can be used in sit().
sf: Imports spatialised trap data
character: Imports non-spatialised trap data
numeric: Imports non-spatialised trap data
sit_traps: Combine traps.
sit: Extracts trap data
Other importing:
sit_adult_surveys(),
sit_egg_surveys(),
sit_revents()
## Build spatialised traps from a `sf` object traps_sf <- sf::st_as_sf( data.frame( x = 1:3, y = 3:1, "Trap.Id" = letters[1:3], Type = "BGS", area = "sit" ), coords = c("x", "y") ) sit_traps(traps_sf, id = "Trap.Id", type = "Type", area = "area") ## Build non-spatialised traps from a vector of codes sit_traps(paste0("C", 1:5), area = 'control', type = 'OVT') ## Retrieve traps in a `sit` object ## sit_traps(sit_prototype)## Build spatialised traps from a `sf` object traps_sf <- sf::st_as_sf( data.frame( x = 1:3, y = 3:1, "Trap.Id" = letters[1:3], Type = "BGS", area = "sit" ), coords = c("x", "y") ) sit_traps(traps_sf, id = "Trap.Id", type = "Type", area = "area") ## Build non-spatialised traps from a vector of codes sit_traps(paste0("C", 1:5), area = 'control', type = 'OVT') ## Retrieve traps in a `sit` object ## sit_traps(sit_prototype)
Estimate the size of the wild population, via the Lincoln Index.
sit_wild_size(x, pool = FALSE, species = NULL)sit_wild_size(x, pool = FALSE, species = NULL)
x |
A |
pool |
Logical. Whether to aggregate data from released populations. |
species |
a character vector of species to be returned. Defaults to
|
This provides multiple estimates of the population size, one for each age $t$ and for each released population, which can be averaged to compute a final estimate based on all the available data.
The calculation needs to be split by released population. First, because survival rates could be different among populations, but also because the number $n_t$ of captured wild males at a given date can be compared against the number of captured sterile males $m_t$ at different ages.
A sit_wild_size object.
sit_wild_size(sit_prototype)sit_wild_size(sit_prototype)
Observed ratio between sterile and wild male individuals from adult surveys.
sterile_wild_male_ratio(x, pool)sterile_wild_male_ratio(x, pool)
x |
Either a |
pool |
Logical. If |
The sit method uses all adult surveys from the study (sit) area. For a
sit object x, sterile_wild_male_ratio(x) is thus equivalent to
sterile_wild_male_ratio(sit_adult_surveys(x, area = 'sit')).
If pool = TRUE, a number. Otherwise, a data.frame with counts of
sterile and wild males by trap and survey period, with the corresponding
ratio.
sterile_wild_male_ratio(sit_prototype, pool = TRUE)sterile_wild_male_ratio(sit_prototype, pool = TRUE)
Compute the age (i.e. number of days since release to capture) of released sterile males.
survey_ages(surveys, releases)survey_ages(surveys, releases)
surveys |
A |
releases |
A |
A data.frame, with a similar structure as surveys but with captures
of the sterile males from the target releases only, and with additional
variables for the release date and the age of the individual at the moment
of the survey in number of days.
head( survey_ages(sit_adult_surveys(sit_prototype), sit_revents(sit_prototype)) )head( survey_ages(sit_adult_surveys(sit_prototype), sit_revents(sit_prototype)) )