Description Usage Arguments Author(s) Examples
If alpha is left unspecified, the distribution of p-values is visualized. If alpha is specified, power is plotted as a function of alpha
1 2 | plot.prm_power(x, ..., statistic, alternative, alpha = seq(0.01, 0.25, by =
0.01))
|
x |
a prm_power object to be plotted |
statistic |
the name of the statistic to be visualized |
alternative |
the alternative hypotheses for p-value determination. one of "less", "greater", "two.sided" |
alpha |
the numeric significance level(s) [0-1] used in inference - determines the FPR |
kholub
1 2 3 4 5 6 | gen_data <- function(){ data.frame(x = c(rnorm(50), rnorm(50, 1)), class = rep(c('a', 'b'), each = 50)) }
mcrp <- mcr_power(gen_data, c(mean = function(df){ mean(df[df$class == 'a', 'x']) - mean(df[df$class == 'b', 'x']) },
median = function(df){ median(df[df$class == 'a', 'x']) - median(df[df$class == 'b', 'x']) }),
'class')
plot(mcrp, statistic = 'median', alternative = 'two.sided')
plot(mcrp, statistic = 'median', alternative = 'two.sided', alpha = NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.