TMB Documentation  v1.9.11
Functions
lgamma.hpp File Reference

Gamma function and gamma probability densities. More...

Go to the source code of this file.

Functions

template<class Type >
Type dgamma (Type y, Type shape, Type scale, int give_log=0)
 Density of X where X~gamma distributed.
 
template<class Type >
Type dlgamma (Type y, Type shape, Type scale, int give_log=0)
 Density of log(X) where X~gamma distributed.
 
template<class Type >
Type dnbinom (const Type &x, const Type &size, const Type &prob, int give_log=0)
 Negative binomial probability function.Parameterized through size and prob parameters, following R-convention.
 
template<class Type >
Type dnbinom2 (const Type &x, const Type &mu, const Type &var, int give_log=0)
 Negative binomial probability function.Alternative parameterization through mean and variance parameters.
 
template<class Type >
Type dnbinom_robust (const Type &x, const Type &log_mu, const Type &log_var_minus_mu, int give_log=0)
 Negative binomial probability function. More...
 
template<class Type >
Type dpois (const Type &x, const Type &lambda, int give_log=0)
 Poisson probability function.
 
template<class Type >
Type dzinbinom (const Type &x, const Type &size, const Type &p, const Type &zip, int give_log=0)
 Zero-Inflated negative binomial probability function. More...
 
template<class Type >
Type dzinbinom2 (const Type &x, const Type &mu, const Type &var, const Type &zip, int give_log=0)
 Zero-Inflated negative binomial probability function. More...
 
template<class Type >
Type dzipois (const Type &x, const Type &lambda, const Type &zip, int give_log=0)
 Zero-Inflated Poisson probability function. More...
 
template<class Type >
Type lfactorial (Type x)
 Logarithm of factorial function (following R argument convention).
 
template<class Type >
Type lgamma (Type x)
 Logarithm of gamma function (following R argument convention).
 
template<class Type >
Type rnbinom (Type n, Type p)
 Simulate from a negative binomial distribution.
 
template<class Type >
Type rnbinom2 (Type mu, Type var)
 Simulate from a negative binomial distribution.
 

Detailed Description

Gamma function and gamma probability densities.

Definition in file lgamma.hpp.

License: GPL v2