Package: bifactory 0.5.0

bifactory: (Bifactor) ESEM with Continuous (MLR) or Ordered (WLSMV) Data

Fits bifactor Exploratory Structural Equation Models (B-ESEM), together with standard ESEM and Confirmatory Factor Analysis (CFA), for continuous and ordered-categorical data. Continuous models use 'lavaan' native 'efa()' blocks (MLR). Ordered-categorical ESEM defaults to 'lavaan' WLSMV; ordered B-ESEM uses a custom diagonally weighted least squares (DWLS) path with polychoric correlations from 'psych', rotation-delta standard errors via 'numDeriv', and a mean- and variance-adjusted chi-square. Target, geomin, and oblimin rotations use 'GPArotation'; the bifactor ESEM approach follows Morin, Arens and Marsh (2016) <doi:10.1080/10705511.2014.961800>. Additional features include multi-group measurement invariance (configural through strict, with partial invariance), ESEM-within-CFA conversion, McDonald's omega reliability suite, and the Mehrvarz and Rouder (2026) <doi:10.31234/osf.io/95enc_v3> alignment ratio check for ICM-CFA misspecification. An optional 'MplusAutomation' interface allows side-by-side comparison with 'Mplus' output.

Authors:Leon T. De Beer [aut, cre]

bifactory_0.5.0.tar.gz
bifactory_0.5.0.zip(r-4.7)bifactory_0.5.0.zip(r-4.6)bifactory_0.5.0.zip(r-4.5)
bifactory_0.5.0.tgz(r-4.6-any)bifactory_0.5.0.tgz(r-4.5-any)
bifactory_0.5.0.tar.gz(r-4.7-any)bifactory_0.5.0.tar.gz(r-4.6-any)
bifactory_0.5.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
bifactory/json (API)

# Install 'bifactory' in R:
install.packages('bifactory', repos = c('https://leondebeer.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/leondebeer/bifactory/issues

On CRAN:

Conda:

2.70 score 37 exports 10 dependencies

Last updated from:2366c53ca0. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK144
source / vignettesOK202
linux-release-x86_64OK140
macos-release-arm64OK141
macos-oldrel-arm64OK232
windows-develOK92
windows-releaseOK88
windows-oldrelOK83
wasm-releaseOK106

Exports:align_loadingsalignment_checkbesembesem_orderedbifactory_templatechisq_decompcompare_ewccompare_loadingscompute_indicescompute_omegaesemesem_compareesem_invarianceesem_orderedewc_syntaxextract_mplus_loadingsfactor_correlationsfactor_scoresfind_ewc_referentsfit_ewcfit_indicesgenerate_mplus_besem_syntaxgenerate_mplus_syntaxget_syntaxlavaan_fitmake_bifactor_targetmake_targetparametersparse_mplus_polychoricpartial_invariancerefine_rotationrun_comparisonrun_mplus_besem_invariancesave_resultsset_targetspecify_modelstd_loadings

Dependencies:GPArotationlatticelavaanMASSmnormtnlmenumDerivpbivnormpsychquadprog

Readme and manuals

Help Manual

Help pageTopics
Align ESEM/B-ESEM standardized loadings to a referencealign_loadings
Alignment Ratio Check for ICM-CFA Specificationalignment_check
Bifactor Exploratory Structural Equation Modeling (B-ESEM)besem
Bifactor ESEM for Ordered-Categorical Databesem_ordered
Open or Copy the bifactory Analysis Templatebifactory_template
Per-Group Chi-Square Decomposition for Invariance Fitschisq_decomp
Extract Parameter Estimates from an esem_fitcoef.esem_fit
Compare Pipeline Results with an EWC Modelcompare_ewc
Compare R and Mplus Standardised Loadingscompare_loadings
Compute Reliability Indices for CFA, ESEM, and B-ESEMcompute_indices
Deprecated: use 'compute_indices' insteadcompute_omega
Exploratory Structural Equation Modelingesem
Compare ESEM Against a Standard CFAesem_compare
Measurement Invariance Testing for ESEM Modelsesem_invariance
ESEM for Ordered-Categorical (Likert) Dataesem_ordered
Generate ESEM-within-CFA Lavaan Syntaxewc_syntax
Extract standardized loadings from MplusAutomation outputextract_mplus_loadings
Extract Factor Correlations from an esem_fitfactor_correlations
Extract Latent Factor Scoresfactor_scores
Auto-Select EWC Referent Itemsfind_ewc_referents
Fit an ESEM-within-CFA Modelfit_ewc
Mplus-Matched Fit Indices for a Single Modelfit_indices
Extract Fit Measures from an esem_fitfitMeasures.esem_fit
Generate Mplus B-ESEM Syntaxgenerate_mplus_besem_syntax
Generate Mplus Syntax for ESEM with Target Rotationgenerate_mplus_syntax
Extract the Generated lavaan Syntaxget_syntax
Extract the Underlying lavaan Fit Objectlavaan_fit
Create a Bifactor Target Matrixmake_bifactor_target
Create a Target Loading Matrix for Target Rotationmake_target
Extract Modification Indices from an esem_fitmodindices.esem_fit
Display Model Parametersparameters
Parse Mplus Polychoric Correlation Matrix from Output Fileparse_mplus_polychoric
Partial Measurement Invariance Testingpartial_invariance
Plot Sorted Alignment Ratiosplot.alignment_check
Print Method for alignment_checkprint.alignment_check
Print Method for besem_fitprint.besem_fit
Print Method for esem_comparisonprint.esem_comparison
Print Method for esem_comparison_pipelineprint.esem_comparison_pipeline
Print Method for esem_fitprint.esem_fit
Print Method for esem_invarianceprint.esem_invariance
Print Method for esem_partial_invarianceprint.esem_partial_invariance
Print an esem_spec Objectprint.esem_spec
Print a Target Rotation Matrixprint.esem_target
Print Method for ewc_comparisonprint.ewc_comparison
Print Method for ewc_fitprint.ewc_fit
Print a reliability_indices Objectprint.omega_result print.reliability_indices
Refine B-ESEM Rotation Using Mplus Solution as Warm Startrefine_rotation
Run the Full CFA / ESEM / B-ESEM Comparison Pipelinerun_comparison
Generate, Run, and Compare B-ESEM Invariance Models Against Mplusrun_mplus_besem_invariance
Save Pipeline Results to CSV or xlsxsave_results
Modify an Existing Target Matrixset_target
Specify an ESEM Model Structurespecify_model
Extract Standardized Loadings from an esem_fitstd_loadings
Summary Method for esem_fitsummary.esem_fit
Summary for ESEM-within-CFA Fitssummary.ewc_fit