Title: | Automated Item Removal Strategies for Exploratory Factor Analysis |
Version: | 0.2.3 |
Description: | Automates the identification and comparative evaluation of item-removal strategies in exploratory factor analysis, producing transparent summaries (explained variance, loading ranges, reliability) to support comfortable, reproducible decisions. The criteria are based on best practices and established heuristics (e.g., Costello & Osborne (2005) <doi:10.7275/jyj1-4868>, Howard (2016) <doi:10.1080/10447318.2015.1087664>). |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
Depends: | R (≥ 4.1) |
Imports: | gtools, psych, qgraph, stats, utils |
URL: | https://github.com/ahmetcaliskan1987/ItemRest |
BugReports: | https://github.com/ahmetcaliskan1987/ItemRest/issues |
Suggests: | testthat (≥ 3.0.0), knitr, rmarkdown |
VignetteBuilder: | knitr |
RoxygenNote: | 7.3.3 |
NeedsCompilation: | no |
Packaged: | 2025-10-06 14:02:37 UTC; ahmetcaliskan |
Author: | Ahmet Çalışkan [aut, cre], Abdullah Faruk Kılıç [aut] |
Maintainer: | Ahmet Çalışkan <ahmetcaliskan1987@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2025-10-09 12:10:17 UTC |
Calculate a correlation matrix.
Description
Calculate a correlation matrix.
Usage
cor_matrix_custom(data, method = "polychoric")
Calculate basic descriptive statistics for a dataset.
Description
Calculate basic descriptive statistics for a dataset.
Usage
descriptive_stats(data)
Determine the number of factors using Parallel Analysis.
Description
Determine the number of factors using Parallel Analysis.
Usage
determine_n_factors(data, cor_method = "pearson")
Run a custom EFA.
Description
Run a custom EFA.
Usage
efa_custom(
data,
n_factors = 1,
cor_method = "polychoric",
extract = "uls",
rotate = "oblimin"
)
Generate combinations of items to remove.
Description
Generate combinations of items to remove.
Usage
get_combinations(items)
Evaluate Item Removal Strategies for Exploratory Factor Analysis (EFA)
Description
This function automates the process of identifying low-quality items (those with low factor loadings or significant cross-loadings) in an Exploratory Factor Analysis (EFA). It systematically tests various combinations of removing these problematic items and evaluates the impact on model fit, returning a comprehensive summary of all tested strategies.
Usage
itemrest(
data,
cor_method = "pearson",
n_factors = NULL,
extract = "uls",
rotate = "oblimin"
)
Arguments
data |
A numeric |
cor_method |
The correlation method to use, e.g., |
n_factors |
The number of factors. If |
extract |
The factor extraction (estimation) method. See |
rotate |
The rotation method. See |
Value
An object of class itemrest_result
. This is a list containing the
following components:
descriptive_stats |
Basic descriptive statistics of the input data. |
initial_efa |
The results of the initial EFA before any items are removed. |
problem_items |
A list of items identified as low-loading or cross-loading. |
removal_summary |
A data.frame summarizing the results of all tested removal strategies. |
optimal_strategy |
The best-performing strategy that resulted in a clean factor structure (no cross-loadings). |
settings |
A list of the settings used for the analysis. |
Examples
# We will use the 'bfi' dataset from the 'psych' package.
# This requires the 'psych' package to be installed.
if (requireNamespace("psych", quietly = TRUE)) {
data(bfi, package = "psych")
# 1. Prepare the data: Select the personality items (first 25 columns)
# and remove rows with missing values for this example.
example_data <- bfi[, 1:25]
example_data <- na.omit(example_data)
# 2. Run the item removal analysis.
# Based on theory, the Big Five model has 5 factors.
results <- itemrest(
data = example_data,
n_factors = 5,
cor_method = "pearson" # Data is not ordinal, so pearson is appropriate
)
# 3. Print the report for optimal strategies (default).
print(results)
# 4. Print the report for all tested strategies.
print(results, report = "all")
}
Print method for itemrest_result
class
Description
Print method for itemrest_result
class
Usage
## S3 method for class 'itemrest_result'
print(x, report = "optimal", ...)
Arguments
x |
An object of class |
report |
The type of report to generate: |
... |
Other arguments (not used). |
Value
No return value, called for side effects (prints the report to the console).
Examples
if (requireNamespace("psych", quietly = TRUE)) {
data(bfi, package = "psych")
example_data <- na.omit(bfi[, 1:25])
results <- itemrest(example_data, n_factors = 5)
# Print the default optimal report
print(results)
# Print the report of all strategies
print(results, report = "all")
}
Sort item IDs numerically.
Description
Sort item IDs numerically.
Usage
sort_item_ids(x)
Test removal strategies and build a summary table.
Description
Test removal strategies and build a summary table.
Usage
test_removals(data, base_items, combs, n_factors, cor_method, extract, rotate)