ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
Probability Density Functions

Functions

double cumd_norm (const double &x)
 Culative normal distribution; constant objects. More...
 
prevariablecumd_norm (const prevariable &_x)
 Culative normal distribution; variable objects. More...
 
double density_negbinomial (double x, double mu, double tau)
 Negative bionomial density; constant objects. More...
 
double gamma_density (double x, double r, double mu)
 Gamma probability density function; constant objects. More...
 
dvariable gamma_density (const prevariable &_x, double r, double mu)
 Gamma probability density function; variable objects. More...
 
dvariable gamma_density (const dvariable &_x, const dvariable &_r, const dvariable &_mu)
 Gamma probability density function; variable objects. More...
 
double log_density_negbinomial (double x, double mu, double tau)
 Log negative bionomial density; constant objects. More...
 
double log_density_poisson (double x, double mu)
 Log Poisson density; constant objects. More...
 
df1b2variable log_density_poisson (double x, const df1b2variable &mu)
 Log Poisson density; random effects objects. More...
 
dvariable log_density_poisson (double x, const prevariable &mu)
 Log Poisson density; variable objects. More...
 
dvariable log_gamma_density (const prevariable &_x, double r, double mu)
 file More...
 
dvariable log_gamma_density (const dvariable &_x, const dvariable &_r, const dvariable &_mu)
 Log gamma probability density function; variable objects. More...
 
double log_gamma_density (double x, double r, double mu)
 Log gamma probability density function; constant objects. More...
 
dvariable log_negbinomial_density (double x, const prevariable &mu, const prevariable &tau)
 Log negative bionomial density; variable objects. More...
 
dvariable negbinomial_density (double x, const prevariable &mu, const prevariable &tau)
 Negative bionomial density; variable objects. More...
 
df1b2variable negbinomial_density (double x, const df1b2variable &mu, const df1b2variable &tau)
 Log negative bionomial density; random effects objects. More...
 

Detailed Description

Function Documentation

double cumd_norm ( const double &  x)
prevariable& cumd_norm ( const prevariable _x)

Culative normal distribution; variable objects.

Parameters
_xNormalized "Z" score (subtact the mean and divide by the stdard deviation).
Returns
Probablity that of an observation will exceed the argument.

Definition at line 184 of file vcumdist.cpp.

double density_negbinomial ( double  x,
double  mu,
double  tau 
)

Negative bionomial density; constant objects.

A local parameter r is used to make it robust. $ r=\frac{\mu}{10.0^{-120}+\tau-1.0} $

Parameters
x
mu
tau
Returns
NegativeBinomial density. $ \frac{\Gamma(x+r)}{\Gamma(r)x!}(\frac{r}{r+\mu})^r(\frac{\mu}{r+\mu})^x $

Definition at line 43 of file cnegbin.cpp.

double gamma_density ( double  x,
double  r,
double  mu 
)

Gamma probability density function; constant objects.

Mean $ = \frac{r}{\mu} $.

Parameters
xArgument, $ x \ge 0 $.
rShape parameter, $ r > 0 $.
muSlope parameter, $ \mu > 0 $.
Returns
$\frac{\mu^r}{\Gamma(r)}x^{r-1}e^{-\mu x}$

Definition at line 21 of file cgamdens.cpp.

dvariable gamma_density ( const prevariable _x,
double  r,
double  mu 
)

Gamma probability density function; variable objects.

Mean $ = \frac{r}{\mu} $.

Parameters
_xDifferentiable argument, $ x \ge 0 $.
rConstant shape parameter, $ r > 0 $.
muConstang slope parameter, $ \mu > 0 $.
Returns
Dvariable containing $\frac{\mu^r}{\Gamma(r)}x^{r-1}e^{-\mu x}$

Definition at line 51 of file linad99/vgamdens.cpp.

dvariable gamma_density ( const dvariable _x,
const dvariable _r,
const dvariable _mu 
)

Gamma probability density function; variable objects.

Parameters
_xDifferentiable argument, $ x \ge 0 $.
_rDifferentiable, $ r > 0 $.
_muDifferentiable, $ \mu > 0 $.
Returns
Dvariable containing $\frac{\mu^r}{\Gamma(r)}x^{r-1}e^{-\mu x}$

Definition at line 65 of file linad99/vgamdens.cpp.

double log_density_negbinomial ( double  x,
double  mu,
double  tau 
)

Log negative bionomial density; constant objects.

A local parameter r is used to make it robust. $ r=\frac{\mu}{10.0^{-120}+\tau-1.0} $

Parameters
x
mu
tau
Returns
Log of NegativeBinomial density. $ log(\Gamma(x+r))-log(\Gamma(r))-log(x!)+rlog(r)+xlog(\mu)-(r+x)log(r+\mu) $

Definition at line 22 of file cnegbin.cpp.

Referenced by nllNegativeBinomial2().

double log_density_poisson ( double  x,
double  mu 
)

Log Poisson density; constant objects.

Parameters
xNumber of observed occurences, $k$.
muMean or expected value, $\mu$.
Returns
Log of Poisson density. $-\mu+k*\log(\mu)-k!$.

Definition at line 61 of file cnegbin.cpp.

df1b2variable log_density_poisson ( double  x,
const df1b2variable mu 
)

Log Poisson density; random effects objects.

Parameters
xNumber of observed occurences, $k$.
muMean or expected value, $\mu$.
Returns
Log of Poisson density. $-\mu+k*\log(\mu)-k!$.

Definition at line 73 of file df1b2negb.cpp.

dvariable log_density_poisson ( double  x,
const prevariable mu 
)

Log Poisson density; variable objects.

Parameters
xNumber of observed occurences, $k$.
muMean or expected value, $\mu$.
Returns
Log of Poisson density. $-\mu+k*\log(\mu)-k!$.

Definition at line 81 of file vnegbin.cpp.

dvariable log_gamma_density ( const prevariable _x,
double  r,
double  mu 
)

file

Author
David Fournier

Functions for gamma probability density; differentiable (variable) objects.

Log gamma probability density function; variable objects.

Parameters
_xdvariable argument
rdouble argument
mudouble argument
Returns
$r\log{\mu} + (r-1)*\log{x}-\mu*x-\log{\Gamma(r)}$

Definition at line 18 of file linad99/vgamdens.cpp.

dvariable log_gamma_density ( const dvariable _x,
const dvariable _r,
const dvariable _mu 
)

Log gamma probability density function; variable objects.

Parameters
_xdvariable argument
_rdvariable argument
_mudvariable argument
Returns
$r\log{\mu} + (r-1)*\log{x}-\mu*x-\log{\Gamma(r)}$

Definition at line 33 of file linad99/vgamdens.cpp.

double log_gamma_density ( double  x,
double  r,
double  mu 
)

Log gamma probability density function; constant objects.

Mean $ = \frac{r}{\mu} $.

Parameters
xArgument, $ x \ge 0 $.
rShape parameter, $ r > 0 $.
muSlope parameter, $ \mu > 0 $.
Returns
$r\log{\mu} + (r-1)\log{x}-\mu x-\log{\Gamma(r)}$

Definition at line 35 of file cgamdens.cpp.

Referenced by nllGamma().

dvariable log_negbinomial_density ( double  x,
const prevariable mu,
const prevariable tau 
)

Log negative bionomial density; variable objects.

A local parameter r is used to make it robust. $ r=\frac{\mu}{10.0^{-120}+\tau-1.0} $

Parameters
x
mu
tau
Returns
Log of NegativeBinomial density. $ log(\Gamma(x+r))-log(\Gamma(r))-log(x!)+rlog(r)+xlog(\mu)-(r+x)log(r+\mu) $

Definition at line 21 of file vnegbin.cpp.

dvariable negbinomial_density ( double  x,
const prevariable mu,
const prevariable tau 
)

Negative bionomial density; variable objects.

A local parameter r is used to make it robust. $ r=\frac{\mu}{10.0^{-120}+\tau-1.0} $

Parameters
x
mu
tau
Returns
Log of NegativeBinomial density. $ \frac{\Gamma(x+r)}{\Gamma(r)x!}(\frac{r}{r+\mu})^r(\frac{\mu}{r+\mu})^x $

Definition at line 49 of file vnegbin.cpp.

df1b2variable negbinomial_density ( double  x,
const df1b2variable mu,
const df1b2variable tau 
)

Log negative bionomial density; random effects objects.

A local parameter r is used to make it robust. $ r=\frac{\mu}{\tau-1.0} $

Parameters
x
mu
tau
Returns
Log of NegativeBinomial density. $ log(\Gamma(x+r))-log(\Gamma(r))-log(x!)+rlog(r)+xlog(\mu)-(r+x)log(r+\mu) $ Negative bionomial density; random effects objects. A local parameter r is used to make it robust. $ r=\frac{\mu}{10.0^{-120}+\tau-1.0} $
Parameters
x
mu
tau
Returns
NegativeBinomial density. $ \frac{\Gamma(x+r)}{\Gamma(r)x!}(\frac{r}{r+\mu})^r(\frac{\mu}{r+\mu})^x $

Definition at line 50 of file df1b2negb.cpp.