27 cerr<<
"k is <=0.0 in dzinbinom()";
35 loglike=
log(p + (1-p)*
pow(k/(k+mu),k) );
64 cerr<<
"k is <=0.0 in dzinbinom()";
71 loglike=
log(p + (1-p)*
pow(k/(k+mu),k) );
99 cerr<<
"k is <=0.0 in dzinbinom()";
108 for(i = imin; i<=imax; i++)
112 loglike+=
log(p + (1-p)*
pow(k/(k+mu(i)),k) );
145 for(i = imin; i<=imax; i++)
149 cerr<<
"k("<<i<<
") is <=0.0 in dzinbinom()";
154 loglike+=
log(p + (1-p)*
pow(k(i)/(k(i)+mu(i)),k(i)) );
182 cerr<<
"k is <=0.0 in dzinbinom()";
191 for(i = imin; i<=imax; i++)
195 loglike+=
log(p + (1-p)*
pow(k/(k+mu(i)),k) );
228 for(i = imin; i<=imax; i++)
232 cerr<<
"k("<<i<<
") is <=0.0 in dzinbinom()";
237 loglike+=
log(p + (1-p)*
pow(k(i)/(k(i)+mu(i)),k(i)) );
268 cerr<<
"k is <=0.0 in dzinbinom()";
277 for(i = imin; i<=imax; i++)
281 loglike+=
log(p(i) + (1-p(i))*
pow(k/(k+mu(i)),k) );
314 for(i = imin; i<=imax; i++)
318 cerr<<
"k("<<i<<
") is <=0.0 in dzinbinom()";
323 loglike+=
log(p(i) + (1-p(i))*
pow(k(i)/(k(i)+mu(i)),k(i)) );
351 cerr<<
"k is <=0.0 in dzinbinom()";
360 for(i = imin; i<=imax; i++)
364 loglike+=
log(p(i) + (1-p(i))*
pow(k/(k+mu(i)),k) );
397 for(i = imin; i<=imax; i++)
401 cerr<<
"k("<<i<<
") is <=0.0 in dzinbinom()";
406 loglike+=
log(p(i) + (1-p(i))*
pow(k(i)/(k(i)+mu(i)),k(i)) );
Base class for dvariable.
Description not yet available.
double gammln(double xx)
Log gamma function.
void RETURN_ARRAYS_DECREMENT(void)
Decrements gradient_structure::RETURN_ARRAYS_PTR.
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
Description not yet available.
Description not yet available.
int indexmax() const
Get maximum valid index.
Description not yet available.
df1b2variable dzinbinom(const double &x, const df1b2variable &mu, const df1b2variable &k, const df1b2variable &p)
ecologically parametarized negative binomial with zero inflation
void RETURN_ARRAYS_INCREMENT(void)
Increments gradient_structure::RETURN_ARRAYS_PTR.
dvector value(const df1_one_vector &v)
Fundamental data type for reverse mode automatic differentiation.
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
d3_array pow(const d3_array &m, int e)
Description not yet available.