ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
Functions
dpois.cpp File Reference

Poisson density functions. More...

#include "statsLib.h"

Go to the source code of this file.

Functions

dvariable dpois (const double &k, const prevariable &lambda)
dvariable dpois (const prevariable &k, const prevariable &lambda)
dvariable dpois (const dvector &k, const dvar_vector &lambda)

Detailed Description

Poisson density functions.

Author:
Steven Martell
Date:
24/06/2011

This file contains the negative loglikelihood functions for the Poisson distribution. The function dpois is overloaded to accommodate variable and data objects.

The negative log likelihood function is implemented as:

\[ -k \ln( \lambda ) - \lambda + \ln(k!) \]

where $p$ is the probability and $n$ number of trials, and $x$ is the number of successes.

Definition in file dpois.cpp.


Function Documentation

dvariable dpois ( const double &  k,
const prevariable lambda 
)
Author:
Steven James Dean Martell UBC Fisheries Centre
Date:
2011-06-24
Parameters:
kobserved number
lambdaepected mean of the distribution
Returns:
returns the negative loglikelihood $ -k \ln( \lambda ) - \lambda + \ln(k)! $
See also:

Definition at line 35 of file dpois.cpp.

dvariable dpois ( const prevariable k,
const prevariable lambda 
)
Author:
Steven James Dean Martell UBC Fisheries Centre
Date:
2011-06-24
Parameters:
kobserved number
lambdaepected mean of the distribution
Returns:
returns the negative loglikelihood $ -k \ln( \lambda ) - \lambda + \ln(k!) $
See also:

Definition at line 51 of file dpois.cpp.

dvariable dpois ( const dvector k,
const dvar_vector lambda 
)
Author:
Steven James Dean Martell UBC Fisheries Centre
Date:
2011-06-24
Parameters:
kvector of observed numbers
lambdavector of epected means of the distribution
Returns:
returns the negative loglikelihood $\sum_i -k_i \ln( \lambda_i ) - \lambda_i + \ln(k_i!) $
See also:

Definition at line 67 of file dpois.cpp.