Frequency weighting to reduce the computational burden

ADMB Files
Code: binomial_w2.tpl
Data: binomial_w2.dat
Initial values:
Expected Results: binomial_w2-expected-results.par

Model description

For categorical data with a small number of possible outcomes it is often possible use frequency weighting to reduce the computational burden. The basic idea is that you only have to evaluate the likelihood once for each outcome value, not once for each observation. Hence there is no limit to the number of observations you can handle, as long as the number outcome categories stays fixed. Further details are given in following example