Power analysis for between-subjects, within-subjects, and mixed factorial designs specified via observed or expected cell means and standard deviations.

pamlfactorial(
  data,
  aim = "n",
  mode = "facpeta",
  means = NULL,
  sds = NULL,
  factors = NULL,
  within = NULL,
  r = 0,
  peta = 0.2,
  effect_type,
  repeated_type,
  df_effect = 1,
  effect_groups = 2,
  design_groups = 2,
  power = 0.9,
  n = 20,
  sig.level = 0.05,
  plot_contour = FALSE,
  plot_escurve = FALSE,
  plot_ncurve = FALSE,
  plot_log = FALSE,
  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,
  ncp_type,
  emeans = FALSE,
  esos = FALSE,
  .interface = "jamovi",
  .caller = "factorial"
)

Arguments

data

the data as a data frame

aim

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

mode

.

means

a string naming the variable containing the means from data; the variable must be numeric.

sds

a string naming the variable containing the standard deviations from data; the variable must be numeric.

factors

a vector of strings naming the factors from data. Not needed if formula is used.

within

a vector of strings naming the repeated measures factors from data.

r

Expected correlation among repeated measures

peta

.

effect_type

.

repeated_type

.

df_effect

.

effect_groups

.

design_groups

.

power

Minimal desired power

n

Sample size

sig.level

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

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

.

ncp_type

.

emeans

.

esos

.

.interface

Used for internal purposes

.caller

.

Value

A results object containing:

results$introa html
results$extrainfoa html
results$issuesa html
results$infotaba table
results$powertaba table
results$powerbyesa table
results$meansan array of predicted means tables
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$infotab$asDF

as.data.frame(results$infotab)