<p>Your formula translates to:</p>

<p><code>conc ~</code> value is modelled using <code>G + F</code> fixed effects <code>(K|F)</code> random slope of <code>K</code> varying on <code>G</code> and <code>(Z|G/F/K)</code> random slope of <code>Z</code> varying on <code>K</code> nested in <code>F</code> nested in <code>G</code>. Also, while you use <code>\</code> rather then <code>:</code>, this translates to: <code>(Z|G) + (Z|G:F) + (Z|G:F:K)</code>. You do not use <code>0 +</code> or <code>- 1</code> in your definition, so intercept is included. </p>

<p>So your model translates to: <code>conc ~ 1 + G + F + (1 + K|F) + (1 + Z|G) + (1 + Z|G:F) + (1 + Z|G:F:K)</code>. Is this what you wanted?</p>

<p>What may be problematic is that in your definition <code>K</code> is both the random slope and grouping variable for random effects - is it for purpose?</p>

<p>Check an article by <a href="http://arxiv.org/pdf/1406.5823.pdf" rel="nofollow">Bates et al. (in press)</a> on <code>lme4</code> and formulas in this package.</p>
Translating proc mixed to lmer - SAS to R
<p>I have the following SAS code that I would like to write in R. I know the class statement is redundant in R (not necessary).</p>

<pre><code>proc mixed data=in_data;
class G F K kal;
model conc=;
random G F K(F) kal(G*F*K);
ods output covparms=out.cov_out;
run;
</code></pre>

<p>I tried the below code, with no luck.</p>

<p>fit &lt;- lmer( conc ~ (1 | G) + (1 | F) + (1 | K/F) + (1  | kal/G:F:K) , sample_1)</p>

<p>with the following output. I was hoping not to get a value for kal or K. </p>

<pre><code>summary(fit)

Random effects:
 Groups    Name        Variance  Std.Dev.
 G:F:K:kal (Intercept) 1.421e-04 0.011921
 F:K       (Intercept) 1.326e-05 0.003641
 F         (Intercept) 6.548e-05 0.008092
 kal       (Intercept) 9.852e-06 0.003139
 K         (Intercept) 1.272e-05 0.003567
 G         (Intercept) 2.165e-03 0.046527
 Residual              4.647e-04 0.021557
</code></pre>