Convenience function for performing power analysis for simple CFA models involving one hypothesized zero correlation between factors. This requires the lavaan package.
semPower.powerCFA(
type,
comparison = "restricted",
phi,
nullCor = NULL,
lambda = NULL,
nIndicator = NULL,
loadM = NULL,
loadSD = NULL,
loadMinMax = NULL,
...
)
a list containing the results of the power analysis, Sigma and SigmaHat as well as several lavaan model strings (modelPop, modelTrue, and modelAna)
type of power analysis, one of 'a-priori', 'post-hoc', 'compromise'
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.
factor correlation matrix or single number giving correlation between all factors
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
a list providing factor loadings by factor. Must not contain secondary loadings.
vector indicating the number of indicators for each factor, e.g. c(4, 6) to define two factors with 4 and 6 indicators, respectively
vector giving mean loadings for each factor or single number to use for every loading
vector giving the standard deviation of loadings for each factor for use in conjunction with loadM. When NULL, SDs are set to zero.
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