powerPrepare: powerPrepare

View source: R/validator.R

powerPrepareR Documentation

powerPrepare

Description

Performs some preparations common to all types of power analyses.

Usage

powerPrepare(
  type = NULL,
  effect = NULL,
  effect.measure = NULL,
  alpha = NULL,
  beta = NULL,
  power = NULL,
  abratio = NULL,
  N = NULL,
  df = NULL,
  p = NULL,
  SigmaHat = NULL,
  Sigma = NULL,
  muHat = NULL,
  mu = NULL,
  fittingFunction = "ML",
  simulatedPower = FALSE,
  modelH0 = NULL,
  nReplications = NULL,
  minConvergenceRate = NULL,
  lavOptions = NULL
)

Arguments

type

type of power analysis

effect

effect size specifying the discrepancy between H0 and H1 (a list for multiple group models; a vector of length 2 for effect-size differences)

effect.measure

type of effect, one of "F0", "RMSEA", "Mc", "GFI", "AGFI"

alpha

alpha error

beta

beta error; set either beta or power

power

power (=1 - beta); set either beta or power

abratio

the ratio of alpha to beta

N

the number of observations (a list for multiple group models)

df

the model degrees of freedom

p

the number of observed variables, required for effect.measure = "GFI" and effect.measure = "AGFI"

SigmaHat

model implied covariance matrix (a list for multiple group models). Use in conjunction with Sigma to define effect and effect.measure.

Sigma

observed (or population) covariance matrix (a list for multiple group models). Use in conjunction with SigmaHat to define effect and effect.measure.

muHat

model implied mean vector

mu

observed (or population) mean vector

fittingFunction

one of 'ML' (default), 'WLS', 'DWLS', 'ULS'. Defines the discrepancy function used to obtain Fmin.

simulatedPower

whether to perform a simulated (TRUE) (rather than analytical, FALSE) power analysis.

modelH0

for simulated power: lavaan model string defining the (incorrect) analysis model.

nReplications

for simulated power: number of random samples drawn.

minConvergenceRate

for simulated power: the minimum convergence rate required

lavOptions

for simulated power: a list of additional options passed to lavaan, e. g., list(estimator = 'mlm') to request robust ML estimation.

Value

list


semPower documentation built on Nov. 15, 2023, 1:08 a.m.