Plot power of benchmarked tests of independence

Share:

Description

This functions plots the results of the benchmark. Input are the estimated powers at a certin significance level from calculate.power.

Usage

1
2
3
4
5
power.plot(powers, num.noise = seq(from = 0.1, to = 3, by = 0.1), mains = c("Linear", 
	"Quadratic", "Cubic", expression("Sine: period 4" * pi), 
	expression("Sine: period 16" * pi), "X^(1/4)", "Circle", "Step function",
	 "Torus"), col = c("black", "red", "blue", "green", "cyan", "brown", "pink"), 
	 labels = TRUE,	which = 1:nrow(powers[[1]]), show.legend = "bottomright")

Arguments

powers

named list of matrices one for each method with dimension, with one row for each type of dependence and a column for each noise level

num.noise

matrix, noise levels at which the test were run (see run.tests)

mains

character vector, title of each dependence type

col

character vector, specify the colours, one for each test

labels

labels to plot at the x axis, or TRUE (default) for standard label plotting (see axis)

which

numeric vector, which type of dependence to plot

show.legend

character, either ("bottomright", "topleft", "topright", or "bottomleft") indicates where to place the legend (see legend). NULL (default) to disable plotting a legend

Value

Does not return a value, used for the side-effect of plotting

Author(s)

Sebastian D├╝mcke duemcke@mpipz.mpg.de

See Also

calculate.power, run.tests

Examples

1
2
3
4
5
6
mycor = function(...) cor(...)^2
noises = cbind(c(.3,.4,6),c(.3,.5,4))
colnames(noises) = c("1",".2") #mutual information of the noise levels
vals = run.tests(mycor,list(),1:2,noises,100)
power.cor = drop(calculate.power(vals))
power.plot(list(cor=power.cor),t(noises))