Skip to content
Prev 11875 / 20628 Next

Accessing and updating lmer objects

On 14-05-08 01:30 PM, Vincent Dorie wrote:

            
merMod object, you need to propagate the changes to the various
  dependent matrix decompositions. For a lmm, it looks something like:
grab the deviance function for a lmm/glmm and simply call that with
  your desired parameters to get an updated object. However, if you
  want to interject modifications you will need to modify the above
  steps.

  Thanks, Vince.  I think Asaf was trying to follow the step-by-step
procedure (not just calculate the deviance for a new set of procedures),
so this is exactly what he needs -- although it *might* be somewhat
higher-level than the description in the Bates manual referred to
previously. (If you look at the code in src/predModule.cpp::setTheta,
the payload is

	int    *lipt = d_Lind.data();
	double *LamX = d_Lambdat.valuePtr(), *thpt = d_theta.data();
	for (int i = 0; i < d_Lind.size(); ++i) {
	    LamX[i] = thpt[lipt[i] - 1];
	}

which is more or less equivalent to the R code referenced earlier.)

  I really would recommend that people interested in following the
details check out https://github.com/lme4/lme4pureR ... especially
https://github.com/lme4/lme4pureR/blob/master/R/JSS.R ...

  cheers
    Ben