<br><br><div class="gmail_quote">On Jan 15, 2008 3:35 PM, Austin Frank &lt;<a href="mailto:austin.frank@gmail.com">austin.frank@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Mon, Jan 14 2008, Jonathan Berant wrote:<br><br>&gt; So the items are nested in a fixed factor called &#39;cond&#39; (with 3<br>&gt; ordered levels). &nbsp;I am not sure what is the syntax for fitting such a
<br>&gt; model<br>&gt;<br>&gt; the dependent variable is &#39;expScore&#39; and the predictors are &#39;sex&#39;<br>&gt; (between subject factor with 2 levels), &#39;relig&#39; (between subject<br>&gt; factor with 2 levels) and &#39;cond&#39; (within subject factor with 3 levels
<br>&gt; within which the items are nested)<br>&gt;<br>&gt; I tried doing:<br>&gt; lmerA = lmer(expScore~(relig+sex+cond)^2+(1|subjId) + (1|itemId),<br>&gt; data=religData)<br>&gt;<br></div><div class="Ih2E3d">&gt; So how do I specify that items is a random factor nested in a fixed
<br>&gt; factor?<br><br></div>Jonathan--<br><br>The correct answer partly depends on what variance structure you want to<br>fit for the random effects. </blockquote><div><br>In any case, however, you do not want to treat different items as if there are the same. so, you should not use the same item id for items that are actually different. i should have been clearer about this in my last message.
<br><br>Florian<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&nbsp;You can try the following variations to get<br>an idea of the different ways of dealing with nested effects within
<br>lmer:<br><br>--8&lt;---------------cut here---------------start-------------&gt;8---<br>lmerB = lmer(expScore ~ (relig+sex+cond)^2 +<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1 | subjId) +<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1 | cond / itemId),
<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data=religData)<br><br>lmerC = lmer(expScore ~ (relig+sex+cond)^2 +<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1 | subjId) +<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1 | cond : itemId),<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data=religData)<br><br>lmerD = lmer(expScore ~ (relig+sex+cond)^2 +
<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1 | subjId) +<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1 | cond) +<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1 | cond : itemId),<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data=religData)<br>--8&lt;---------------cut here---------------end---------------&gt;8---
<br><br>HTH,<br>/au<br><font color="#888888"><br>--<br>Austin Frank<br><a href="http://aufrank.net" target="_blank">http://aufrank.net</a><br>GPG Public Key (D7398C2F): <a href="http://aufrank.net/personal.asc" target="_blank">
http://aufrank.net/personal.asc</a><br></font><br>_______________________________________________<br>R-lang mailing list<br><a href="mailto:R-lang@ling.ucsd.edu">R-lang@ling.ucsd.edu</a><br><a href="http://pidgin.ucsd.edu/mailman/listinfo/r-lang" target="_blank">
http://pidgin.ucsd.edu/mailman/listinfo/r-lang</a><br><br></blockquote></div><br>