ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
dpois.cpp File Reference

(Last Changed on October 01, 2014 for git-revision a39518c66ad6b305aabfba50e77ad1f36cfaf9af.)

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.