Power analysis for one-sample, paired, and independent-samples t-tests: estimate required sample size, power, or minimum detectable effect size.

pamlttest(
  aim = "n",
  mode = "ttestind",
  ttestind_es = 0.5,
  ttestind_n = 20,
  ttestind_nratio = 1,
  ttestpaired_es = 0.5,
  ttestpaired_n = 20,
  ttestone_es = 0.5,
  ttestone_n = 20,
  is_equi = FALSE,
  equi_limit = 0.1,
  power = 0.9,
  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 = 0,
  plot_z_value = list(),
  plot_to_table = FALSE,
  explain = FALSE,
  .caller = "ttest",
  .interface = "jamovi",
  ttestind_ttest = "-",
  ttestind_ngroup = 0,
  ttestind_d = 0,
  ttestind_useit = FALSE,
  ttestpaired_ttest = "-",
  ttestpaired_obsn = 0,
  ttestpaired_d = 0,
  ttestpaired_useit = FALSE,
  ttestpaired_dind = "-",
  ttestpaired_r = 0,
  ttestpaired_dz = 0,
  ttestpaired_d_useit = FALSE,
  ttestone_ttest = "-",
  ttestone_obsn = 0,
  ttestone_d = 0,
  ttestone_useit = FALSE
)

Arguments

aim

The aim of the analysis: n for required N, power for estimated power and es for minimal detectable effect size

mode

.

ttestind_es

Expected Cohe's d

ttestind_n

Sample size per group

ttestind_nratio

Relative size of the two groups. 1 means group of equal size, ratio>1 means that one group is ratio times larger than the other.

ttestpaired_es

Expected Cohe's d_z, defined as the mean difference divided by the standard deviation of the difference score

ttestpaired_n

Expected sample size (number of paires)

ttestone_es

Expected Cohe's d

ttestone_n

Expected sample size

is_equi

When TRUE, perform an equivalence test to show that a true effect is small enough to be considered practically negligible

equi_limit

.

power

Minimal desired power (1-Beta)

sig.level

Critical alpha (significance level to be used in the analysis)

alternative

Wheather the test is two-tailed (two.sided) or one-tailed (greater).

plot_contour

.

plot_escurve

.

plot_ncurve

.

plot_log

.

plot_palette

.

plot_x

.

plot_y

.

plot_custom_labels

.

plot_z

.

plot_x_from

.

plot_x_to

.

plot_z_lines

.

plot_z_value

.

plot_to_table

.

explain

not used in R

.caller

.

.interface

.

ttestind_ttest

not used in R

ttestind_ngroup

not used in R

ttestind_d

not used in R

ttestind_useit

not used in R

ttestpaired_ttest

not used in R

ttestpaired_obsn

not used in R

ttestpaired_d

not used in R

ttestpaired_useit

not used in R

ttestpaired_dind

not used in R

ttestpaired_r

not used in R

ttestpaired_dz

not used in R

ttestpaired_d_useit

not used in R

ttestone_ttest

not used in R

ttestone_obsn

not used in R

ttestone_d

not used in R

ttestone_useit

not used in R

Value

A results object containing:

results$introa html
results$issuesa html
results$extrainfoa 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)