duck                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 _E_i_d_e_r _D_u_c_k_s

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

     This data set contains open population capture history data for
     eider ducks.

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

     data(duck)

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

     '_p_1', '_p_2', '_p_3', '_p_4', '_p_5', '_p_6' Capture histories for six
          periods

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

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

     The data are extracted from a 25-year study by Coulson (1984). The
     capture periods are six consecutives years : years 19-24. This
     data set is analysed in Cormack (1989).

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

_S_o_u_r_c_e:

     Coulson, J. C. (1984). The population dynamics of the Eider Duck
     _Somateria mollissima_ and evidence of extensive non breeding by
     adults ducks. _Ibis_, 126, 525-543.

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

     Cormack, R. M. (1989). Log-linear models for capture-recapture.
     _Biometrics_, *45*, 395-413.

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

     data(duck)
     op.m1<-openp(duck,dfreq=TRUE)
     op.m1$model.fit
       # The pvalue of the goodness of fit test based on the deviance is
     1-pchisq(op.m1$model.fit[1,1],df=49)
     plot(op.m1)
       # The residual plot shows a large residual for the 13 individuals 
       # captured all the times. We redo the analysis without them.

     keep2<-apply(histpos.t(6),1,sum)!=6
     op.m2<-openp(duck,dfreq=TRUE,keep=keep2)
     op.m2$model.fit
     1-pchisq(op.m2$model.fit[1,1],df=48)
       # The fit is still not satisfactory.
     plot(op.m2)
       # The residual plot has the convex shape characteristic of 
       # heterogeneity in the capture probabilities. We also remove the 
       # individuals caught at 5 periods out of 6.

     keep3<-apply(histpos.t(6),1,sum)<5
     op.m3<-openp(duck,dfreq=TRUE,keep=keep3)
     op.m3$model.fit
     1-pchisq(op.m3$model.fit[1,1],df=42)
       # The fit is better but there is still heterogeneity in the data. 

       # To investigate whether the capture probabilities are homogeneous, 
       # one can fit a model with equal capture probabilities.
     op.m4<-openp(duck,dfreq=TRUE,m="ep",keep=keep3)
     op.m4$model.fit
       # It gives a much larger deviance; this model is not considered anymore.

       # We now investigate models for the growth rate N[i+1]/N[i] of this 
       # population using the multivariate normal distribution for the 
       # abundance estimates. The growth rates and their standard errors are
     growth<-op.m3$N[3:5]/op.m3$N[2:4]
     partial<-matrix(c(-op.m3$N[3]/op.m3$N[2]^2,1/op.m3$N[2],0,0,0,
                       -op.m3$N[4]/op.m3$N[3]^2,1/op.m3$N[3],0,0,0,
                       -op.m3$N[5]/op.m3$N[4]^2,1/op.m3$N[4]),3,4,byrow=TRUE)
     sig<-partial%*%op.m3$cov[9:12,9:12]%*%t(partial)
     cbind(estimate=growth,stderr=sqrt(diag(sig)))
       # An estimate for the common growth rate is
     siginv<-solve(sig)
     growth.e<-t(rep(1,3))%*%siginv%*%growth/(t(rep(1,3))%*%siginv%*%rep(1,3))
     se<-1/sqrt(t(rep(1,3))%*%siginv%*%rep(1,3))
     cbind(estimate=growth.e,stderr=se)
       # A chi-square statistics for testing the equality of the growth rates 
       # and its pvalue
     chisq2<-t(growth-growth.e*rep(1,3))%*%siginv%*%(growth-growth.e*rep(1,3))
     c(chi2stat=chisq2,pvalue=1-pchisq(chisq2,df=2))
       # The hypothesis of a common growth rate is rejected

