CFA and CB-SEM online: model fit, CR, AVE, HTMT and paths
This free CB-SEM tool runs confirmatory factor analysis (CFA) and covariance-based structural equation modelling in your browser, with no AMOS licence, and matches the R package lavaan to at least 4 decimal places on the public Holzinger–Swineford, mobi and bfi data sets. Fit is judged against Hu and Bentler (1999): CFI and TLI of .95 or above and SRMR of .08 or below, with RMSEA of .06 or below for good fit. Upload your survey file, drag indicators into constructs (or type lavaan-style syntax), add your hypothesised paths and get fit indices, loadings, CR, AVE, HTMT, path coefficients, indirect effects, a path diagram and a Word write-up.
- Upload an Excel or CSV file with one column per indicator (SQ1, SQ2, SAT1…), or try the sample or Holzinger–Swineford data.
- Check the constructs, then add paths for SEM (leave them out for a CFA only).
- Run CFA / SEM and download the Word file with tables, path diagram and results text.
SAT =~ SAT1 + SAT2 + SAT3 defines a construct and its indicators; LOY ~ SAT + TR (or SAT -> LOY) is a path, in the order of hypotheses H1, H2…; SAT1 ~~ SAT2 is a covariance between two error terms; HO =~ SAT + TR is a second-order construct. The loading of the first indicator of each construct is fixed to 1 (as in AMOS and lavaan).
Was this tool useful? Feedback / report a bug (by email; please do not paste real data).
How to use the tool
- Prepare the file. One row per respondent, one column per indicator, with column names made of a construct code plus a number (SQ1, SQ2, SAT1…). A file cleaned with the survey data cleaner works as it is. Enter reverse-worded items in their own box so they are reverse-scored before the analysis.
- Measurement model. The tool groups indicators into constructs by column name. Drag an item to another construct, click × to drop items you removed at the Cronbach's alpha or EFA stage, or select a few items and create a new construct. On a phone, tap an item and then tap the construct box.
- Structural model. Leave it empty for a CFA. For SEM, choose two constructs and click “Add path”, or import the arrows you drew in the Research Model Drawer. Everything appears in the lavaan-style syntax box:
SAT =~ SAT1 + SAT2 + SAT3for a construct,LOY ~ SAT + TRfor paths,SAT1 ~~ SAT2for an error covariance andHO =~ SAT + TRfor a second-order construct. - Run and read. Read the fit table first, then loadings, CR, AVE and discriminant validity, and only then the hypotheses. Download the Word file for APA tables, the path diagram and the results text; set the section, table and figure numbers to match your chapter.
What the tool computes
- Maximum likelihood (ML) on the covariance matrix with the AMOS and lavaan defaults: the first loading of each construct fixed to 1, exogenous constructs freely correlated, standard errors from the expected information matrix, listwise deletion. χ² follows lavaan (N·F) or AMOS ((N − 1)·F), as you choose.
- Fit indices: χ², df, p, CMIN/df, CFI, TLI, NFI, IFI, GFI, AGFI, RMSEA with its 90% confidence interval and PCLOSE, SRMR, AIC and BIC, each with its cut-off and source (Hu & Bentler, 1999; Browne & Cudeck, 1993; Hair et al., 2019).
- Measurement model: unstandardised and standardised loadings with S.E., C.R. and p; composite reliability (CR), AVE, MSV, √AVE, the Fornell–Larcker table and HTMT.
- Structural model: path coefficients (standardised β and raw estimates), R² for each endogenous construct and every indirect effect along each chain with delta-method (Sobel) standard errors, as lavaan's
:=parameters give. - Modification indices (MI) and expected parameter changes (EPC) for cross-loadings and error covariances, with a reminder to change the model only for substantive reasons.
- Second-order constructs and single-item constructs (loading 1, error variance 0) can both be estimated.
Worked example: three-factor CFA on the Holzinger–Swineford data
The Holzinger and Swineford (1939) data contain 301 pupils' scores on nine ability tests, with three factors: visual (x1–x3), textual (x4–x6) and speed (x7–x9). Click “Holzinger–Swineford” in step 1 to reproduce it. The results:
- Model fit: χ²(24) = 85.306, p < .001, CMIN/df = 3.554, CFI = .931, TLI = .896, RMSEA = .092 (90% CI [.071, .114]), SRMR = .065. CFI and SRMR are acceptable; TLI and RMSEA are not.
- Standardised loadings range from .424 (x2) to .855 (x5); AVE is .371 for the visual factor and .430 for speed, both below .50.
- Largest MIs: x9 cross-loading on the visual factor (MI = 36.41) and the x7–x8 error covariance (MI = 34.15), exactly as in the lavaan tutorial.
These numbers agree digit for digit with lavaan's classic output for the same model. The example also shows why fit comes first: with TLI and RMSEA short of their cut-offs and two AVEs below .50, a thesis would discuss the measurement model before interpreting any coefficient.
How to read the output
- Fit: CFI and TLI of .90 or above (.95 for good fit), RMSEA below .08 (below .06 for good fit), SRMR below .08 and CMIN/df below 3. A significant χ² is normal with a few hundred responses; do not reject the model on χ² alone.
- Standardised loadings of .50 or above (ideally .70) and significant. A negative loading is usually a reverse-worded item that has not been reverse-scored.
- CR of .70 or above and AVE of .50 or above; MSV below AVE and HTMT below .85 for discriminant validity (Henseler et al., 2015).
- Hypotheses: interpret the paths only once the measurement model is acceptable. A path with p < .05 in the expected direction supports the hypothesis.
If an index fails, check the legitimate remedies in the Results doctor before correlating errors or dropping items on the basis of MIs. The full list of cut-offs is on the acceptance thresholds page (Vietnamese).
How to report CFA and SEM results in APA 7
The tool writes the results in the usual order: fit, loadings and convergent validity, discriminant validity, hypothesis tests and indirect effects. A typical fit sentence reads: “The CFA yielded χ²(24) = 85.306, p < .001, CFI = .931, TLI = .896, RMSEA = .092 (90% CI [.071, .114]) and SRMR = .065.” State the estimator (ML), the χ² convention and the treatment of missing data in your method chapter, report every index that misses its cut-off rather than dropping it from the table, and justify any error covariance you add. Cite the tool as: Research Corner. (2026). Online CB-SEM tool [Computer software]. https://gocnghiencuu.com/en/tools/cb-sem/
How it compares with AMOS
The same ML algorithm on the same covariance matrix gives the same standardised estimates, CFI, TLI, RMSEA, SRMR and GFI as AMOS. Choose “As AMOS” for the χ² convention and χ², CMIN/df and standard errors also follow the AMOS N − 1 convention; the default follows lavaan's N, and the two differ only by the factor N/(N − 1). AMOS does not print standard errors of standardised coefficients by default; the tool computes them by the delta method, as lavaan does. The tool does not yet offer bootstrapping, full-information ML for missing data (FIML), multi-group analysis or measurement invariance testing; if your study needs those, use AMOS or lavaan. If your department requires AMOS output, check your model here first and then run AMOS with the same specification.
Verification
An automated test suite compares the estimation core with lavaan 0.7 and semTools on six models: the Holzinger–Swineford three-factor CFA under both χ² conventions, a second-order CFA, a CFA with a cross-loading and an error covariance, the ECSI structural model on the mobi data (with a single-item construct and multi-step indirect effects) and a 25-item Big Five CFA on the bfi data. Estimates, standard errors, standardised coefficients and their standard errors and indirect effects differ from lavaan by at most 3·10⁻⁵; χ², CFI, TLI, RMSEA and its interval, SRMR, GFI, AGFI, AIC and BIC by less than 10⁻⁶; HTMT matches semTools to 10⁻¹³. The comparison tables are on the verification page.
Frequently asked questions
What is the difference between CFA and SEM?
CFA tests only the measurement model, whether the indicators measure their constructs, so all constructs are allowed to correlate. SEM adds the hypothesised paths between constructs. In a thesis, the CFA comes first and the structural model follows once the measurement model is acceptable.
What sample size does CB-SEM need?
Hair et al. (2019) suggest a minimum of 100 to 150 observations for models with up to five constructs, each with three or more items and high loadings; models with seven or more constructs or low loadings need 300 to 500. Another rule of thumb is five observations per free parameter (Bentler & Chou, 1987). Work out your own figure with the sample size calculator.
Should I use CB-SEM or PLS-SEM?
CB-SEM suits theory testing and studies that need fit indices such as CFI and RMSEA; PLS-SEM suits prediction, large models, formative constructs and small samples. You can run the same data in both this tool and the PLS-SEM tool; the statistical test chooser helps if you are unsure.
Can I correlate error terms based on MIs?
Only when the two items belong to the same construct and are close in content or wording, and you state the reason in your thesis. Correlating errors across constructs, or adding cross-loadings just to push CFI above .90, is fitting the model to the data, and examiners may challenge it.
Is my data sent anywhere?
No. The file is read and the model estimated in your browser; a shared link carries only the model and settings, never the survey data.
References
- Bentler, P. M., & Chou, C.-P. (1987). Practical issues in structural modeling. Sociological Methods & Research, 16(1), 78–117. https://doi.org/10.1177/0049124187016001004
- Browne, M. W., & Cudeck, R. (1993). Alternative ways of assessing model fit. In K. A. Bollen & J. S. Long (Eds.), Testing structural equation models (pp. 136–162). Sage.
- Fornell, C., & Larcker, D. F. (1981). Evaluating structural equation models with unobservable variables and measurement error. Journal of Marketing Research, 18(1), 39–50. https://doi.org/10.1177/002224378101800104
- Hair, J. F., Black, W. C., Babin, B. J., & Anderson, R. E. (2019). Multivariate data analysis (8th ed.). Cengage Learning.
- Henseler, J., Ringle, C. M., & Sarstedt, M. (2015). A new criterion for assessing discriminant validity in variance-based structural equation modeling. Journal of the Academy of Marketing Science, 43(1), 115–135. https://doi.org/10.1007/s11747-014-0403-8
- Holzinger, K. J., & Swineford, F. (1939). A study in factor analysis: The stability of a bi-factor solution (Supplementary Educational Monographs No. 48). University of Chicago.
- Hu, L., & Bentler, P. M. (1999). Cutoff criteria for fit indexes in covariance structure analysis: Conventional criteria versus new alternatives. Structural Equation Modeling: A Multidisciplinary Journal, 6(1), 1–55. https://doi.org/10.1080/10705519909540118
- Rosseel, Y. (2012). lavaan: An R package for structural equation modeling. Journal of Statistical Software, 48(2), 1–36. https://doi.org/10.18637/jss.v048.i02
- Sobel, M. E. (1982). Asymptotic confidence intervals for indirect effects in structural equation models. Sociological Methodology, 13, 290–312. https://doi.org/10.2307/270723
One of the free research tools of Research Corner.