Power analysis for structural equation models estimated via the RMSEA-based method or Monte Carlo simulation.

pamlsem(
  aim = "n",
  code = "",
  fonts = "small",
  toggle = FALSE,
  power = 0.9,
  n = 100,
  sig.level = 0.05,
  alternative = "two.sided",
  estimator = "ML",
  standardized = TRUE,
  inspect_sigma = FALSE,
  inspect_lvcov = FALSE,
  inspect_zbeta = FALSE,
  method = "analytic",
  mc_test = "lrt",
  mcR = 500,
  parallel = TRUE,
  set_seed = FALSE,
  seed = 42,
  table_pwbyn = TRUE,
  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 = 1,
  plot_z_value = list(),
  plot_to_table = FALSE,
  explain = FALSE,
  lav_diagram = TRUE,
  diag_size = "medium",
  .interface = "jamovi",
  .caller = "pamlsem"
)

Arguments

aim

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

code

.

fonts

.

toggle

.

power

Minimal desired power

n

Sample size

sig.level

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

alternative

Two-tailed vs one-tailed test

estimator

Estimator method used in SEM. ML for Maximum Likelihood

standardized

Assume the observed variables are standardized (TRUE) or not (FALSE)

inspect_sigma

not used in R

inspect_lvcov

not used in R

inspect_zbeta

not used in R

method

Use analytic methods for computation of power parameter (analytic) or Monte Carlo (mc)

mc_test

which test is used in Monte Carlo simulations: lrt for LRT or score for the Score test.

mcR

Number of repetitions for Monte Carlo method

parallel

Logical: should parallel computing be used for the Monte Carlo method

set_seed

not used in R

seed

not used in R

table_pwbyn

.

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

lav_diagram

Output the path diagram corresponding to the input model

diag_size

Size of the path diagram boxes: small, medium, large

.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$initnotesa html
results$diagraman image
results$powertaba table
results$powerbyna table
results$implied$covsa table
results$implied$lvcovsa table
results$implied$betasa table
results$plotnotesa html
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)