Internal {openCR} | R Documentation |
Internal Functions
Description
Functions called by openCR.fit
when details$R == TRUE
, and some others
Usage
prwi (type, n, x, jj, cumss, nmix, w, fi, li, openval, PIA, PIAJ, intervals, CJSp1)
prwisecr (type, n, x, nc, jj, kk, mm, nmix, cumss, w, fi, li, gk, openval,
PIA, PIAJ, binomN, Tsk, intervals, h, hindex, CJSp1, moveargsi,
movementcode, sparsekernel, edgecode, usermodel, kernel = NULL,
mqarray = NULL, cellsize = NULL, r0)
PCH1 (type, x, nc, cumss, nmix, openval0, PIA0, PIAJ, intervals)
PCH1secr (type, individual, x, nc, jj, cumss, kk, mm, openval0, PIA0, PIAJ, gk0,
binomN, Tsk, intervals, moveargsi, movementcode, sparsekernel, edgecode,
usermodel, kernel, mqarray, cellsize, r0)
pradelloglik (type, w, openval, PIAJ, intervals)
cyclic.fit (..., maxcycle = 10, tol = 1e-5, trace = FALSE)
Arguments
type |
character |
n |
integer index of capture history |
x |
integer index of latent class |
jj |
integer number of primary sessions |
cumss |
integer vector cumulative number of secondary sessions at start of each primary session |
nmix |
integer number of latent classes |
w |
array of capture histories |
fi |
integer first primary session |
li |
integer last primary session |
openval |
dataframe of real parameter values (one unique combination per row) |
PIA |
parameter index array (secondary sessions) |
PIAJ |
parameter index array (primary sessions) |
intervals |
integer vector |
h |
numeric 3-D array of hazard (mixture, mask position, hindex) |
hindex |
integer n x s matrix indexing h for each individual, secondary session |
CJSp1 |
logical; should CJS likelihood include first primary session? |
moveargsi |
integer 2-vector for index of move.a, move.b (negative if unused) |
movementcode |
integer 0 static, 1 uncorrelated etc. |
sparsekernel |
logical; if TRUE then only cardinal and intercardinal axes are included |
edgecode |
integer 0 none, 1 wrap, 2 truncate |
usermodel |
function to fill kernel |
kernel |
dataframe with columns x,y relative coordinates of kernel cell centres |
mqarray |
integer matrix |
cellsize |
numeric length of side of kernel cell |
r0 |
numeric; effective radius of zero cell for movement models (usually 0.5) |
gk |
real array |
Tsk |
array detector usage |
openval0 |
openval for naive animals |
PIA0 |
PIA for naive animals |
individual |
logical; TRUE if model uses individual covariates |
gk0 |
gk for naive animals |
nc |
number of capture histories |
kk |
number of detectors |
mm |
number of points on habitat mask |
binomN |
code for distribution of counts (see |
... |
named arguments passed to |
maxcycle |
integer maximum number of cycles (maximizations of a given parameter) |
tol |
absolute tolerance for improvement in log likelihood |
trace |
logical; if TRUE a status message is given at each maximization |
Details
cyclic.fit
implements cyclic fixing more or less as described by
Schwarz and Arnason (1996) and used by Pledger et al. (2010). The
intention is to speed up maximization when there are many (beta)
parameters. However, fitting is slower than with a single call to
openCR.fit
, and the function is here only as a curiosity
(it is not exported in 1.2.0).
Value
cyclic.fit
returns a fitted model object of class ‘openCR’.
Other functions return numeric components of the log likelihood.
References
Pledger, S., Pollock, K. H. and Norris, J. L. (2010) Open capture–recapture models with heterogeneity: II. Jolly-Seber model. Biometrics 66, 883–890.
Schwarz, C. J. and Arnason, A. N. (1996) A general methodology for the analysis of capture-recapture experiments in open populations. Biometrics 52, 860–873.
See Also
Examples
## Not run:
openCR:::cyclic.fit(capthist = dipperCH, model = list(p~t, phi~t), tol = 1e-5, trace = TRUE)
## End(Not run)