[ADMB Users] glmmadmb, nbinom and alpha

dave fournier davef at otter-rsch.com
Sat Aug 24 11:56:45 PDT 2013


If you are willing to hack the tpl file a bit the overdispersion is 
equal to the parameter tau
in the code .i.e  var = tau * mu for a neg bin with mean mu and variance 
var.

For the truncated case this is modified in ADMB to


   double tau=3.0;
   double mu=1.0;
   double p0=exp(log_density_negbinomial(0,mu,tau));
   double trunc_var=(tau*mu+square(mu))/(1-p0)-square(mu/(1-p0));
   cout << "variance of truncated dist = " << trunc_var << endl;


produces

variance of truncated distribution = 3.86603






More information about the Users mailing list