data-raw/simulation_data.R

set.seed(123)

n    <- 1000
p   <-  50
X   <- matrix(rnorm(n*p,0,1),n,p)
X[,1]<-2*X[,2]
beta <- rnorm(p,0,1)
Y    <- X%*%beta+rnorm(n,0,0.5)
Jiachen1027/bis557 documentation built on Oct. 30, 2019, 7:41 p.m.