# r.marked.egg.fraction: Estimates of fraction of eggs marked accounting for... In ConnMatTools: Tools for Working with Connectivity Data

## Description

This function estimates the fraction of eggs "marked" at a site (where the "mark" could be micro-chemical or genetic) taking into account uncertainty in female (and potentially male in the case of dual genetic mark transmission) reproductive output. It generates a set of potential values for the fraction of eggs marked assuming that reproductive output of each marked or unmarked mature individual is given by a random variable drawn from a single probability distribution with known mean and standard deviation (or equivalently coefficient of variation) and that the numbers of marked and unmarked individuals are large enough that the central limit theorem applies and, therefore, their collective reproductive outputs are reasonably well described by a gamma distribution whose mean and standard deviation are appropriately scaled based on the number of individual reproducers. The function also returns the total egg production corresponding to each fraction of marked eggs, needed for estimating absolute connectivity values (i.e., elements of the connectivity matrix needed for assessing population persistence).

## Usage

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 r.marked.egg.fraction( n, n.females, n.marked.females = round(n.females * p.marked.females), mean.female = 1, cv.female, dual = FALSE, male.uncert = FALSE, n.males = n.females, n.marked.males = tryCatch(round(n.males * p.marked.males), error = function(e) n.marked.females), mean.male = mean.female, cv.male = cv.female, p.marked.females, p.marked.males = p.marked.females )

## Arguments

 n Number of random values to estimates n.females Total number of mature females in the population n.marked.females Number of marked females in population mean.female Mean egg production of each mature female. Defaults to 1. cv.female Coefficient of variation of reproductive output of an individual mature female dual Logical variable. If TRUE, then the fraction of marked eggs is calculated assuming dual (male and female) mark transmission. Defaults to FALSE. male.uncert Logical variable. If TRUE, then variability in male sperm output is also taken into account when estimating the number of marked eggs. Defaults to FALSE. n.males Total number of mature males in the population. Only used if dual=TRUE. Defaults to being equal to n.females. n.marked.males Number of marked males in population. Only used if dual=TRUE. Defaults to being equal to n.marked.females. mean.male Mean sperm production of each mature male. Only used if dual=TRUE and male.uncert=TRUE. Defaults to being equal to mean.female. cv.male Coefficient of variation of reproductive output of an individual mature male. Only used if dual=TRUE and male.uncert=TRUE. Defaults to being equal to cv.female. p.marked.females Fraction of marked females in population. Can be supplied instead of n.marked.females. Ignored if n.marked.females is given. p.marked.males Fraction of marked males in population. Can be supplied instead of n.marked.males. Only used if dual=TRUE. Ignored if n.marked.males is given.

## Value

A list with the following elements:

p

Vector of length n with estimates for fraction of marked eggs

eggs

Vector of length n with estimates for total egg production

marked.eggs

Vector of length n with estimates for total number of marked eggs produced

sperm

Only returned if dual=TRUE. If male.uncert=FALSE, then a scalar equal to n.males. Otherwise, a vector of length n with estimates for total sperm production

marked.sperm

Only returned if dual=TRUE. If male.uncert=FALSE, then a scalar equal to n.marked.males. Otherwise, a vector of length n with estimates for total marked sperm production

## Author(s)

David M. Kaplan dmkaplan2000@gmail.com

## References

Kaplan DM, Cuif M, Fauvelot C, Vigliola L, Nguyen-Huu T, Tiavouane J and Lett C (in press) Uncertainty in empirical estimates of marine larval connectivity. ICES Journal of Marine Science. doi:10.1093/icesjms/fsw182.