| Internal {ipsecr} | R Documentation |
Internal Functions
Description
Functions called internally by ipsecr. These are exported and may be called separately for testing.
Usage
proxy.ms(capthist, model = NULL, trapdesigndata = NULL, ...)
detectionDesignData(capthist, byoccasion = FALSE, ...)
proxyfn1(capthist, N.estimator = c("n", "null","zippin","jackknife"), ...)
simpop(mask, D, N, details = list(), ...)
simCH(traps, popn, detectfn, detparmat, noccasions, NT = NULL, details =
list(), ...)
rpsv(capthist)
rpsvi(capthist)
Arguments
capthist |
secr capthist object |
model |
named list of model formulae (see |
trapdesigndata |
dataframe with one row for each detector and session |
... |
other arguments, mostly unused |
byoccasion |
logical; if TRUE the output rows are repeated for each occasion |
N.estimator |
character name of closed-population estimator |
mask |
secr mask object |
D |
numeric density in each mask cell |
N |
integer number of animals to simulate |
traps |
detector locations as secr traps object |
popn |
animal locations as secr popn object |
detectfn |
integer code for detection function (see detectfn) |
detparmat |
numeric matrix of detection parameter values |
noccasions |
integer number of sampling occasions |
NT |
numeric hazard of non-target interference at each detector |
details |
list with optional additional named arguments |
Details
proxy.ms is the default proxyfn used by ipsecr.fit. When used internally by ipsecr.fit, ‘model’ and ‘trapdesigndata’ are passed automatically. The ... argument of proxy.ms may be used to pass arguments to addCovariates, especially ‘spatialdata’. Function detectionDesignData is used internally to construct design data for non-constant detection models (lambda0, sigma), used in the glm 'data' argument. The capthist argument for detectionDesignData should always be a list (wrap a single-session capthist in list()).
simpop is used by ipsecr.fit for popmethod 'internal'. It is faster and simpler than the secr function sim.popn. The details component 'distribution' is a character value that may be ‘poisson’ (default) or 'even.
simCH is used by ipsecr.fit for CHmethod 'internal'. It is faster and simpler than the secr function sim.capthist, and optionally simulates non-target interference. The argument detparmat is an individual x parameter matrix, with parameters in the order usual for detectfn.
D and NT are matrices with one column per session.
proxyfn1 is a simple proxy function included mostly for historical reasons. It updates the function of Efford (2004) by log-transforming N, using a complementary log-log transformation instead of odds for p, and using log(RPSV(capthist)) for sigma. If you're interested, look at the code.
rpsv(capthist) is equivalent to secr RPSV(capthist, CC = TRUE). rpsvi(capthist) returns a vector of individual-specific rpsv.
Value
proxy.ms – a numeric vector of length >= 3 corresponding to proxies for a wide range of models, including multi-session density and non-target interference models.
detectionDesignData – a dataframe with one row per individual per session (byoccasion = FALSE) or one row per individual per occasion per session (byoccasion = TRUE), ordered by session, occasion and individual. Columns include x and y coordinates of the individual's centroid, session, and any individual covariates.
proxyfn1 – a numeric vector of length 3 corresponding to proxies for population size, capture probability intercept and scale of detection.
simpop – a popn object.
simCH – a single-session capthist object.
rpsv – scalar
rpsvi – vector, one element per animal
Note
proxyfn0 was removed in version 1.2.0.
References
Efford, M. G. (2004) Density estimation in live-trapping studies. Oikos 106, 598–610.
See Also
Examples
proxy.ms(captdata)