| ks2delta | R Documentation |
Convert KS-distance to effect size using the standard
inverse error function conversion: qnorm( (x + 1) / 2) * 2.
Calculate power and sample size tables for a range of known
powers or sample sizes, and relate them to a sensitivity/specificity.
The calculation relies on a conversion from sens/spec to KS-distance and
an approximation from KS-distance to effect size: qnorm((ks + 1) / 2) * 2.
Plot power curves of call to ks_power_table(),
an object of class ks_pwr_table. You can plot
either power curves or required sample size curves.
This differs from standard power curves
in that the independent variable (usually effect size)
is a varying sensitivity/specificity value.
ks2delta(x)
ks_power_table(
power_vec = seq(0.6, 0.95, 0.05),
n_vec = seq(20, 100, 10),
alpha = 0.05
)
## S3 method for class 'ks_pwr_table'
plot(x, plot_power = TRUE, ...)
x |
|
power_vec |
|
n_vec |
|
alpha |
|
plot_power |
|
... |
Additional arguments as requpred by the |
Effect sizes corresponding to x.
A list of:
n |
A data frame of the number of samples required in each
comparison group to detect an effect corresponding to a given set of
sens/spec values (60/60 to 90/90) and given vector of power values
(default |
power |
A data frame containing
the power to detect an effect corresponding to a given set of sens/spec
values (60/60 to 90/90) given vector of sample sizes in each comparison
group (default |
Stu Field
qnorm()
stats::power.t.test(), ks2delta()
ks2delta(0.45)
ks2delta(seq(0.1, 0.9, length.out = 5))
tables <- ks_power_table()
tables
# S3 plot method
plot(tables)
plot(tables, plot_power = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.