pan class="dv">1</span>, <span class="dv">0</span>)</a>
<a class="sourceLine" id="cb1-13" data-line-number="13">dat<span class="op">$</span>W &lt;-<span class="st"> </span><span class="kw">as.factor</span>(dat<span class="op">$</span>W)</a>
<a class="sourceLine" id="cb1-14" data-line-number="14">dat<span class="op">$</span>Z &lt;-<span class="st"> </span><span class="kw">as.factor</span>(dat<span class="op">$</span>Z)</a>
<a class="sourceLine" id="cb1-15" data-line-number="15"><span class="kw">head</span>(d