[ADMB Users] SEPARABLE_FUNCTION
hskaug at gmail.com
Fri Mar 11 03:08:22 PST 2011
Yes, it seems that your model is separable, but of type "4.1 The first example"
in ADMBRE manual. Hence, you do not need the sparse matrix stuff.
In your code you need to loop over the elements of "u" like in "4.1
The first example"
Your PROCEDURE_SECTION should basically consist of:
SEPARABLE_FUNCTION(u(id), + the rest of your arguments)
Inside the SEPARABLE_FUNCTION you need to do all the calculations
that involve u(id).
If you do this you will be able to handle large models. Make sure
that you get the same result on small examples with and with SEPARABLE_FUNCTION.
On Thu, Mar 10, 2011 at 2:54 PM, Richard Chandler
<richard.chandlers at gmail.com> wrote:
> I implemented a binomial-Poisson mixture model (Royle Biometrics 2004)
> with random effects in ADMB (.tpl below). It works very well on small
> simulated datasets; however, I run into memory issues when I try
> complex variations of the model on large datasets. I have fiddled with
> many of the command line options and the TOP_OF_MAIN_SECTION, but I
> believe I need to use ADMB's sparse matrix capabilities via the
> SEPARABLE_FUNCTION. My approach has been to start with something
> SEPARABLE_FUNCTION void nll_group(const dvariable& log_sigma, const
> dvar_vector& u)
> nll = nG*log_sigma + 0.5*norm2(u)/mfexp(2*log_sigma);
> but this does not converge. I am new to ADMB and would greatly
> appreciate it if someone could suggest a better way to use a
> SEPARABLE_FUNCTION here. The RE manual is very helpful, but I must be
> missing something. Also, I would appreciate any other suggestions for
> improving the implementation of this model.
> Thanks for the great software.
More information about the Users