Learn R Programming

fastclime (version 1.4.1.1)

dantzig.generator: Dantzig data generator

Description

Generates sparse linear regression model for testing dantzig function

Usage

dantzig.generator(n = 50, d = 100, sparsity = 0.1, sigma0=1)

Value

An object with S3 class "dantzig.generator" is returned:

X0

X0 is the n by d matrix for the generated data

y

A y is a n response vector for the generated data

BETA

BETA is a length d regression coefficient vector

s

s is the number of nonzero entries out of d

pos

A vector containing the indices of the nonzero entries (may contain repeats)

Arguments

n

The number of observations (sample size). The default value is 50.

d

The number of variables (dimension). The default value is 100.

sparsity

d is either the number of nonzero entries out of d or the proportion of nonzero entries in BETA

sigma0

sigma0 is the standard deviation of the noise vector

Author

Haotian Pang, Han Liu, Robert Vanderbei and Di Qi
Maintainer: Di Qi <dqi@princeton.edu>

Details

Generates sparse linear regression model for testing dantzig function

See Also

dantzig

Examples

Run this code
	
##
L = dantzig.generator(n = 50, d = 100, sparsity = 0.1)	

Run the code above in your browser using DataLab