robustd               package:Rcapture               R Documentation

_L_o_g_l_i_n_e_a_r _M_o_d_e_l_s _f_o_r _C_a_p_t_u_r_e-_R_e_c_a_p_t_u_r_e _E_x_p_e_r_i_m_e_n_t_s _C_a_r_r_i_e_d _O_u_t _A_c_c_o_r_d_i_n_g _t_o _a _R_o_b_u_s_t _D_e_s_i_g_n

_D_e_s_c_r_i_p_t_i_o_n:

     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 on 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 (generated by 'histfreq.t'). 'robustd.0' uses the
     frequencies of the observable capture histories in terms of number
     of captures per primary period (generated by 'histfreq.0').

_U_s_a_g_e:

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

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

     ## S3 method for class 'robustd':
     print(x, ...)

_A_r_g_u_m_e_n_t_s:

       X: The table of the observed capture histories in one of the two
          accepted formats. In the default format, it has one row per
          unit captured in the experiment and sum(vt) columns. In the
          alternative format, it contains one row per capture history
          followed by its frequency. In that case, 'X' has sum(vt)+1
          columns. The first sum(vt) columns of 'X', identifying the
          capture histories, must contain only zeros and ones. The
          number one indicates a capture. 

   dfreq: This argument specifies the format of the data matrix 'X'. By
          default, it is set to FALSE, which means that 'X' has one row
          per unit. If it is set to TRUE, then 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 elememts 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 'vht' 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)=a^k-1, where k
          is the number of captures, and "Darroch" represents the
          function f(k)=k^2/2. If an 'R' function is given, it is the
          implemantation of any mathematical function f(k). It has only
          one argument. For the Poisson model, the exponent's base 'a'
          is specified in the argument 'va'. 

      va: A vector indicating, for each primary period with a Poisson
          heterogeneity model, the value of the exponent's base in
          f(k)=a^k-1. If  'va' consists of a single number, this number
          is used for all the periods with a Poisson model. The default
          value for 'va' is 2 for all the periods with a Poisson 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 passed to or from other methods.

_D_e_t_a_i_l_s:

     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 caputre history, including those that are
     unobserved.  The size of the dependent vector is therefore
     2^sum(vn)-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.

_V_a_l_u_e:

       n: The number of captured units

 models : A vector of length I identifying the closed population models
          chosen for each period.

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

emig.fit : A table containing, for the model with an added temporary
          emigration effect, the deviance, degrees of freedom and AIC.

emig.param : 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 homogenous. Negative estimates
          are associated with a temporary emigration.

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.

loglin.param : The loglinear model parameters estimations and their
          standard errors, calculated by the 'glm' function. 

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 and eta parameters set to zero in
          the loglinear parameter vector.

_N_o_t_e:

     This function uses the 'glm' function of the 'stats' package.

_A_u_t_h_o_r(_s):

     Sophie Baillargeon sbaillar@mat.ulaval.ca and Louis-Paul Rivest
     lpr@mat.ulaval.ca

_R_e_f_e_r_e_n_c_e_s:

     Baillargeon, S. and Rivest, L.P. (2007). The Rcapture package:
     Loglinear models for capture-recapture in R. _Journal of
     Statistical Software_, to appear (available online at <URL:
     http://www.jstatsoft.org/>).

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

_S_e_e _A_l_s_o:

     'closedp', 'openp'

_E_x_a_m_p_l_e_s:

     data(mvole)

       # 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.
     robustd.0(mvole[,-10],vt=c(5,4,rep(5,4)),vm="Mh",vh="Poisson",va=1.5)
     # Not run: 
     # robustd.t(mvole[,-10],vt=c(5,4,rep(5,4)),vm="Mh",vh="Poisson",va=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",va=1.5)

