 exists, select all variables.</p>
<hr />
<h1 id="chp:example-1-complex-nonlinear-function-of-first-4-features">Example 1 — Complex nonlinear function of first 4 features</h1>
<p>Here, \(Y\) depends only on the first 4 features of \(X\) in a nonlinear way.</p>
<pre><code class="language-r">set.seed(42)
n &lt;- 2000
p &lt;- 100
X &lt;- matrix(rnorm(n * p), ncol = p)
colnames(X) &lt;- paste0(&quot;X&quot;, seq_len(p))
Y &lt;- X[, 1] * X[, 2] + sin(X[, 1] * X[, 3]) + X[, 4]^2
</code></pre>
<h2 id="sec:foci-r