Ex4.4 | R Documentation |
Reproduces Example 4.4 and Figure 4.3 from the book. If you specify any options, your results may look different. Note that this simulation in particular is very time-consuming if run with the full N=100 replications.
Ex4.4(
N = 100,
s = seq(0.1, 1.1, 0.2),
n = 100,
p = 500,
p1 = 12,
rho = 0.7,
seed = 1
)
Fig4.3(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 |
rho |
Correlation between features (compound symmetric) |
seed |
Seed for reproducibility |
res |
Output from Ex4.4 |
parlist |
List of arguments to pass to |
res <- Ex4.4(N=2, s=c(0.3, 1))
Fig4.3(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.