Learn R Programming

semPower (version 1.2.0)

semPower.powerCFA: semPower.powerCFA

Description

Convenience function for performing power analysis for simple CFA models involving one hypothesized zero correlation between factors. This requires the lavaan package.

Usage

semPower.powerCFA(
  type,
  comparison = "restricted",
  phi,
  nullCor = NULL,
  lambda = NULL,
  nIndicator = NULL,
  loadM = NULL,
  loadSD = NULL,
  loadMinMax = NULL,
  ...
)

Value

a list containing the results of the power analysis, Sigma and SigmaHat as well as several lavaan model strings (modelPop, modelTrue, and modelAna)

Arguments

type

type of power analysis, one of 'a-priori', 'post-hoc', 'compromise'

comparison

comparison model, one of 'saturated' or 'restricted'. This determines the df for power analyses. 'Saturated' provides power to reject the model when compared to the saturated model, so the df equal the one of the hypothesized model. 'Restricted' provides power to reject the model when compared to a model that just restricts the parameter defined by nullCor to zero, so the df are always 1.

phi

factor correlation matrix or single number giving correlation between all factors

nullCor

vector of size 2 indicating which factor correlation in phi is hypothesized to equal zero, e.g. c(1, 2) to refer to the correlation between first and second factor

lambda

a list providing factor loadings by factor. Must not contain secondary loadings.

nIndicator

vector indicating the number of indicators for each factor, e.g. c(4, 6) to define two factors with 4 and 6 indicators, respectively

loadM

vector giving mean loadings for each factor or single number to use for every loading

loadSD

vector giving the standard deviation of loadings for each factor for use in conjunction with loadM. When NULL, SDs are set to zero.

loadMinMax

matrix giving the minimum and maximum loading for each factor or vector to apply to all factors

...

other parameters related to the specific type of power analysis requested