Ex4.2: Reproduce Example 4.2

View source: R/enet-sim.R

Ex4.2R Documentation

Reproduce Example 4.2

Description

Reproduces Example 4.2 from the book. If you specify any options, your results may look different.

Usage

Ex4.2(
  N = 1000,
  rho = seq(0, 0.9, 0.1),
  n = 50,
  p = 100,
  p1 = 5,
  b = 0.5,
  alpha = 0.5,
  corr = c("cs", "bd"),
  seed = 1
)

Arguments

N

Number of simulated realizations

rho

Vector of correlations

n

Sample size

p

Number of features

p1

Number of non-null features

b

Coefficient associated with the non-null features

alpha

Elastic net tuning parameter

corr

Correlation structure, either cs (compound symmetric) or bd (block diagonal)

seed

Seed for reproducibility

Examples

Ex4.2(N=10)

pbreheny/hdrm documentation built on Jan. 17, 2024, 8:53 p.m.