openp | R Documentation |
This function computes various demographic parameters using a loglinear model for open populations in capture-recapture experiments.
openp(X, dfreq=FALSE, m=c("up","ep"), neg=TRUE, keep=rep(TRUE,2^I-1)) ## S3 method for class 'openp' print(x, ...) ## S3 method for class 'openp' plot(x, main="Scatterplot of Pearson Residuals", ...)
X |
The matrix of the observed capture histories (see |
dfreq |
A logical. By default FALSE, which means that |
m |
This argument is a character string taking the value "up" (up = unconstrained probabilities) or "ep" (ep = equal
probabilities). If |
keep |
This option is useful to fit the model on a subset of the possible capture histories. |
neg |
If this option is set to TRUE, relevant negative gamma parameters 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 |
main |
A main title for the plot |
... |
Further arguments to be passed to methods (see |
The function openp
generates statistics to test the presence of a trap effect.
The plot.openp
function produces a scatterplot of the Pearson residuals of the model versus the frequencies of capture.
If the data matrix X
was obtained through the periodhist
function, the dfreq
argument must be set to TRUE.
Standard errors are calculated by linearization.
n |
The number of captured units |
model.fit |
A table containing the deviance, degrees of freedom and AIC of the fitted model. |
trap.fit |
A table containing, for the models with an added trap effect, the deviance, degrees of freedom and AIC. |
trap.param |
The estimated trap effect parameters and their standard errors. For m="up", the I-3 first rows of
|
capture.prob |
The estimated capture probabilities per period and their standard errors. |
survivals |
The estimated survival probabilities between periods and their standard errors. |
N |
The estimated population sizes per period and their standard errors. |
birth |
The estimated number of new arrivals in the population between periods and their standard errors. |
Ntot |
The estimated total number of units who ever inhabited the survey area and its standard error. |
glm |
The 'glm' object obtained from fitting the loglinear model |
loglin.param |
The loglinear model parameters estimations and their standard errors, calculated by the |
u.vector |
The Ui statistics, useful for the survival probabilities calculation, and their standard errors |
v.vector |
The Vi statistics, useful for the population sizes estimation, and their standard errors |
cov |
The covariance matrix of all the demographic parameters estimates. |
neg |
The position of the gamma parameters set to zero in the loglinear parameter vector. |
If your data contains more than one capture occasion within primary periods, use the periodhist
function to create the input data matrix X
needed by the openp
function.
This function uses the glm
function of the stats package.
Louis-Paul Rivest Louis-Paul.Rivest@mat.ulaval.ca and Sophie Baillargeon
Baillargeon, S. and Rivest, L.P. (2007) Rcapture: Loglinear models for capture-recapture in R. Journal of Statistical Software, 19(5), doi: 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.
closedp
, periodhist
, robustd
# duck data set op.m1 <- openp(duck, dfreq = TRUE) plot(op.m1) # To remove the capture history 111111. keep2 <- apply(histpos.t(6), 1, sum) != 6 op.m2 <- openp(duck, dfreq = TRUE, keep = keep2) op.m2 # To remove the capture histories with 5 captures or more keep3 <- apply(histpos.t(6), 1, sum) < 5 op.m3 <- openp(duck, dfreq = TRUE, keep = keep3) op.m3 # mvole data set aggregated per primary period mvole.op <- periodhist(mvole, vt = rep(5, 6)) openp(mvole.op, dfreq = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.