Package {FAfA}


Title: Factor Analysis for All
Version: 1.2
Date: 2026-08-01
Description: Provides a comprehensive Shiny-based graphical user interface for conducting a wide range of factor analysis procedures. 'FAfA' (Factor Analysis for All) guides users through data uploading, assumption checking (descriptives, collinearity, multivariate normality, outliers), data wrangling (variable exclusion, data splitting), factor retention analysis (e.g., Parallel Analysis, Hull method, EGA), Exploratory Factor Analysis (EFA) with various rotation and extraction methods, Confirmatory Factor Analysis (CFA) for model testing, Reliability Analysis (e.g., Cronbach's Alpha, McDonald's Omega), Measurement Invariance testing across groups, and item weighting techniques. The application leverages established R packages such as 'lavaan' and 'psych' to perform these analyses, offering an accessible platform for researchers and students. Results are presented in user-friendly tables and plots, with options for downloading outputs. Analysis projects can be saved and restored, and reproducible R, HTML, and PDF workflow reports can be generated.
License: AGPL-3
Copyright: See file inst/COPYRIGHTS.
Depends: R (≥ 4.1.0)
URL: https://github.com/AFarukKILIC/FAfA
BugReports: https://github.com/AFarukKILIC/FAfA/issues
Imports: Amelia, EFA.MRFA, EFA.dimensions, EFAtools, EGAnet (≥ 2.4.1), ItemRest, bsicons, bslib, ggplot2, golem, grDevices, graphics, haven, lavaan, mice, missForest, mvnormalTest, naniar, psych, qgraph, readxl, semPlot, shiny, shinycssloaders, stats, tools, utils
Suggests: flextable, officer, shinytest2, spelling, testthat (≥ 3.0.0)
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-08-02 13:09:00 UTC; Faruk
Author: Abdullah Faruk KILIC [aut, cre, cph], Ahmet Caliskan [aut, cph], Melissa G. Wolf [ctb, cph] (Dynamic Fit Index methodology and upstream implementation), Daniel McNeish [ctb, cph] (Dynamic Fit Index methodology and upstream implementation)
Maintainer: Abdullah Faruk KILIC <afarukkilic@trakya.edu.tr>
Repository: CRAN
Date/Publication: 2026-08-02 13:30:02 UTC

About Server Module

Description

About Server Module

Usage

about_server(id)

Arguments

id

Module namespace ID.


Assumptions Server Logic

Description

Assumptions Server Logic

Usage

assumptions_server(id, data, error_recorder = NULL, language = NULL)

Arguments

id

Module namespace ID.

data

Input data (reactive).

error_recorder

Optional function used for anonymous diagnostics.

language

Optional reactive interface language.


Confirmatory Factor Analysis (CFA) Server Module

Description

Confirmatory Factor Analysis (CFA) Server Module

Usage

cfa_server(
  id,
  data,
  factor_dictionary = NULL,
  error_recorder = NULL,
  language = NULL
)

Arguments

id

Module namespace ID.

data

Reactive containing the input dataset.

factor_dictionary

Shared reactive value containing factor-to-item mappings.

error_recorder

Optional function used for anonymous diagnostics.

language

Optional reactive interface language.

Details

The Dynamic Fit Index workflow called by this module is adapted from version 1.1.0 of the dynamic R package under the GNU Affero General Public License, version 3 (AGPL-3). The integration was rewritten for FAfA's existing lavaan analysis flow rather than copied verbatim.

References

McNeish, D., & Wolf, M. G. (2023). Dynamic fit index cutoffs for confirmatory factor analysis models. Psychological Methods, 28(1), 61-88. doi:10.1037/met0000425


Confirmatory Factor Analysis (CFA) UI Module

Description

Confirmatory Factor Analysis (CFA) UI Module

Usage

cfa_ui(id)

Arguments

id

Module namespace ID.


Data Selection Server Logic

Description

Data Selection Server Logic

Usage

data_selection_server(id, data, language = NULL)

Arguments

id

Module namespace ID.

data

Input data (reactive).

language

Reactive or character interface language ("en" or "tr").


EFA Analysis Server Module

Description

EFA Analysis Server Module

Usage

efa_server_analysis(id, data, error_recorder = NULL)

Arguments

id

Module namespace ID.

data

Input data (reactive).

error_recorder

Optional function used for anonymous diagnostics.


EFA Factor Retention Server Module

Description

EFA Factor Retention Server Module

Usage

efa_server_fac_ret(id, data, error_recorder = NULL)

Arguments

id

Module namespace ID.

data

Input data (reactive).

error_recorder

Optional function used for anonymous diagnostics.


EFA Reporting Server Module

Description

EFA Reporting Server Module

Usage

efa_server_report(
  id,
  data,
  efa_output_reactive,
  efa_settings_reactive,
  language = NULL
)

Arguments

id

Module namespace ID.

data

Input data (reactive).

efa_output_reactive

Reactive containing the EFA results.

efa_settings_reactive

Reactive containing the EFA settings.

language

Optional reactive interface language.


Measurement Invariance Server Module

Description

Measurement Invariance Server Module

Usage

inv_server(id, data, error_recorder = NULL, language = NULL)

Arguments

id

Module namespace ID.

data

Input data (reactive)

error_recorder

Optional function used for anonymous diagnostics.

language

Optional reactive interface language.


Item Weighting Server Module

Description

Item Weighting Server Module

Usage

item_weighting_server(id, data, error_recorder = NULL)

Arguments

id

Module namespace ID.

data

Input data (reactive)

error_recorder

Optional function used for anonymous diagnostics.


ItemRest Analysis Server Module

Description

ItemRest Analysis Server Module

Usage

mod_itemrest_server(id, data, error_recorder = NULL, language = NULL)

Arguments

id

Module namespace ID.

data

Reactive containing the input dataset.

error_recorder

Optional function used for anonymous diagnostics.

language

Optional reactive interface language.


ItemRest Analysis UI Module

Description

ItemRest Analysis UI Module

Usage

mod_itemrest_ui(id)

Arguments

id

Module namespace ID.


Missing Value Handling Server Module

Description

Missing Value Handling Server Module

Usage

mod_missing_server(
  id,
  data,
  project_state = NULL,
  restore_state = NULL,
  error_recorder = NULL,
  language = NULL
)

Arguments

id

Module namespace ID.

data

Reactive containing the input dataset.

project_state

Optional shared project-state object.

restore_state

Optional reactive used while loading a project.

error_recorder

Optional function used for anonymous diagnostics.

language

Optional reactive interface language.

Value

Reactive containing the processed (imputed) dataset.


Missing Value Handling UI Module

Description

Missing Value Handling UI Module

Usage

mod_missing_ui(id)

Arguments

id

Module namespace ID.


Default Value Operator

Description

Helper for default NULL values (coalesce)

Usage

x %||% y

Arguments

x

Left hand side

y

Right hand side


Reliability Analysis Server Module

Description

Reliability Analysis Server Module

Usage

reliability_server(id, data, factor_dictionary = NULL, error_recorder = NULL)

Arguments

id

Module namespace ID.

data

Input data (reactive)

factor_dictionary

Shared reactive value containing factor-to-item mappings.

error_recorder

Optional function used for anonymous diagnostics.


Run the Shiny Application

Description

This function launches the Shiny application. It uses default options for shinyApp and golem.

Usage

run_app()

Wrangling Server Modules

Description

Wrangling Server Modules

Usage

wrangling_server_ex_var(
  id,
  data,
  project_state = NULL,
  restore_state = NULL,
  error_recorder = NULL
)

Arguments

id

Module namespace ID.

data

Input data (reactive)

project_state

Optional shared project-state object.

restore_state

Optional reactive used while loading a project.

error_recorder

Optional function used for anonymous diagnostics.


Write an APA 7 Word report

Description

Write an APA 7 Word report

Usage

write_apa7_report(file, title, sections, subtitle = NULL, language = "en")

Arguments

file

Output .docx path.

title

Report title.

sections

List of report sections. Each section may contain title, text, table, and note fields.

subtitle

Optional subtitle.

language

Interface language ("en" or "tr").

Value

The output path, invisibly.