class="sourceCode R"><span class="co"># endo-L-PLS:</span>
<span class="va">lp.endo</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/lpls.html">lpls</a></span><span class="op">(</span><span class="va">X1</span>,<span class="va">X2</span>,<span class="va">X3</span>, ncomp <span class="op">=</span> <span class="fl">2</span>, type <span class="op">=</span> <span class="st">"endo"</span><span class="op">)</span>

<span class="co"># Predict X1 from X2 and X3 (in this case fitted values