pamlcorr.RdCompute power parameters for Pearson correlations
pamlcorr(
aim = "n",
es = 0.5,
power = 0.9,
n = 20,
sig.level = 0.05,
alternative = "two.sided",
plot_contour = FALSE,
plot_escurve = FALSE,
plot_ncurve = FALSE,
plot_log = TRUE,
plot_palette = "viridis",
plot_x = "none",
plot_y = "none",
plot_custom_labels = FALSE,
plot_z = "none",
plot_x_from = 0,
plot_x_to = 0,
plot_z_lines = 1,
plot_z_value = list(),
plot_to_table = FALSE,
.interface = "R",
.caller = "correlation"
)The aim of the analysis: n (default) for sample size,
power to estimate power, es for effect size (correlation)
The expected effect size, i.e. the expected correlation
Minimal desired power
Sample size
Type I error rate (significance cut-off or alpha)
`one.side` or `two.sided` (default)
Produce power contour plot
Produce power as a function of possible effect size values plot
Produce power as a function of possible sample size values plot
. Use log-scale in plots
Change the palettes of the plots
Parameter in the X-axis of custom power parameters plot.
n, power or es, the latest being the effect size.
Parameter in the Y-axis of custom power parameters plot.
n, power or es, the latest being the effect size.
Add value labels to the custom power parameters plot, default FALSE.
break down the custom power parameters plot by a parameter.
n, power, sig.level or es for effect size
Range for the parameter in the X-axis of custom power parameters plot. Starting value.
Range for the parameter in the X-axis of custom power parameters plot. Ending value.
not used in R
Values of the parameter to break the plot by
Produce a table of the values plotted in custom power parameters plot
Used for internal purposes
Used for internal purposes
A results object containing:
results$intro | a html | ||||
results$extrainfo | a html | ||||
results$issues | a html | ||||
results$powertab | a table | ||||
results$powerbyes | a table | ||||
results$plotnotes | a html | ||||
results$powerContour | an image | ||||
results$powerEscurve | an image | ||||
results$powerNcurve | an image | ||||
results$powerCustom | an image | ||||
results$customnotes | a html | ||||
results$customtable | a table |
Tables can be converted to data frames with asDF or as.data.frame. For example:
results$powertab$asDF
as.data.frame(results$powertab)