powered by
Generates sparse linear regression model for testing dantzig function
dantzig
dantzig.generator(n = 50, d = 100, sparsity = 0.1, sigma0=1)
An object with S3 class "dantzig.generator" is returned:
X0 is the n by d matrix for the generated data
X0
n
d
A y is a n response vector for the generated data
y
BETA is a length d regression coefficient vector
BETA
s is the number of nonzero entries out of d
s
A vector containing the indices of the nonzero entries (may contain repeats)
The number of observations (sample size). The default value is 50.
50
The number of variables (dimension). The default value is 100.
100
d is either the number of nonzero entries out of d or the proportion of nonzero entries in BETA
sigma0 is the standard deviation of the noise vector
sigma0
Haotian Pang, Han Liu, Robert Vanderbei and Di Qi Maintainer: Di Qi <dqi@princeton.edu>
## L = dantzig.generator(n = 50, d = 100, sparsity = 0.1)
Run the code above in your browser using DataLab