yat  0.21pre
Classes | Public Member Functions | List of all members
theplu::yat::statistics::NegativeBinomialExtendedMixture Class Reference

#include <yat/statistics/NegativeBinomialExtendedMixture.h>

Public Member Functions

void add (unsigned long int k, double y)
 Add a data point. More...
 
const utility::Vectoralpha (void) const
 
void clear (void)
 remove all data
 
void fit (size_t n)
 
void fit (const utility::VectorBase &m, const utility::VectorBase &alpha, const utility::VectorBase &tau)
 
double logL (void) const
 
const utility::Vectorm (void) const
 
const utility::Vectortau (void) const
 

Detailed Description

Data are modeled as

$ X = y * Z $

where $ y $ is a known sample-specific constant and $ Z $ is a random variable from a mixture of negative binomial distributions.

Since
New in yat 0.20

Member Function Documentation

◆ add()

void theplu::yat::statistics::NegativeBinomialExtendedMixture::add ( unsigned long int  k,
double  y 
)

Add a data point.

Parameters
krandom variable drawn from a mixture of negative binomial distributions.
ysample specific sample constant (see class description)

◆ alpha()

const utility::Vector& theplu::yat::statistics::NegativeBinomialExtendedMixture::alpha ( void  ) const

The alpha values are defined as $ alpha = \frac{1}{1-p} $

◆ fit() [1/2]

void theplu::yat::statistics::NegativeBinomialExtendedMixture::fit ( size_t  n)

Fit the data to a model with n sub-distributions.

◆ fit() [2/2]

void theplu::yat::statistics::NegativeBinomialExtendedMixture::fit ( const utility::VectorBase m,
const utility::VectorBase alpha,
const utility::VectorBase tau 
)

Fit the data initiating the search for the optimal model parameters at the values passed.

◆ logL()

double theplu::yat::statistics::NegativeBinomialExtendedMixture::logL ( void  ) const
Returns
log likelihood of getting data given inferred model

◆ m()

const utility::Vector& theplu::yat::statistics::NegativeBinomialExtendedMixture::m ( void  ) const

The mean is calculated as $ m = \frac{pr}{1-p} $

Returns
the mean of each sub-distribution

◆ tau()

const utility::Vector& theplu::yat::statistics::NegativeBinomialExtendedMixture::tau ( void  ) const
Returns
tau values in model, describing how much each sub-distribution contributes to the total distribution.

The documentation for this class was generated from the following file:

Generated on Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14