Skip to contents

This function is specifically for determining k in the context of factor analysis using change in RMSEA as the criterion for identifying the optimal factor model.

Usage

find_k(
  variables,
  n,
  p,
  m = NULL,
  est.pars = NULL,
  max.k = 10,
  min.nk = 200,
  rmsea0 = 0.05,
  rmseaA = 0.08,
  ...
)

Arguments

variables

a data.frame (or convertible to a data.frame) with variables to factor analyze in columns and observations in rows. The power analysis assumes all observations have complete data. Use n argument or remove rows manually to account for missingness.

n

integer; number of observations. Ignored if variables is provided.

p

integer; number of variables to factor analyze. Ignored ifvariables is provided.

m

integer; maximum number of factors expected to be extracted from variables. Default is p / 4 (i.e., 4 variables per factor).

est.pars

integer; number estimated model parameters. Default is 2p + m(m - 1)/2, which reflects a standardized model with simple structure (e.g., no cross-loadings, higher order factors) or constraints (e.g., tau-equivalence)

max.k

integer; maximum number of folds. Default is 10. NULL indicates no maximum.

min.nk

integer; minimum sample size per fold. Default is 200 based on simulations from Curran et al. (2003).

rmsea0

numeric; RMSEA under the null hypothesis.

rmseaA

numeric; RMSEA under the alternative hypothesis.

...

other arguments passed to findRMSEAsamplesize.

Value

named vector with the number of folds (k), sample size suggested for each fold by the power analysis (power.nk), the degrees of freedom used for power analysis, and the sample size for each fold used for determining k (nk)–the higher of power.nk and min.nk.

References

Curran, P. J., Bollen, K. A., Chen, F., Paxton, P., & Kirby, J. B. (2003). Finite sampling properties of the point estimates and confidence intervals of the RMSEA. Sociological Methods & Research, 32(2), 208-252. doi:10.1177/0049124103256130

MacCallum, R. C., Browne, M. W., & Sugawara, H. M. (1996). Power analysis and determination of sample size for covariance structure modeling. Psychological Methods, 1(2), 130–149. doi:10.1037/1082-989X.1.2.130

Examples

find_k(n = 900, p = 11, m = 3)
#>        k power.nk       df       nk 
#>        3      248       41      248 

# adjust precision
find_k(n = 900, p = 11, m = 3, rmsea0 = .03, rmseaA = .10)
#>        k power.nk       df       nk 
#>        4       80       41      200 

# adjust number of estimated parameters (e.g., constrain all factor loadings to be equal)
find_k(n = 900, p = 11, m = 3, est.pars = 15)
#>        k power.nk       df       nk 
#>        4      211       51      211