closedp.t
and closedp.0
fit various loglinear models for closed populations in capture-recapture experiments. For back compatibility, closedp.t
is also named closedp
.
closedp.t
fits more models than closedp.0
but for data set with more than 20 capture occasions, the function migth fail. However, closedp.0
works with fairly large data sets (see Details).closedp(X, dfreq=FALSE, neg=TRUE, trace=FALSE)
closedp.t(X, dfreq=FALSE, neg=TRUE, trace=FALSE)
closedp.0(X, dfreq=FALSE, dtype=c("hist","nbcap"), t, t0=t,
neg=TRUE, trace=FALSE)
## S3 method for class 'closedp':
print(x, \dots)
## S3 method for class 'closedp':
boxplot(x, main="Boxplots of Pearson Residuals", \dots)
## S3 method for class 'closedp':
plot(x, main="Residual plots for some heterogeneity models", \dots)
Rcapture-package
for a description of the accepted formats).X
has one row per unit. If TRUE, it indicates that the matrix X
contains frequencies in its last column.X
contains complete observed capture histories. "nbcap" means that X
contains numbers of captures (see
dtype="nbcap"
. A numeric specifying the total number of capture occasions in the experiment.t0
times. By default t0=t
.closedp
function, to print or to plot.print.default
, boxplot.default
and plot.default
).dfreq
argument given in the function call.closedp.0
only, a copy of the t0
argument given in the function call.closedp.t
fits models M0, Mt, Mh Chao, Mh Poisson2, Mh Darroch, Mh Gamma3.5, Mth Chao, Mth Poisson2, Mth Darroch, Mth Gamma3.5, Mb and Mbh. closedp.0
fits only models M0, Mh Chao, Mh Poisson2, Mh Darroch and Mh Gamma3.5. However, closedp.0
can be used with larger data sets than closedp.t
. This is explained by the fact that closedp.t
fits models using the frequencies of the observable capture histories (vector of size $2^t-1$), whereas closedp.0
uses the numbers of units captured i times, for $i=1,\ldots,t$ (vector of size $t$).
closedp.0
has an additional argument t0
which gives to the numbers of units caught more than t0
times their own parameters in the loglinear model. For example, the model for Mh Gamma3.5 has $3+t-t_0$ parameters. This means that closedp.0
fits models considering only the frequencies of units captured 1 to t0
times.
Chao's models estimate a lower bound for the abundance, both with a time effect (Mth Chao) and without (Mh Chao). The estimate obtained under Mh Chao is Chao's (1987) moment estimator. Rivest and Baillargeon (2007) exhibit a loglinear model underlying this estimator and provide a generalization to Mth. For these two models, a small deviance means that there is an heterogeneity in capture probabilities; it does not mean that the lower bound estimates are unbiased.
Other models for heterogeneity are defined as follows :
closedpCI.t
and closedpCI.0
functions.
Darroch's models for Mh and Mth are considered by Darroch et al. (1993) and Agresti (1994). Poisson and Gamma models are discussed in Rivest and Baillargeon (2007). Poisson models typically yield smaller corrections for heterogeneity than Darroch's model since the capture probabilities are bounded from below under these models. On the other hand, Gamma models can lead to very large estimators of abundance. We suggest considering this estimator in experiments where very small capture probabilities are likely.
When the variance of an abundance estimate is large, it is useful to use the closedpCI.t
or closedpCI.0
function to construct a profile condifence interval for this abundance.
The boxplot.closedp
function produces boxplots of the Pearson residuals of the fitted loglinear models that converged.
The plot.closedp
function produces scatterplots of the Pearson residuals in terms of $f_i$ (number of units captured i times) for the heterogeneous models Mh Poisson2, Mh Darroch and Mh Gamma3.5 if they converged.
To calculate bias corrected abundance estimates, use the closedp.bc
function.closedpCI.t
, closedpCI.0
, closedp.bc
, closedp.Mtb
, uifit
.data(hare)
hare.closedp<-closedp.t(hare)
hare.closedp
boxplot(hare.closedp)
data(mvole)
period3<-mvole[,11:15]
closedp.t(period3)
data(BBS2001)
BBS.closedp<-closedp.0(BBS2001,dfreq=TRUE,dtype="nbcap",t=50,t0=20)
BBS.closedp
plot(BBS.closedp)
# Seber (1982) p.107
# When there is 2 capture occasions, the heterogeneity models cannot be fitted
X <- matrix(c(1,1,167,1,0,781,0,1,254),byrow=TRUE,ncol=3)
closedp.t(X,dfreq=TRUE)
Run the code above in your browser using DataLab