Ex4.3 | R Documentation |
Reproduces Example 4.3 and Figure 4.2 from the book. If you specify any options, your results may look different.
Ex4.3(N = 100, s = seq(0.1, 1.1, 0.2), n = 100, p = 500, p1 = 12, seed = 1)
Fig4.2(res, parlist = list(mfrow = c(1, 2), mar = c(4, 4, 2, 0.5)))
N |
Number of simulated realizations |
s |
Signal strength (coefficient value for the non-null features) |
n |
Sample size |
p |
Number of features |
p1 |
Number of non-null features |
seed |
Seed for reproducibility |
res |
Output from Ex4.3 |
parlist |
List of arguments to pass to |
res <- Ex4.3(N=2, s=c(0.3, 1))
Fig4.2(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.