These functions compute various demographic parameters and capture probabilities per period using loglinear robust design models in capture-recapture experiments.

`robustd.t`

and `robustd.0`

fit the model using different response variable.
`robustd.t`

uses the frequencies of the observable capture histories in terms of capture success or failure for each
capture occasions of each primary period. `robustd.0`

uses the frequencies of the observable capture histories in terms
of number of captures per primary period.

```
robustd.t(X, dfreq = FALSE, vt, vm = "M0", vh = list("Chao"),
vtheta = 2, neg = TRUE)
```robustd.0(X, dfreq = FALSE, vt, vm = "M0", vh = list("Chao"),
vtheta = 2, neg = TRUE)

# S3 method for robustd
print(x, …)

X

The matrix of the observed capture histories (see `Rcapture-package`

for a description of the accepted formats).

dfreq

A logical. By default FALSE, which means that `X`

has one row per unit. If TRUE, it indicates that the matrix
`X`

contains frequencies in its last column.

vt

A vector containing the numbers of capture occasions for each primary sampling period. The length of this vector equals the number of primary sampling periods (noted \(I\)).

vm

A vector indicating the closed population model for each primary period. The elements of `vm`

can be "none"=no model,
"M0"=M0 model, "Mt"=Mt model, "Mh"=Mh model or "Mth"=Mth model for `robustd.t`

. For `robustd.0`

, models with
time effect are not allowed. So `vm`

can than be "none"=no model, "M0"=M0 model, or "Mh"=Mh model.
The 'no model' cannot be selected for the first or the last period. If a single character string is given for
`vm`

, the corresponding model is used for all periods. The default value for `vm`

is "M0" for all period.

vh

A list indicating, for each primary period with a heterogeneity model, the form of the columns for heterogeneity in the
design matrix. The elements of `vh`

can be "Chao", "Poisson", "Darroch" or any numerical `R`

function created
beforehand by the user. "Chao" represents Chao's model, "Poisson" represents the function \(f(k)=theta^k-1\),
where \(k\) is the number of captures, "Darroch" represents the function \(f(k)=k^2/2\), and "Gamma" represents
the function \(f(k)=-\log(theta + k) + \log(theta)\). If an `R`

function is
given, it is the implementation of any convex mathematical function \(f(k)\). It has only one argument. For the Poisson
or Gamma model, the parameter `theta`

is specified in the argument `vtheta`

.

vtheta

A vector indicating, for each primary period with a Poisson or Gamma heterogeneity model, the value of the parameter.
If `vtheta`

consists of a single number, this number is used for all the periods with a Poisson or Gamma model.
The default value for `vtheta`

is 2 for all the periods with a Poisson or Gamma model.

neg

If this option is set to TRUE, negative gamma parameters and negative eta parameters in Chao's models are set to zero. This insures that the estimated survival probabilities belong to [0, 1] and that the births are positive.

x

An object, produced by the `robustd.t`

or the `robustd.0`

function, to print.

…

Further arguments to be passed to `print.default`

.

The number of captured units

A vector of length \(I\) identifying the closed population models chosen for each period.

A table containing the deviance, degrees of freedom and AIC of the fitted model.

A table containing, for the model with an added temporary emigration effect, the deviance, the degrees of freedom and the Akaike's information criterion.

The estimated temporary emigration parameters and their standards errors. The \(I-1\) first rows are estimations of the differences \(logit(p^b)-logit(p^w)\) for periods 2 to \(I-1\) (\(p^b\) represents a between primary period and \(p^w\) a within primary period estimate of the capture probability). The last row gives a pooled estimate of these differences calculated under the assumption that they are homogeneous. Negative estimates are associated with a temporary emigration.

The estimated capture probabilities per period and their standard errors.

The estimated survival probabilities between periods and their standard errors.

The estimated population sizes per period and their standard errors.

The estimated number of new arrivals in the population between periods and their standard errors.

The estimated total number of units who ever inhabited the survey area and its standard error.

The loglinear model parameters estimations and their standard errors, calculated by the `glm`

function.

The Ui statistics, useful for the survival probabilities calculation, and their standard errors

The Vi statistics, useful for the population sizes estimation, and their standard errors

The covariance matrix of all the demographic parameters estimates.

The position of the gamma and eta parameters set to zero in the loglinear parameter vector.

These functions also generate statistics to test the presence of temporary emigration.

The Poisson regression used to fit a robust design model has one entry for each possible capture history, including those that are
unobserved. The size of the dependent vector is therefore \(2^{\mbox{sum(vt)}}-1\) for `robustd.t`

.
Models with a large sum(vt) are hard to fit with `robustd.t`

. `robustd.0`

uses a more parsimonious coding for the capture
histories and can fit larger models.

Standard errors are calculated by linearization.

Baillargeon, S. and Rivest, L.P. (2007) Rcapture: Loglinear models for capture-recapture in R. *Journal of Statistical Software*, **19**(5), 10.18637/jss.v019.i05.

Rivest, L.P. and Daigle, G. (2004) Loglinear models for the robust design in mark-recapture experiments. *Biometrics*, **60**, 100--107.

```
# NOT RUN {
# The mvole data set contains a total of 30 capture occasions (the
# tenth capture occasion doesn't have any new capture and is taken
# out of the analysis). This number being large, we can only use
# the robustd.0 function to fit a robust design model.
# Not run :
# robustd.0(mvole[, -10], vt = c(5, 4, rep(5, 4)), vm = "Mh", vh = "Poisson", vtheta = 1.5)
# Should take a few seconds to run.
# Not run:
# robustd.t(mvole[, -10], vt = c(5, 4, rep(5, 4)), vm = 'Mh', vh = 'Poisson', vtheta = 1.5)
# Should fail.
# Considering only the first 3 periods of the data set, we can use the
# robustd.t function to fit a model with a temporal effect.
robustd.t(mvole[, c(1:9, 11:15)], vt = c(5, 4, 5), vm = "Mth", vh = "Poisson", vtheta = 1.5)
# }
```

Run the code above in your browser using DataCamp Workspace