Learn R Programming

ifit (version 1.0.0)

toad-model: Marchand et al.'s toad movement model

Description

Function toadSim (written in C++) simulates a realization from the "model 1" suggested by Marchand et al. (2017); function toadStat computes a possible summary statistics.

Usage

toadSim(theta, data)

toadStat( data, lags = c(1, 2, 4, 8), q = c(0.01, seq(0.05, 0.95, by = 0.05), 0.99), dret = 10 )

Value

toadSim return a numerical matrix of the same size of data

toadStat returns a numeric vector of length length(lags)x(1+length(q)). The summary statistic is computed from absolute displacements at time lags classified as "returns" or "non-returns" depending on whether they are smaller than dret. For each lag in lags, the statistic comprises the "return" frequency and the median and adjacent quantile differences of the logarithms of the "non-return" distances (the quantiles are those specified in q).

Arguments

theta

a vector of length 3 containing the model parameters

data

a (number of days)x(number of toads) numerical matrix containing the locations of a set of toads. The simulated dataset will replicates the size, the NA pattern and the initial positions (first row) of this argument.

lags

an integer vector giving the lags used to compute the statistic

q

a numeric vector specifying the desired quantiles

dret

the distance used to classify the displacements as "returns" or "non-returns".

Details

The model describes the nocturnal movements (along a single spatial dimension) of Fowler's toads. It assumes that toads leave their refuges at night to forage and hide within sand dunes during the day. After the t-th nocturnal foraging phase, a toad is located at a displacement of \(\Delta_t\) meters from its previous refuge site. The displacements \(\Delta_t\) are assumed to be independent and identically distributed realizations of a symmetric, zero-centered \(\alpha\)-stable random variable with stability parameter \(\alpha\) and scale parameter \(\gamma\). The toad then either returns to one of the previously visited sites (with probability \(\pi\)) or remains at its current location (with probability \(1-\pi\)). In the former case, the refuge site is selected at random. The model parameter vector is \(\theta=(\alpha, \gamma, \pi)'\).

References

Philippe Marchand, Morgan Boenke, and David M. Green (2017) ‘A Stochastic Movement Model Reproduces Patterns of Site Fidelity and Long-Distance Dispersal in a Population of Fowler’s Toads (Anaxyrus Fowleri)’, Ecological Modelling, 360, pp 63–69, tools:::Rd_expr_doi("10.1016/j.ecolmodel.2017.06.025").

Examples

Run this code
# \donttest{
# It takes some time to run
set.seed(20251025L)
tobs <- toadStat(toads)
tsim <- function(theta) toadStat(toadSim(theta, toads))
m <- ifit(tobs, tsim, l = c(0.01, 0, 0), u = c(2, 100, 1), trace = 1000)
m
confint(m)
numsimIFIT(m)
estfunIFIT(m)
diagIFIT(m)
# }

Run the code above in your browser using DataLab