# d.rel.conn.beta.prior: Estimate the probability distribution of relative... In ConnMatTools: Tools for Working with Connectivity Data

## Description

These functions calculate the probability density function (d.rel.conn.beta.prior), the probability distribution function (aka the cumulative distribution function; p.rel.conn.beta.prior) and the quantile function (q.rel.conn.beta.prior) for the relative (to all settlers at the destination site) connectivity value for larval transport between a source and destination site given a known fraction of marked individuals (i.e., eggs) in the source population. A non-uniform prior is used for the relative connectivity value.

## Usage

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 d.rel.conn.beta.prior(phi, p, k, n, prior.shape1 = 0.5, prior.shape2 = prior.shape1, prior.func = function(phi) dbeta(phi, prior.shape1, prior.shape2), ...) p.rel.conn.beta.prior(phi, p, k, n, prior.shape1 = 0.5, prior.shape2 = prior.shape1, prior.func = function(phi) dbeta(phi, prior.shape1, prior.shape2), ...) q.rel.conn.beta.prior.func(p, k, n, prior.shape1 = 0.5, prior.shape2 = prior.shape1, prior.func = function(phi) dbeta(phi, prior.shape1, prior.shape2), N = 1000, ...) q.rel.conn.beta.prior(q, p, k, n, prior.shape1 = 0.5, prior.shape2 = prior.shape1, prior.func = function(phi) dbeta(phi, prior.shape1, prior.shape2), N = 1000, ...)

## Arguments

 phi Vector of fractions of individuals (i.e., eggs) from the source population settling at the destination population p Fraction of individuals (i.e., eggs) marked in the source population k Number of marked settlers found in sample n Total number of settlers collected prior.shape1 First shape parameter for Beta distributed prior. Defaults to 0.5. prior.shape2 Second shape parameter for Beta distributed prior. Defaults to being the same as prior.shape1. prior.func Function for prior distribution. Should take one parameter, phi, and return a probability. Defaults to function(phi) dbeta(phi,prior.shape1,prior.shape2). If this is specified, then inputs prior.shape1 and prior.shape2 are ignored. N Number of points at which to estimate cumulative probability function for reverse approximation of quantile distribution. Defaults to 1000. q Vector of quantiles ... Extra arguments for the integrate function used for normalization of probability distributions.

## Details

The prior distribution for relative connectivity phi defaults to a Beta distribution with both shape parameters equal to 0.5. This is the Reference or Jeffreys prior for a binomial distribution parameter. Both shape parameters equal to 1 corresponds to a uniform prior.

Estimations of the probability distribution are based on numerical integration using the integrate function, and therefore are accurate to the level of that function. Some modification of the default arguments to that function may be necessary to acheive good results for certain parameter values.

## Value

Vector of probabilities or quantiles, or a function in the case of q.rel.conn.beta.prior.func.

## Functions

• d.rel.conn.beta.prior: Returns the probability density for relative connectivity between a pair of sites

• p.rel.conn.beta.prior: Returns the cumulative probability distribution for relative connectivity between a paire of sites

• q.rel.conn.beta.prior.func: Returns a function to estimate quantiles for the probability distribution function for relative connectivity between a pair of sites.

• q.rel.conn.beta.prior: Estimates quantiles for the probability distribution function for relative connectivity between a pair of sites

## Author(s)

David M. Kaplan [email protected]

## 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.