dot-simulate: Data simulation

Description Usage Arguments Details Value Examples

Description

Simulates data for unit tests

Usage

1
.simulate(n, p, cor = 0, prob = 0.1, sd = 1, exp = 1, frac = 1)

Arguments

n

sample size: positive integer

p

covariate space: positive integer

cor

correlation coefficient : numeric between 0 and 1

prob

effect proportion: numeric between 0 and 1

sd

standard deviation: positive numeric

exp

exponent: positive numeric

frac

class proportion: numeric between 0 and 1

Details

For simulating correlated features (cor>0), this function requires the R package MASS (see mvrnorm).

Value

Returns invisible list with elements y and X.

Examples

1
2
data <- cornet:::.simulate(n=10,p=20)
names(data)

cornet documentation built on April 19, 2021, 9:07 a.m.