sim.cir.2: Simulate 2-occasion CIR multiple times

Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples

Description

Perform 2-occasion change-in-ratio (CIR) according to users' specifications, and return a data frame with point estimate and measures of precision for each simulated experiment

Usage

1
sim.cir.2(popn, frac.prehunt, frac.posthunt, frac.harv.male, frac.harv.fem, B)

Arguments

popn

A WiSP population object, perhaps created by make.twosex.pop

frac.prehunt

Proportion [0,1] of the population sampled prior to harvest season to estimate sex composition

frac.posthunt

Proportion [0,1] of the population sampled following the harvest season to estimate sex composition

frac.harv.male

Proportion [0,1] of the males harvested during the hunting season

frac.harv.fem

Proportion [0,1] of the females harvested during the hunting season

B

Number of simulated replications to perform

Details

The population (popn) remains unchanged for all simulations; i.e., the same population is used for all replicates. Hence none of the stochasticity in the results is attributable to changing populations.

Value

A list comprised of a recapitulation of the call to the function followed by a data frame

[[1]]

First item in the list is the call to the function, explicitly keeping the way the function was used with the result of the function. Used by draw.hist2 to label the resulting histogram for future reference.

$point.cir

Point estimate of abundance for each replicate,

$se.cir

Standard error of abundance for each replicate,

$coef.var

Coefficient of variation (not percentage) of abundance for each replicate.

Warning

The nature of the value returned by the function, specifically the call as the first element of the list, subsequent use of the result can be simplified if after the function is called, a new data frame is manufactured from the result as result.frame <- data.frame(example.result[[2]]). Also note that because negative estimates are set equal to NaN, any subsequent calculations should be preceeded by checks for is.finite.

Note

The number of replicates requested may not be equal to the number of replicates realized because of the presence of missing values. Consider draw.hist2 to portray results of a call to this function.

Author(s)

Eric Rexstad, RUWPA ericr@mcs.st-and.ac.uk

References

Borchers, Buckland, and Zucchini (2002), Estimating animal abundance: closed populations. Chapter 5 http://www.ruwpa.st-and.ac.uk/estimating.abundance

See Also

two.samp.cir, sim.cir.2, make.twosex.pop, draw.hist2

Examples

1
2
3
4
5
6
library(wisp)
example <- make.twosex.pop(abund=200, prop.male=0.4)
example.result <- sim.cir.2(popn=example, frac.prehunt=0.2, frac.posthunt=0.4,
                  frac.harv.male=0.6, frac.harv.fem=0.02, B=200)
example.result
draw.hist2(df=example.result, my.max=1000)

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