ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
Functions
Probability Density Functions.

Functions

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

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 181 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 24 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 54 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 68 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 83 of file vnegbin.cpp.

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

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 21 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 36 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 38 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 25 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.

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 51 of file vnegbin.cpp.