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 adata.frame) with variables to factor analyze in columns and observations in rows. The power analysis assumes all observations have complete data. Usenargument or remove rows manually to account for missingness.- n
integer; number of observations. Ignored if
variablesis provided.- p
integer; number of variables to factor analyze. Ignored if
variablesis provided.- m
integer; maximum number of factors expected to be extracted from
variables. Default isp/ 4 (i.e., 4 variables per factor).- est.pars
integer; number estimated model parameters. Default is 2
p+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.
NULLindicates 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