phi: Prior distribution on sampling probabilitie(s)

View source: R/phi.R

phiR Documentation

Prior distribution on sampling probabilitie(s)

Description

Calculating the probability density function of the sampling probabilitie(s) y assuming a beta distribution or a uniform distribution from a to b.

Usage

phi(beta = FALSE, unif = FALSE)

Arguments

beta

Logical. If TRUE, a beta distribution is assumed on the sampling probabilitie(s) y.

unif

Logical. If TRUE, a uniform distribution from a to b is assumed on the sampling probabilitie(s) y.

Details

This function is a closure. This functions takes beta and unif as arguments and creates another function with arguments x, a and b.

Value

Returns an object of class "function". This function takes the following arguments and will return the probability density of the sampling probabilitie(s) y assuming a beta distribution or a uniform distribution from a to b:

x

Numeric vector. The value of the sampling probabilitie(s) y.

a

Numeric. The value of α or a respectively for the beta or the uniform distribution. This value cannot be negative for both distributions and cannnot exceed b for the uniform distribution.

b

Numeric. The value of β or b respectively for the beta or the uniform distribution. This value cannot be negative for both distributions, cannnot be inferior to a and cannot exceed 1 for the uniform distribution.

Author(s)

Sophia Lambert

See Also

likelihood_bdRho, fitMCMC_bdRho


sophia-lambert/UDivEvo documentation built on Sept. 27, 2022, 11:05 p.m.