Learn R Programming

Rcapture (version 1.1)

model.matrices: Construction of Matrices Useful for Loglinear Models in Capture-Recature Experiments (internal use)

Description

Zdelta produces the Zdelta matrix, i.e. the first component of the design matrix in a loglinear model for open population and robust design models. Xomega.t and Xomega.0 produce Xomega matrices, i.e. the second component of the design matrix in a loglinear model for robust designs. Xomega.t is used by robustd.t, and Xomega.0 is used by robustd.0. Xclosedp produces the design matrix for a closed population model. This matrix is used by robustd.t and robustd.0 to compute the capture probabilities.

Usage

Zdelta(Xdelta)
Xomega.t(vt, vm, vh, va, rd.call)
Xomega.0(vt, vm, vh, va, rd.call)
Xclosedp(t, m, h, a)

Arguments

Xdelta
The Xdelta matrix, i.e. the second component of the the design matrix in loglinear models for open populations or for the robust design.
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 elememts of vm can be "none"=no model, "M0"=M0 model, "Mt"=Mt model, "Mh"=Mh model or "Mth"=Mth model for Xomega.t. For Xomega.0, models wi
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 vht can be "Chao", "Poisson", "Darroch" or any numerical R function created be
va
A vector indicating, for each primary period with a Poisson model, the value of the exponent's base in $f(k)=a^k-1$.
rd.call
The call of the robust function in which the Xomega function is called.
t
The number of capture occasions.
m
A character string identifying the capture-recapture model : "none"=no model, "M0"=M0 model, "Mt"=Mt model, "Mh"=Mh model or "Mth"=Mth model.
h
A character string ("Chao", "Poisson" or "Darroch") or a numerical R function specifying the form of the column for heterogeneity in the design matrix. "Chao" represents Chao's model, "Poisson" represents the function $f(k)=a^k-1$, where $k$
a
The value of the exponent's base for a Poisson model.

Value

  • Zdelta returns a matrix with $2(I-1)$ columns and as many rows as the Xdelta matrix. Xomega.t and Xomega.0 return a list containing the first four elements of the following enumeration. Xclosedp returns a list containing the last two elements of the following enumeration.
  • matThe Xomega matrix containing the columns of the design matrices for the closed population models in every primary period of a robust design.
  • nbparamA vector of length $I$ containing the numbers of parameters for the closed population models within each primary period.
  • modelsA vector of length $I$ identifying the closed population models for each primary period.
  • paramnamesA vector of character strings identifying the parameters.
  • matThe design matrix for the closed population model.
  • nbparamThe number of parameters in the closed population model.

Details

These functions are internal. They are not intended to be called by the user. No argument validation is done within these functions.

References

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