dot-simulate: Data simulation

.simulateR Documentation

Data simulation

Description

Simulates data for unit tests

Usage

.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

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


cornet documentation built on Aug. 17, 2022, 5:06 p.m.