# NOT RUN {
# generate data for linear regression
data.linear <- gen.sim.data(n = 20, p = 10, s = 4)
# extract x
x <- data.linear[[1]]
# extract y
y <- data.linear[[2]]
# extract the indices of true signals
index <- data.linear[[3]]
# extract the true coefficient vector
true.beta <- data.linear[[4]]
# generate data for logistic regression
data.logistic <- gen.sim.data(n = 20, p = 10, s = 4, family = "binomial")
# extract x
x <- data.logistic[[1]]
# extract y
y <- data.logistic[[2]]
# extract the indices of true signals
index <- data.logistic[[3]]
# extract the true coefficient vector
true.beta <- data.logistic[[4]]
# }
Run the code above in your browser using DataLab