This repository includes a comprehensive test suite for the KAEFA R package, including additional coverage for greedy search behavior, parameter interactions, and edge cases.
tests/testthat/test-aefa-greedy-algorithm.R(core greedy algorithm tests)tests/testthat/test-engineAEFA-greedy-algorithm.R(engineAEFA tests)tests/testthat/test-aefa-utilities.R(utility function tests)tests/testthat/test-aefa-integration.R(integration tests)tests/testthat/test-documentation-validation.R(documentation validation)tests/testthat/test-edge-cases.R(edge case tests)tests/testthat/test-aefa-advanced-parameters.R(advanced parameter tests)
- 7 test files
- ~2,000 lines of test code
- ~235 test cases
- Model selection criteria (DIC, AIC, BIC, AICc, saBIC)
- Rotation methods (bifactorQ, geominQ, geominT, oblimin, quartimax)
- MCMC parameters (NCYCLES, BURNIN, SEMCYCLES)
- Resampling control and sample sizing
- Algorithm controls (GenRandomPars, accelerate, symmetric, ranefautocomb)
- Item fit assessment (printItemFit, fitIndicesCutOff)
- Model persistence (saveModelHistory, saveRawEstModels)
- Advanced estimation options (fitEMatUIRT, tryLCA, forcingQMC, turnOffMixedEst, PV_Q1)
- DIF detection (anchor parameter scenarios)
- Specialized behaviors (skipggum, leniency)
- Complex parameter combinations
- Convergence validation (reproducibility, sequential factor additions)
library(testthat)
library(kaefa)
# All tests
test_check("kaefa")
# Advanced parameter tests only
test_file("tests/testthat/test-aefa-advanced-parameters.R")
# Coverage
library(covr)
package_coverage()- Some large dataset tests are guarded by
RUN_LARGE_TESTS.