gen.data: Simulate data

Description Usage Arguments Details Value References Examples

View source: R/sSDR.R

Description

Simulate data

Usage

1
gen.data(n, rho = 0.5, theta = 1, binary = FALSE)

Arguments

n

Sample size.

rho

Pairwise correlation between covariates.

theta

Standard deviation of the random error.

binary

If TRUE, generate binary responses; otherwise, by default, create continuous responses.

Details

This function simulates data as presented in Liu (2015).

Value

gen.data returns a list containning at least the following components: "X", a covariate matrix of n observations and p predictors; "y", a univariate response; "b.true", the actual coefficients for each predictor group.

References

Liu, Y. (2015). Approaches to reduce and integrate data in structured and high-dimensional regression problems in Genomics. Ph.D. Dissertation, The Pennsylvania State University, University Park, Department of Statistics.

Examples

1
2
data <- gen.data(n=100)
names(data)

sSDR documentation built on May 1, 2019, 8:23 p.m.

Related to gen.data in sSDR...