gibbscap1 {bayess} R Documentation

## Gibbs sampler for the two-stage open population capture-recapture model

### Description

This function implements a regular Gibbs sampler associated with Chapter 5 for a two-stage capture recapture model with open populations, accounting for the possibility that some individuals vanish between two successive capture experiments.

### Usage

gibbscap1(nsimu, n1, c2, c3, N0 = n1/runif(1), r10, r20)


### Arguments

 nsimu number of simulated values in the sample n1 first capture population size c2 number of individuals recaptured during the second experiment c3 number of individuals recaptured during the third experiment N0 starting value for the population size r10 starting value for the number of individuals who vanished between the first and second experiments r20 starting value for the number of individuals who vanished between the second and third experiments

### Value

 N  Gibbs sample of the simulated population size p  Gibbs sample of the probability of capture q  Gibbs sample of the probability of leaving the population r1  Gibbs sample of the number of individuals who vanished between the first and second experiments r2  Gibbs sample of the number of individuals who vanished between the second and third experiments

### Examples

res=gibbscap1(100,32,21,15,200,10,5)
plot(res\$p,type="l",col="steelblue3",xlab="iterations",ylab="p")


[Package bayess version 1.4 Index]