Compute 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"
)

Arguments

aim

The aim of the analysis: n (default) for sample size, power to estimate power, es for effect size (correlation)

es

The expected effect size, i.e. the expected correlation

power

Minimal desired power

n

Sample size

sig.level

Type I error rate (significance cut-off or alpha)

alternative

`one.side` or `two.sided` (default)

plot_contour

Produce power contour plot

plot_escurve

Produce power as a function of possible effect size values plot

plot_ncurve

Produce power as a function of possible sample size values plot

plot_log

. Use log-scale in plots

plot_palette

Change the palettes of the plots

plot_x

Parameter in the X-axis of custom power parameters plot. n, power or es, the latest being the effect size.

plot_y

Parameter in the Y-axis of custom power parameters plot. n, power or es, the latest being the effect size.

plot_custom_labels

Add value labels to the custom power parameters plot, default FALSE.

plot_z

break down the custom power parameters plot by a parameter. n, power, sig.level or es for effect size

plot_x_from

Range for the parameter in the X-axis of custom power parameters plot. Starting value.

plot_x_to

Range for the parameter in the X-axis of custom power parameters plot. Ending value.

plot_z_lines

not used in R

plot_z_value

Values of the parameter to break the plot by

plot_to_table

Produce a table of the values plotted in custom power parameters plot

.interface

Used for internal purposes

.caller

Used for internal purposes

Value

A results object containing:

results$introa html
results$extrainfoa html
results$issuesa html
results$powertaba table
results$powerbyesa table
results$plotnotesa html
results$powerContouran image
results$powerEscurvean image
results$powerNcurvean image
results$powerCustoman image
results$customnotesa html
results$customtablea table

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$powertab$asDF

as.data.frame(results$powertab)