gen.data: Data Generation

Description Usage Arguments Details Value Author(s) References Examples

View source: R/R package.R

Description

Generate a random n by n*ratio matrix with the scale of beta in (-1,1). The number of active variables is p.true. User can input the correlation of data rho and signal to noise ratio. Also change the two different correlation generate methods.

Usage

1
gen.data(n=100,ratio=0.5,p.true=5,rho=0,cor.type=1,snr=10)

Arguments

n

Number of rows of generated data

ratio

Ratio is the proportion of the number of columns over that of the rows.

p.true

Number of active variables

rho

Correlation generate methods

cor.type

Different type of Sigma: Auto regressive(1), Compound symmetry(2)

snr

Signal to noise ratio

Details

n=100,ratio=0.5,p.true=5,rho=0,cor.type=1,snr=10

Value

A list contains three matrices: response variables, predicted variables, beta true and one scalar sigma true.

Author(s)

Sujit K. Ghosh, Kaiyuan Duan, Guangjie Yu

References

A Fast Automatic Variable Selection Method for LinearRegression Model

Examples

1
mydata=gen.data(n=100,ratio=0.1,rho=0.25)

Kaiyuan-Carl-Duan/R-package-AutoLasso documentation built on Dec. 18, 2021, 2:40 a.m.