<p>You're looking at very old slides.</p>

<ul>
<li>a full description of the linear mixed model capabilities of the package, including details of the internal representation, is <a href="http://arxiv.org/abs/1406.5823" rel="nofollow">on arxiv</a>, in press in <em>J. Stat. Software</em> (a reference to this information is also in the <a href="http://cran.r-project.org/web/packages/lme4/citation.html" rel="nofollow">citation information for the package on CRAN</a>).  (We're still working on the paper that describes the GLMM capabilities.)</li>
<li>the <code>getME()</code> function is the current recommended method for accessing model information.</li>
<li><code>lme4</code> is still under fairly active development <a href="https://github.com/lme4/lme4/" rel="nofollow">on github</a>.</li>
<li>Doug Bates is indeed more interested in <a href="https://github.com/dmbates/MixedModels.jl" rel="nofollow">building mixed model frameworks in Julia now</a>, but he still participates in <code>lme4</code> maintenance to some extent.</li>
</ul>

<p>The notation/internal representation has changed somewhat, but reconstructing the variance-covariance matrix from internal information can be done as follows (the internal <code>Lambdat</code> is equivalent to <code>t(T %*% S)</code> in the old notation).</p>

<pre><code>library("lme4")
fm1 &lt;- lmer(Yield ~ 1 + (1 | Batch), Dyestuff)
crossprod(getME(fm1,"Lambdat"))
</code></pre>
Extractor Functions in lme4 Misfunctioning?
<p>I'm trying to understand the linear algebra operations behind the <code>lmer</code> function in <code>R</code>, and I found what seemed to be a great resource on-line on a <a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=5&amp;cad=rja&amp;uact=8&amp;ved=0CEkQFjAE&amp;url=http%3A%2F%2Fwww.stat.wisc.edu%2F~bates%2FPotsdamGLMM%2FLMMD.pdf&amp;ei=_oxvVZ_POI71yATSi4I4&amp;usg=AFQjCNFJyW3K10nLDRBmcRwPudsrrSnElg&amp;bvm=bv.94911696,d.aWw" rel="nofollow">lecture</a> given by the creator of the <code>lme4</code> package, Douglas Bates.</p>

<p>The example deals with the dataset <em>Dyestuff</em> and calls for a mixed-effects model as follows:</p>

<pre><code>fm1 &lt;- lmer(Yield ~ 1 + (1 | Batch), Dyestuff)
</code></pre>

<p>The following slides include lines of code to extract the underlying matrices for the random effects, such as:</p>

<pre><code>efm1 &lt;- expand(fm1)
efm1$S
6 x 6 diagonal matrix of class "ddiMatrix"

#       [,1]      [,2]    [,3]    [,4]    [,5]    [,6]
[1,]  0.84823       .       .       .       .       .
[2,]       .  0.84823       .       .       .       .
[3,]       .       .  0.84823       .       .       .
[4,]       .       .       .  0.84823       .       .
[5,]       .       .       .       .  0.84823       .
[6,]       .       .       .       .       .  0.84823
</code></pre>

<p>and,</p>

<pre><code>efm1$T6 x 6 sparse Matrix of class "dtCMatrix"
[1,] 1 . . . . .
[2,] . 1 . . . .
[3,] . . 1 . . .
[4,] . . . 1 . .
[5,] . . . . 1 .
[6,] . . . . . 1
</code></pre>

<p>or,</p>

<pre><code>(fm1S &lt;- tcrossprod(efm1$T %*% efm1$S))

6 x 6 sparse Matrix of class "dsCMatrix"

[1,] 0.71949 .       .       .       .       .
[2,] .       0.71949 .       .       .       .
[3,] .       .       0.71949 .       .       .
[4,] .       .       .       0.71949 .       .
[5,] .       .       .       .       0.71949 .
[6,] .       .       .       .       .       0.71949
</code></pre>

<p>Yet, when I try to run the same line codes on R, I get the following error messages:</p>

<pre><code>efm1 &lt;- expand(fm1)

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘expand’ for signature ‘"lmerMod"’
</code></pre>

<p>and not surprisingly,</p>

<pre><code>efm1$S
Error: object 'efm1' not found
</code></pre>

<p>Doing a <code>?expand</code> identifies this function as still existing, and seemingly meant to produce matrix decompositions, such as LU or RQ.</p>

<p>Doing a search on-line, I found out that Douglas is using now <em>Julia</em> (can the next statistical language have a less implausible name? No, not "Pied Pier"! Sorry, I digress...).</p>

<p>What am I doing wrong? Is the <code>lme4</code> now orphan and in decay? Is there a typo in the slides?</p>