bunting               package:Rcapture               R Documentation

_O_p_e_n _P_o_p_u_l_a_t_i_o_n _D_a_t_a _f_o_r _L_a_z_u_l_i _B_u_n_t_i_n_g_s

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

     This data set contains open population capture history data for
     lazuli buntings.

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

     data(bunting)

_F_o_r_m_a_t:

     '_p_1', '_p_2', '_p_3', '_p_4', '_p_5', '_p_6', '_p_7', '_p_8' Capture histories
          for eight periods

     _f_r_e_q Observed frequencies for each capture history

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

     The data come from an eight-year (1973 to 1980) study by Allen W
     Stokes of lazuli buntings wintering in Logan, Utah. This data set
     is analysed in Burnham and al. (1987) and in Cormack (1993).

     This data set's format is the alternative one, i.e. each row
     represents an observed capture history followed by its frequency.

_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/>).

     Burnham, K.P., Anderson, D.R., White, G.C., Brownie, C. and
     Pollock, K.H. (1987). Design and analysis methods for fish
     survival experiments based on release-recapture. _American
     Fisheries Society Monographs 5_. Bethesda, Maryland.

     Cormack, R. M. (1993). The flexibility of GLIM analyses of
     multiple recapture or resighting data. In J.D. Lebreton and P.
     North editors: _Marked Individuals in the Study of Bird
     Population_. Basel, Switzerland: Birkhauser Verlag, 39-49.

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

     data(bunting)
     descriptive(bunting,dfreq=TRUE)
       # 1430 birds of a total of 1681 birds seen (85%) were caught only once. 
       # This suggests the presence of transient birds at each capture occasion. 

     op.m1<-openp(bunting,dfreq=TRUE)
     op.m1$model.fit
     plot(op.m1)
       # The residuals plot shows large residuals for the birds caught twice or
       # more while the residuals are small for birds caught once. The Jolly-Seber 
       # model does not fit well and the likely presence of transients might 
       # cause that. Let's remove the birds caught only once from the analysis.

     keep2<-apply(histpos.t(8),1,sum)>1
     op.m2<- openp(bunting,dfreq=TRUE,keep=keep2)
     op.m2$model.fit
       # The deviance drop of 94 for 6 degrees of freedom is highly significant.
     plot(op.m2)
       # The residual plot still shows Pearson residuals larger than 4. We redo
       # the analysis without the transient birds and without the large residuals.

     keep3p<-residuals(op.m2$glm,type="pearson")<4
     num3<-((1:255)[keep2])[keep3p]
     keep3<-rep(FALSE,255)
     keep3[num3]<-TRUE
     op.m3<- openp(bunting,dfreq=TRUE,keep=keep3)
     cbind(op.m2$survivals,op.m3$survivals)
       # These changes have little impact on the survival estimates. 

       # We now test the equality of the survival probabilities and estimate its 
       # common value phi. Least squares estimates of phi and its standard error:
     siginv<-solve(op.m2$cov[8:12,8:12])
     phi<-t(rep(1,5))%*%siginv%*%op.m2$survivals[2:6,1] / 
          (t(rep(1,5))%*%siginv%*%rep(1,5))
     se<-1/sqrt(t(rep(1,5))%*%siginv%*%rep(1,5))
     cbind(estimate=phi,stderr=se)
       # The chi-square goodness of fit statistic for a constant survival 
       # and its pvalue are:
     chisq4<-t(op.m2$survivals[2:6,1]-phi*rep(1,5))%*%siginv %*% 
             (op.m2$survivals[2:6,1]-phi*rep(1,5))
     cbind(chi2stat=chisq4,pvalue=1-pchisq(chisq4,df=4))
       # The hypothesis of a constant survival is accepted.

