OBMb: Objective Bayesian Analysis for the Mb Capture-Recapture...

Description Usage Arguments Value Examples

View source: R/OBMb.R

Description

Applies an objective Bayesian method on to the Mb capturere-capture model to estimate the population size N.

Usage

1
OBMb(k, n, M, x, CI1 = 0.025, CI2 = 0.975, max = 10000, IFMLE = TRUE)

Arguments

k

Number of sampling occasions

n

Total number of distinct animals captured

M

Number of marked animals captured in all sampling occasions

x

The number of new animals captured at each sampling occasion

CI1

Lower confidence level

CI2

Upper confidence level

max

The maximum of function evaluations used for computing the integrated likelihood L(N|X)

IFMLE

Logical, will also print MLE results if TRUE

Value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Data simulation example
k=10
tN=600   #True N
p=0.06
JN=rep(0,k+1)

N=rep(0,k)
x=rep(0,k)
for (j in 1:k){
  N[j]=tN-JN[j]
  x[j]=rbinom(1,N[j],p)
  JN[j+1]=JN[j]+x[j]
}
M=sum(JN[1:k])
n=JN[k+1]

OBMb(k=k,n=n,M=M,x=x)

#Deer mouse example from Otis et al 1978
Data<-c(15, 8, 6, 3, 3, 3)   #new animals captured at each sampling occasion

OBMb(k=6,n=38,M=134,x=Data)

OBMbpkg documentation built on May 2, 2019, 2:29 a.m.

Related to OBMb in OBMbpkg...