Description Usage Arguments Value Author(s) See Also Examples
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.
1 | generate.benchmark.data(typ, noises, n, project = FALSE, windx = 1, windy = 1)
|
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 |
windy |
decimal, how many times the dependence should wind around the torus in y-direction. Only used if |
list with two elements
x |
matrix of x-coordinates, each column corresponds to a noise level from |
y |
matrix of y-coordinates, each column corresponds to a noise level from |
Sebastian Dümcke duemcke@mpipz.mpg.de
generate.patchwork.copula
for generating non-functional dependence and run.tests
for benchmarking tests of independence
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))
|
$x
[,1] [,2]
[1,] 0.4225692 0.68005846
[2,] 0.3012236 0.88798707
[3,] 0.2560643 0.53826192
[4,] 0.8122777 0.47021578
[5,] 0.9862404 0.55878343
[6,] 0.2195186 0.44723613
[7,] 0.8306193 0.42413410
[8,] 0.2084403 0.84349363
[9,] 0.3815134 0.08726359
[10,] 0.1585132 0.90444383
$y
[,1] [,2]
[1,] 0.13471794 -0.7054456
[2,] -0.05734843 0.5011241
[3,] 0.31522694 -0.4058433
[4,] 0.57407746 0.2201121
[5,] 0.83880061 -1.1436079
[6,] 0.64645499 -0.2617601
[7,] 0.66637810 -0.5883212
[8,] 0.14914134 -0.5083607
[9,] 0.55445046 0.3576194
[10,] 0.84936922 0.8578760
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.