Skip to content
Prev 2002 / 20628 Next

lmer & mcmcsamp bug?

On Thu, Feb 26, 2009 at 4:21 PM, Hugh Rabagliati
<hugh.rabagliati at gmail.com> wrote:
Well, it's a bug.

The C code called by mcmcsamp does something naughty - it changes the
value of slots of the fitted model object in place.  I plead the usual
excuse for such inexcusable behavior: efficiency.  If one copies the
whole fitted model object at each step in the MCMC iterations the
function would only be applicable to small models and would take
forever, even on those.  (Actually I guess such a statement further
makes me guilty of Knuth's "root of all evil" - premature optimization
- because I haven't actually checked that.)

The code at the end of the C function mer_MCMCsamp is supposed to
restore the original values.  I guess some "infelicities", as Bill
Venables calls them, must have crept in.  I'll take a look.