closedp.bc(X, dfreq=FALSE, dtype=c("hist","nbcap"), t=NULL, t0=t,
m=c("M0","Mt","Mh","Mth","Mb","Mbh"), h=NULL, theta=NULL)
## S3 method for class 'closedp.bc':
print(x, \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
dtype="nbcap"
. A numeric specifying the total number of capture occasions in the experiment.m
equals "M0"
or m="Mh"
:
Models are fitted considering only the frequencies of units captured
1 to t0
times. By default t0=t
.R
function specifying the form of the column(s) for heterogeneity
in the design matrix. "Chao" and "LB" represents Chao's lower bounclosedp.bc
function, to print.print.default
.glm.fit
:
A logical vector indicating whether or not the fitted model converged.glm.fit
:
A vector of character strings. If the glm.fit
function generates
one or more warnings when fitting the model, a copy of these warnings are
stored in glm.warn
. NULL
if glm.fit
did not produce
any warnings.closedp.bc
returns the Petersen estimator with Chapman's (1951) bias correction
and the bias corrected standard error estimator of Seber (1970) and Wittes (1972).
For t>2, closedp.bc
implements the bias correction of Rivest and Levesque (2001).
The estimate for N and its variance are calculated by solving an estimating equation as proposed
in Seber (1982), not by fitting a Poisson regression. This approach works for large values of t.
For other models:
The bias correction is done through frequency modifications in Poisson regression as described
in Rivest and Levesque (2001). The variances calculated with the modified frequencies are
less biased than the standard ones, but they can overestimate the mean squared errors,
especially when the data is sparse.
This function works with fairly large data set, except if an "Mth" model is requested.
In this case, only heterogeneity of the form "Chao", "Poisson" with theta=2
or "Darroch"
is accepted.closedp
data(mvole)
period3<-mvole[,11:15]
closedp.bc(period3,m="Mh",h="Darroch")
closedp.bc(period3,m="Mh",h="Gamma",theta=3.5)
data(BBS2001)
closedp.bc(BBS2001,dfreq=TRUE,dtype="nbcap",t=50,t0=20,
m="Mh",h="Gamma",theta=3.5)
# Seber (1982) p.107
# When there are 2 capture occasions, only models M0 and Mt can be fitted
X <- matrix(c(1,1,167,1,0,781,0,1,254),byrow=TRUE,ncol=3)
closedp.bc(X,dfreq=TRUE, m="M0")
closedp.bc(X,dfreq=TRUE, m="Mt")
Run the code above in your browser using DataLab