simulations: Simulate datasets

Description Usage Arguments Value Author(s) Examples

Description

sim.dat.1 simulates a dataset with two covariates to reproduce Pepe Figure 1. skin.orange simulates a skin of orange dataset as in Hastie et al.

Usage

1
sim.dat.1(n, seed, add.outliers=FALSE, std.dev = 0.2)

Arguments

n

sample size

seed

seed for random number generator

add.outliers

boolean. If TRUE, 10% of data are replaced by a contaminating distribution

std.dev

standard deviation in data generating process

Value

A data frame with n rows, and 4 columns: y, x1, x2, and eta, where eta is the linear combination X*beta.

Author(s)

Shuxin Yin
Youyi Fong youyifong@gmail.com
Krisztian Sebestyen

Examples

1
2
3
4
5
dat = sim.dat.1(n=100,seed=1)
nrow(dat)

dat = sim.dat.1(n=100,seed=1,add.outliers=TRUE)
nrow(dat)

aucm documentation built on Jan. 11, 2020, 9:43 a.m.

Related to simulations in aucm...