Generate_data {BBSSL}R Documentation

Generate_data

Description

This function generates data (X,y) with specified correlation and noise standard deviation.

Usage

Generate_data(truth.beta, p, n, truth.sigma, rho, correlation = c("block", "all"),
NumOfBlock)

Arguments

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'.

Value

A list, including vector 'y' (n x 1), matrix 'X' (n x p), vector 'beta' (p x 1).


[Package BBSSL version 0.1.0 Index]