[ADMB Users] When to use mfexp

Ben Bolker bbolker at gmail.com
Thu Feb 16 17:08:48 PST 2012


On 12-02-16 06:04 PM, Mark Maunder wrote:
> Are there any guidelines in using mfexp
> 
>  
> 
> The following two bits of code give different results in a negative
> binomial model
> 
>  
> 
>                              
> like=-log((1.0-pzi)*mfexp(log_negbinomial_density(Obs(i,8),ypred,tau)));
> 
>                              
> like=-log((1.0-pzi)*exp(log_negbinomial_density(Obs(i,8),ypred,tau)));
> 
>  

   How different are the log-likelihoods? i.e., are these big
differences in the coefficients but actually the goodness-of-fit isn't
that different?  How different are the model predictions?

  Can you instrument the TPL file with an if statement that checks for a
big difference (say >3 or 4) between mfexp(...) and exp(...) and prints
out the observation number, observation value, ypred, tau, and
alternative values for those cases?



> 
> Is there any benefit from replacing
> 
>  
> 
> mfexp(log_negbinomial_density(Obs(i,8),ypred,tau))
> 
>  
> 
> with
> 
>  
> 
> negbinomial_density(Obs(i,8),ypred,tau)
> 
>  
> 
> Thanks,
> 
>  
> 
> Mark Maunder         
> 
>  



More information about the Users mailing list