mrClosed1Sim: Dynamic plots to explore single-census mark-recapture models.

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

View source: R/mrClosed1Sim.R

Description

This simulates multiple results for a single census mark-recapture study. The user can control aspects of the sampling including the number of marked animals (animals in the first sample) and the number of animals examined for marks (animals in the second sample) and aspects of the population including loss of marks on marked animals, survival rates for marked and unmarked fish, the addition of recruits, and differential probabilities of capture for marked and unmarked fish. In addition, Petersen, Chapman, Ricker, and Bailey estimates of population size can be made (see FSA). Function can only be used with RStudio.

Usage

1
2
3
4
5
6
7
8
9
mrClosed1Sim(
  sim = c("assumptions", "distribution"),
  N = 1000,
  rsmpls = 5000,
  EM = 200,
  En = 200,
  incl.final = TRUE,
  conf.level = 0.95
)

Arguments

sim

A single string that identifies the type of simulation to perform (see details).

N

A single number that represents the known size of the simulated population just prior to the first sample.

rsmpls

A single number that indicates the number of simulations to run.

EM

A single number that indicates the expected number of fish to capture (and mark) in the first sample. Only used if sim="assumptions".

En

A single number that indicates the expected number of fish to capture (and check for marks) in the second sample. Only used if sim="assumptions".

incl.final

A single logical that indicates whether the mean final population size should be shown on the plot produce (only used if sim="assumptions").

conf.level

A single number that indicates the quantiles to compute and label on the x-axis of the histogram when sim="distribution".

Details

Two types of simulations can be conducted. The first is primarily used to examine characteristics of the sampling distrubtion of the population estimates. These simulations are selected with sim="distribution" and allow the user to dynamically select the expected number of fish to capture in the first (i.e., the marking or tagging) sample and the expected number of fish to be captured in the second (i.e., the recapture) sample. The resulting plot (discussed more below) allows the user to examine the shape of the sampling distribution, see the width of chosen quantiles on the distribution (defaults to 95

The second type of simulation is primarily used to examine the effect of assumption violations on the bias of the population estimates. These simulations are selected with sim="assumptions" and allow the user to dynamically select the probablity that a marked fish loses the mark, the probability of survival for marked fish, the probability of survival for unmarked fish, a proportion of the initial population size to recruit to the population between the first and second samples, and the ratio of the probability of capture of marked fish to the probability of capture of unmarked fish in the second sample.

In both types of simulations, the user can dynamically select the type of population estimation method (Petersen, Chapman, Ricker, or Bailey; see FSA) and rerun the simulation without changing any of the other items by selecting the Rerandomize button. The user can also select the population size with the N= argument and the number of resamples use to construct the sampling distribution with the rsmpls= argument. In the simulations to assess the assumptions the user can also set the the expected number of fish to capture in the first sample with the EM argument and the expected number of fish to be captured in the second sample with the En argument.

In general, the simulation follows these steps:

  1. a population of N fish is created;

  2. randomly select M fish in the first sample to be marked such that the average of all M values should be equal to the user-supplied ‘Marked (M)’ (first type of simulations) or EM (second type of simulations) value;

  3. randomly select m fish to lose marks according to the user-supplied probability of mark loss (‘PR(Mark Loss)’);

  4. randomly select fish to die according to the user-supplied probabilities of survival for marked (‘PR(Surv Marked)’) and unmarked fish (‘PR(Surv UNMarked)’);

  5. add recruits to the population in proportion to N and in accordance to the user-supplied proportion of recruits (‘Proportion Recruit’) to add;

  6. identify the actual population size just before taking the final sample (N1);

  7. randomly select n fish in the second sample such that the average of all n values should be equal to the user-supplied ‘Captured (n)’ (first type of simulations) or En (second type of simulations) value (see note below about how differential probabilties of capture are incorporated into the model);

  8. count the number of marked fish in the second sample; and

  9. compute the population estimate using the chosen method (see below).

The methods for estimating the population size are

type="Petersen" naive Petersen.
type="Chapman" Chapman(1951) modification of the Petersen.
type="Ricker" Ricker(1975) modification of the Chapman modification.
type="Bailey" Bailey(1951,1952) modification of the Petersen.

The effect of violating the assumption of mark loss is simulated by changing the probability of mark loss slider to a value greater than 0 but less than 1. For example, setting ‘PR(Mark Loss)’ to 0.1 is used to simulate a 10 percent probability of losing the mark.

The effect of violating the assumption of no mortality from the first to second sample is simulated by changing one or both of the probabilities of survival for marked and unmarked fish to values less than 1 (but greater than 0). For example, setting ‘PR(Surv Marked)’ AND ‘PR(Surv UNmarked)’ to 0.8 will simulate mortality between the first and final sample but NOT differential mortality between the marked and unmarked fish (i.e., the mortalities are the same for both groups of fish). The effect of differential mortalities between marked and unmarked fish can be simulated by using different survival probabilities for marked and unmarked fish.

The effect of violating the assumption of no recruitment from the first to second sample is simulated by changing the ‘Proportion Recruit’ slider to a value greater than 0. For example, setting ‘Proportion Recruit’ to 0.1 will simulate 10 percent of N recruiting to the population just before the second sample.

The effect of violating the assumption of equal catchabilities in the second sample for marked and unmarked fish is simulated by changing the ‘PR(Capture) Ratio (M/U)’ slider to a value different than 1. Values greater than 1 indicate that the catchability of marked fish is greater than the catchability of unmarked fish. Values less than 1 indicate that the catchability of marked fish is less than that of unmarked fish. For example, setting ‘PR(Capture) Ratio (M/U)’ to 0.8 will simulate a situation where the capture probability of marked fish is 80 percent of the capture probablity of unmarked fish (i.e., simulates the situation where marked fish are less likely to be captured in the second sample than unmarked fish).

The probability of capture in the final sample is equal to the expected number of fish to be collected in the final sample (set with ‘Captured (n)’ or En) divided by the actual population size just prior to the final sample (N1) as long as ‘PR(Capture) Ratio (M/U)’ is 1. The probabilities of capture for the marked and unmarked fish are carefully adjusted if the ‘PR(Capture) Ratio (M/U)’ value is different than 1. Because of the different numbers of marked and unmarked individuals in the population, the probability of capture for marked and unmarked individuals must be computed by adjusting the overall probability of capture to assure that, on average, the user-provided expected number captured in the final sample is met. This modification is found by solving the following system of equations for the probabilities of capture for the marked (PM) and unmarked (PU) fish, respectively,

PM*M + PU*(N-M) = P*N

\frac{PM}{PU} = k

where M is the number of marked animals, and N-M is the number of unmarked animals, k is the ‘PR(Capture) Ratio (M/U)’ value, and P is the overall probability of capture if there was no difference in catchability between marked and unmarked animals. The solutions to this system, which are used in this function, are

PU = \frac{PN}{M+N}

PM = PU*k

Value

None. However, a dynamic graphic is produced that is controlled by slider bars as described in the details. The dynamic graphic is a histogram of the population estimate from all resamples with a red vertical line at the initial population size (provided by the user), a blue vertical line at the population size just prior to the final sample (N1; if incl.final=TRUE), and a green vertical line at the mean population estimate. The vertical blue and red lines may not be visible under some scenarios because of overprinting. The x-axis will be labelled with only the quantiles computed with conf.level when sim="distrib".

Author(s)

Derek H. Ogle, dogle@northland.edu

See Also

mrClosed.

Examples

1
2
3
4
if (interactive()) {
  mrClosed1Sim()
  mrClosed1Sim(type="C")  # use Chapman modification
} # end if interactive

droglenc/FSAsim documentation built on Feb. 15, 2020, 11:20 p.m.