gen.data | R Documentation |
Generate simulated data for sparse group linear model.
gen.data(
n,
m,
d,
s,
s0,
cor.type = 1,
beta.type = 1,
rho = 0.5,
sigma1 = 1,
sigma2 = 1,
seed = 1
)
n |
The number of observations. |
m |
The number of groups of interest. |
d |
The group size of each group. Only even group structure is allowed here. |
s |
The number of important groups in the underlying regression model. |
s0 |
The number of important variables in each important group. |
cor.type |
The structure of correlation.
|
beta.type |
The structure of coefficients.
|
rho |
A parameter used to characterize the pairwise correlation in
predictors. Default is |
sigma1 |
The value controlling the strength of the gaussian noise. A large value implies strong noise. Default |
sigma2 |
The value controlling the strength of the coefficients. A large value implies large coefficients. Default |
seed |
random seed. Default: |
A list
object comprising:
x |
Design matrix of predictors. |
y |
Response variable. |
beta |
The coefficients used in the underlying regression model. |
group |
The group index of each variable. |
true.group |
The important groups in the sparse group linear model. |
true.variable |
The important variables in the sparse group linear model. |
Yanhang Zhang, Zhifan Li, Jianxin Yin.
# Generate simulated data
n <- 200
m <- 100
d <- 10
s <- 5
s0 <- 5
data <- gen.data(n, m, d, s, s0)
str(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.