<div dir="ltr">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. <div>
<br></div><div>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?</div>
<div><br></div><div style>I'm still using vectorized operations simply because it makes the code easier to read - at least for me.</div><div style><br></div><div style>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.</div>
<div style><br></div><div style>regards --jeff</div></div>