generate.sample.cr: Mark-Recapture Survey Data Generation.

Description Usage Arguments Details Value See Also Examples

Description

This function uses the data stored in the 'pars.survey.cr´ object to create a mark-recapture sample object.

Usage

1
        generate.sample.cr(pars.survey.cr, seed = NULL)

Arguments

pars.survey.cr

object returned by the function setpars.survey.cr defining the mark-recapture survey parameters.

seed

number passed to set.seed() to initialise random number generator

Details

A mark-recapture sample object is generated by simulating a mark-recapture survey of the population specified in generate.sample.cr. The function setpars.survey.cr must have been run to create a ‘pars.survey.cr’ object, which contains the survey specifications.

Value

generate.sample.cr returns an object of class 'sample.cr´ which has the following elements:

population

object of class 'population´.

design

object of class 'design.cr´.

capture

two dimensional detection matrix that indicates which animal groups have been captured on which occasion. A 1 in row i, column j indicates that the i-th animal/group was captured on occasion j; a 1 means that it was not.

parents

Details of WiSP objects passed to function

created

Creation date and time

seed

equal to the parameter 'seed' passed to the function

See Also

setpars.survey.cr, summary.sample.cr plot.sample.cr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
cr.reg<-generate.region(x.length=100, y.width=50)
cr.dens<-generate.density(cr.reg)
cr.poppars<-setpars.population(density.pop = cr.dens, number.groups = 100, size.method = "poisson",
                              size.min = 1, size.max = 5, size.mean = 1, exposure.method = "beta",
                              exposure.min = 2, exposure.max = 10, exposure.mean = 3,
                              exposure.shape = 0.5, type.values = c("Male","Female"),
                              type.prob = c(0.48,0.52))
cr.pop<-generate.population(cr.poppars)

cr.des<-generate.design.cr(cr.reg, n.occ = 4)
cr.survpars<-setpars.survey.cr(cr.pop, cr.des, pmin.unmarked=0.00001, pmax.unmarked=0.5, improvement=0.01)

cr.samp<-generate.sample.cr(cr.survpars)
summary(cr.samp)
plot(cr.samp) 

dill/wisp documentation built on May 15, 2019, 8:31 a.m.