Revision 593 trunk/contrib/statslib/dnbinom.cpp
dnbinom.cpp (revision 593)  

40  40 
\param mu is the expected mean number of successful trials. 
41  41 
\return the negative log likelihood for the negative binomial distribution. 
42  42 
\sa 
43 
\ingroup STATLIB 

43  44 
**/ 
44  45  
45  46 
dvariable dnbinom(const double& x,const prevariable& mu, const prevariable& size) 
...  ...  
66  67 
\param mu is the predicted mean 
67  68 
\param k is the overdispersion parameter, i.e. shape parameter of underlying heterogeneity (different from tau). should be >0 
68  69 
\return negative log likelihood \f$ ( \ln(\Gamma(x+k))\ln(\Gamma(k))\ln(x!)+k\ln(k)+x\ln(\mu)(k+x)\ln(k+\mu) )\f$ 
70 
\ingroup STATLIB 

69  71 
**/ 
70  72 
df1b2variable dnbinom(const double& x, const df1b2variable& mu, const df1b2variable& k) 
71  73 
{ 
...  ...  
119  121 
\param mu is the predicted mean 
120  122 
\param k is the overdispersion parameter, i.e. shape parameter of underlying heterogeneity (different from tau). should be >0 
121  123 
\return negative log likelihood \f$ ( \ln(\Gamma(x+k))\ln(\Gamma(k))\ln(x!)+k\ln(k)+x\ln(\mu)(k+x)\ln(k+\mu) )\f$ 
124 
\ingroup STATLIB 

122  125 
**/ 
123  126 
df1b2variable dnbinom(const dvector& x, const df1b2vector& mu, const df1b2variable& k) 
124  127 
{ 
...  ...  
150  153 
\param mu is the predicted mean 
151  154 
\param k is the overdispersion parameter, i.e. size, i.e. shape parameter of underlying heterogeneity (different from tau). should be >0 
152  155 
\return negative log likelihood \f$ ( \ln(\Gamma(x+k))\ln(\Gamma(k))\ln(x!)+k\ln(k)+x\ln(\mu)(k+x)\ln(k+\mu) )\f$ 
156 
\ingroup STATLIB 

153  157 
**/ 
154  158 
df1b2variable dnbinom(const dvector& x, const df1b2vector& mu, const df1b2vector& k) 
155  159 
{ 
...  ...  
183  187 
\param mu is the predicted mean 
184  188 
\param k is the overdispersion parameter, i.e. size, i.e. shape parameter of underlying heterogeneity (different from tau). should be >0 
185  189 
\return negative log likelihood \f$ ( \ln(\Gamma(x+k))\ln(\Gamma(k))\ln(x!)+k\ln(k)+x\ln(\mu)(k+x)\ln(k+\mu) )\f$ 
190 
\ingroup STATLIB 

186  191 
**/ 
187  192  
188  193 
dvariable dnbinom(const dvector& x, const dvar_vector& mu, const prevariable& k) 
...  ...  
215  220 
\param mu is the predicted mean 
216  221 
\param k is the overdispersion parameter, i.e. size, i.e. shape parameter of underlying heterogeneity (different from tau). should be >0 
217  222 
\return negative log likelihood \f$ ( \ln(\Gamma(x+k))\ln(\Gamma(k))\ln(x!)+k\ln(k)+x\ln(\mu)(k+x)\ln(k+\mu) )\f$ 
223 
\ingroup STATLIB 

218  224 
**/ 
219  225 
dvariable dnbinom(const dvector& x, const dvar_vector& mu, const dvar_vector& k) 
220  226 
{ 
Also available in: Unified diff