[ADMB Users] vector vs loop and admb speed

Jeff Laake jefflaake at gmail.com
Mon Jan 14 09:22:06 PST 2013


Jessica Ford sent me a copy of one of her TPL files from her recent
manuscript in Methods in Ecology and Evolution where they use ADMB with
multi-state CJS random effects model for capture-recapture data.

I took it (multistate_randeff_fast) and replaced her loops with vector
operations (multistate_randeff_slow). To my surprise, the vectorized
version took twice as long to run. Any ideas why?  Is there overhead with
the vectorized operations?

I'm still using vectorized operations simply because it makes the code
easier to read - at least for me.

BTW if you are interested in this subject her ms is worth reading as it is
an application of Hidden Markov Models with an efficient algorithm for
multi-state c-r models. I have taken her TPL file and I'm in the process of
generalizing the TPL for any number of states with both temporal and
individual random effects for a mixed-effect model with the fixed
components specified by design matrices.

regards --jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20130114/5b5d9c52/attachment.html>


More information about the Users mailing list