generate.benchmark.data: Generating functional dependencies

Description Usage Arguments Value Author(s) See Also Examples

View source: R/generate.benchmark.data.R

Description

Generate functional dependencies for benchmarking tests of independence. This function can generate 8 types of functional dependence: linear, quadratic, cubic, two sine functions, x^(1/4), step function and a circular dependence.

Usage

1
generate.benchmark.data(typ, noises, n, project = FALSE, windx = 1, windy = 1)

Arguments

typ

decimal, which type of dependence to generate. 1: linear 2: quadratic 3: cubic 4: sine period pi/4 5: sine period pi/16 6: x^(1/4) 7: circle 8: step function

noises

vector of noise values to apply to the generated dependence. The noise is normally distributed.

n

decimal, size of sample to return.

project

boolean (default FALSE), wether to project the generated dependence onto a torus

windx

decimal, how many times the dependence should wind around the torus in x-direction. Only used if project is TRUE

windy

decimal, how many times the dependence should wind around the torus in y-direction. Only used if project is TRUE

Value

list with two elements

x

matrix of x-coordinates, each column corresponds to a noise level from noises

y

matrix of y-coordinates, each column corresponds to a noise level from noises

Author(s)

Sebastian D<c3><bc>mcke duemcke@mpipz.mpg.de

See Also

generate.patchwork.copula for generating non-functional dependence and run.tests for benchmarking tests of independence

Examples

1
2
3
#generate a quadratic dependence of 10 points with two noise levels 0.3 and 0.6
generate.benchmark.data(2,c(.3,.6),10)
plot(generate.benchmark.data(4,.2,1000))

knnIndep documentation built on May 19, 2017, 2:10 p.m.

Search within the knnIndep package
Search all R packages, documentation and source code