Generate_data {BBSSL} | R Documentation |
This function generates data (X,y) with specified correlation and noise standard deviation.
Generate_data(truth.beta, p, n, truth.sigma, rho, correlation = c("block", "all"),
NumOfBlock)
truth.beta |
A vector of active beta's (s x 1, with s being the number of active coordinates). |
p |
The number of covariates. |
n |
The number of observations. |
truth.sigma |
Noise standard deviation. |
rho |
Correlation Coefficient. |
correlation |
Correlation structure. Correlation = "block" means predictors are grouped into equi-size blocks where each block contains one active predictor, and the within-block correlation coefficient is rho; predictors in different blocks are mutually independent. Correlation = "all" means all predictors are equi-correlated with coefficient rho. |
NumOfBlock |
Number of blocks, used only when correlation = 'block'. |
A list, including vector 'y' (n x 1), matrix 'X' (n x p), vector 'beta' (p x 1).