Structural equation
Structural Equation Modeling (SEM)
Estimates measurement relationships and directed paths between latent and observed variables within one model.
Method summary
Structural equation modelling translates the theoretical diagram of a study into a single system of equations: which items measure which latent construct, which construct predicts which other, and which variables covary are all estimated at once. Measurement error stays inside the model, so the paths are defined between constructs corrected for that error. In the panel you write the model yourself: measurement lines put the latent construct on the left and its indicators on the right, path lines put the outcome on the left and its predictors on the right, and covariance lines declare correlated errors. The result gives an estimate, a standard error, a z value and a p value for every parameter, together with fit indices for the model as a whole.
Which research questions does it answer?
- Does perceived service quality predict loyalty through satisfaction?
- What part does organisational support play in the relationship between workload and burnout?
- Do the perceived usefulness and ease of use paths of the technology acceptance model hold in this sample?
- Does the relationship between brand trust and purchase intention survive once measurement error is accounted for?
When should you use it?
- When directed relationships between several constructs are tested simultaneously.
- When variables are measured with multi-item scales and measurement error should enter the model.
- When a theoretical model is specified in advance and its fit to the data is the question.
- When a measurement model confirmed through CFA is extended with a structural part.
Required variable types
- Indicators and observed variables: numerically coded columns; responses stored as labels must be converted to numbers first.
- Latent constructs: not data columns, they are declared through measurement lines in the model text.
- One row per participant; rows with missing values are left out of the analysis.
Key assumptions
- A theoretically specified model
- The direction of the paths and the measurement structure come from theory rather than from the data. Searching for a model in the same dataset removes the confirmatory character of the result.
- Model identification
- The number of free parameters must not exceed the observed covariances, otherwise estimation fails to converge or returns meaningless values.
- Adequate sample size
- Common guidance suggests ten observations per parameter or at least two hundred participants. In small samples standard errors and fit indices become unreliable.
- Continuous, approximately normal indicators
- Estimation assumes continuously measured indicators; marked skewness and ordinal items with few categories can bias the estimates.
How YouReply checks these assumptions
- A theoretically specified model: The panel does not check this assumption automatically; the researcher evaluates it.
- Model identification: The engine parses the variables in the model text and stops with a list of names that are missing from the data; when estimation fails it reports the error directly.
- Adequate sample size: The engine requires a minimum number of valid rows relative to the number of variables in the model and states how many valid rows it found when the data falls short.
- Continuous, approximately normal indicators: The panel runs no normality check and offers no choice of estimator, so judging the distributions is left to the researcher.
How the analysis is run
- 1Upload the data file with the indicators and observed variables.
- 2On the Variable tab confirm the columns are read as numeric and that reverse-coded items have been corrected.
- 3On the Analysis tab choose Structural Equation Modeling.
- 4Type the measurement lines, the path lines and, where needed, the covariance lines into the model field of the parameter form.
- 5Run the analysis. The parameter table, fit indices, loadings, paths and covariances open as separate sections.
- 6Interpret the estimates together with their standard errors rather than relying on significance stars, then download the results as Excel.
Statistics and tables produced
- Parameter table
- Each row is one relationship: left side, operator, right side, estimate, standard error, z value, p value and a significance marker.
- Fit indices
- Chi-square with degrees of freedom and p value, plus CFI, TLI, RMSEA, SRMR, AIC and BIC.
- Fit interpretation
- The indices are labelled against thresholds: 0.95 excellent and 0.90 acceptable for CFI and TLI; 0.05 excellent and 0.08 acceptable for RMSEA and SRMR.
- Measurement loadings
- Estimates between each latent construct and its indicators, extracted from the measurement lines of the model.
- Structural paths
- Estimates for the relationships running from predictors to outcomes; the directed relationships are interpreted from this table.
- Covariances
- Estimates for the correlated errors or construct covariances declared in the model text.
Effect size and confidence intervals
- Path estimates
- Each path expresses how much change in the outcome is associated with a one-unit change in the predictor. Because the estimates are unstandardised, comparing paths across differently scaled variables is misleading; standardise them separately if a comparison is needed.
- Explained variance
- The panel does not compute R squared for endogenous variables. Judging how much the model explains relies on the fit indices and on the magnitude of the path estimates.
Standard errors, z values and p values are given for the parameters, but no confidence intervals are returned. Bootstrapped intervals for indirect effects are not computed either; if you need to test mediation, the catalogue offers a separate mediation analysis method.
Example research question and example result
The numbers below are a representative example, not data from a real study or a real user.
- Research question
- Does perceived service quality predict loyalty through customer satisfaction?
- Variables
- Latent construct: service quality (four indicators) · Latent construct: satisfaction (three indicators) · Latent construct: loyalty (three indicators)
- Example result
- n = 386. Service quality to satisfaction: estimate 0.62 (SE = 0.07, z = 8.86, p < 0.001); satisfaction to loyalty: estimate 0.48 (SE = 0.08, z = 6.00, p < 0.001); the direct path from service quality to loyalty: estimate 0.11 (SE = 0.07, z = 1.57, p = 0.116). Fit: chi-square(32) = 71.2, p < 0.001; CFI = 0.961; TLI = 0.945; RMSEA = 0.056; SRMR = 0.044.
- Interpretation
- Two paths are significant while the direct path is not, a pattern suggesting the relationship largely runs through satisfaction. The indirect effect itself is not tested by this method, so a mediation claim needs a separate analysis. With cross-sectional data the direction of the paths rests on theory rather than on evidence.
Real output on a sample dataset
The results below were produced by the analysis engine from this data file. Changing the variable changes the research question as well; every run was computed in advance, so the page sends no request to the engine.
Scale development data (synthetic)
A twenty item five point Likert scale answered by three hundred people. The items come from two latent constructs: the first ten measure one construct, the last ten the other, and the two are moderately correlated. The factor and reliability methods run on this file.
- Rows
- 300
- Columns
- respondent_id, item_1, item_2, item_3, item_4, item_5, item_6, item_7, item_8, item_9, item_10, item_11, item_12, item_13, item_14, item_15, item_16, item_17, item_18, item_19, item_20
The data is synthetic: it comes from a fixed random seed, not from a real study. The values below were produced by the analysis engine from this file, so uploading the same file to the panel gives the same results.
Research question: Does the first latent construct predict the second, and is the measurement model solid enough to carry that path?
- Model specification (SEM syntax)
- Yapi1 =~ item_1 + item_2 + item_3 + item_4 Yapi2 =~ item_11 + item_12 + item_13 + item_14 Yapi2 ~ Yapi1
- Covariances
- -
- Valid observations
- 300
- Number of parameters
- 19
- Estimator
- MLW
- Model specification (measurement model)
- Yapi1 =~ item_1 + item_2 + item_3 + item_4 Yapi2 =~ item_11 + item_12 + item_13 + item_14 Yapi2 ~ Yapi1
Estimated parameters
| Left side of the equation | Operator (~ regression, ~~ covariance) | Right side of the equation | Estimate | Standard error | z statistic | p value | Significance stars |
|---|---|---|---|---|---|---|---|
| Yapi2 | ~ | Yapi1 | 0.080 | 0.060 | 1.33 | 0.184 | |
| item_1 | ~ | Yapi1 | 1 | - | - | - | |
| item_2 | ~ | Yapi1 | 0.868 | 0.109 | 7.96 | < 0.001 | *** |
| item_3 | ~ | Yapi1 | 0.987 | 0.114 | 8.62 | 0 | *** |
| item_4 | ~ | Yapi1 | 1.06 | 0.122 | 8.69 | 0 | *** |
| item_11 | ~ | Yapi2 | 1 | - | - | - | |
| item_12 | ~ | Yapi2 | 1.07 | 0.161 | 6.63 | < 0.001 | *** |
| item_13 | ~ | Yapi2 | 1.32 | 0.190 | 6.94 | < 0.001 | *** |
| item_14 | ~ | Yapi2 | 1.17 | 0.178 | 6.58 | < 0.001 | *** |
| Yapi1 | ~~ | Yapi1 | 0.441 | 0.080 | 5.51 | < 0.001 | *** |
| Yapi2 | ~~ | Yapi2 | 0.248 | 0.057 | 4.34 | < 0.001 | *** |
| item_1 | ~~ | item_1 | 0.569 | 0.063 | 9.10 | 0 | *** |
| item_11 | ~~ | item_11 | 0.540 | 0.055 | 9.79 | 0 | *** |
| item_12 | ~~ | item_12 | 0.531 | 0.057 | 9.38 | 0 | *** |
| item_13 | ~~ | item_13 | 0.478 | 0.065 | 7.40 | < 0.001 | *** |
| item_14 | ~~ | item_14 | 0.672 | 0.071 | 9.53 | 0 | *** |
| item_2 | ~~ | item_2 | 0.591 | 0.059 | 9.99 | 0 | *** |
| item_3 | ~~ | item_3 | 0.490 | 0.056 | 8.67 | 0 | *** |
| item_4 | ~~ | item_4 | 0.524 | 0.062 | 8.40 | 0 | *** |
Fit indices
- Chi-square
- 10.31
- Chi-square degrees of freedom
- 19
- Chi-square p value
- 0.945
- Comparative fit index (CFI)
- 1.02
- Tucker-Lewis index (TLI)
- 1.03
- Root mean square error of approximation (RMSEA)
- 0
- Standardized root mean square residual (SRMR)
- -
- Akaike information criterion (AIC)
- 33.93
- Bayesian information criterion (BIC)
- 96.90
Factor loadings
| Row | item_1 | item_2 | item_3 | item_4 |
|---|---|---|---|---|
| Yapi1 | 1 | 0.868 | 0.987 | 1.06 |
| Yapi2 | - | - | - | - |
Regression paths
| Row | Yapi1 |
|---|---|
| Yapi2 | 0.080 |
Computation credits: scipy 1.18.0 · statsmodels 0.14.6 · scikit-learn 1.9.0 · numpy 2.5.1 · pandas 3.0.5 · semopy 2.3.11 · 89fc29a · Data seed: 20260915
How to report the result
Service quality predicted satisfaction (estimate = 0.62, SE = 0.07, p < .001) and satisfaction predicted loyalty (estimate = 0.48, SE = 0.08, p < .001), while the direct path was not significant (estimate = 0.11, p = .116); the model fit acceptably, chi-square(32) = 71.2, CFI = .961, RMSEA = .056, SRMR = .044.
An example sentence close to APA style; the numbers are representative.
When you should not use it
- A model built on cross-sectional data does not establish causation; the direction of the paths comes from theory.
- In small samples standard errors and fit indices are unreliable, and complex models demand still more data.
- Because the panel returns no standardised estimates, comparing paths across differently scaled variables misleads.
- No R squared is computed for endogenous variables, so explanatory power rests on the fit indices and path magnitudes alone.
- Without modification indices, locating the source of poor fit takes extra work, and revising the model against the data weakens the confirmatory claim.
- Estimates can be biased with ordinal indicators that have few categories, and no estimator choice is available in the panel.
What to use when the assumptions are not met
- Confirmatory Factor Analysis (CFA)Why: When only the measurement structure is tested and no paths between constructs are defined.
- Path AnalysisWhy: When every variable is a single observed measure; a path model is estimated without latent constructs.
- Mediation AnalysisWhy: When the real question is the role of a single mediator; that method tests the indirect effect directly.
- Linear Regression (OLS)Why: When there is one outcome and observed predictors; a simpler model with a more direct interpretation.
Frequently asked questions
- How do I write the model text?
- Measurement lines tie a latent construct to its indicators, path lines tie an outcome to its predictors, and covariance lines declare correlated errors or constructs. Variable names must match the data columns exactly; the engine stops and lists any name it cannot find.
- Can I choose the estimator?
- No. Even though the parameter form shows an estimator field, the model is always fitted with a single estimation method and the choice has no effect on the result. A design that requires a different estimator needs another tool.
- Can I test mediation with this method?
- You see the paths, but the indirect effect and its significance are not computed in this output. The catalogue includes a separate mediation analysis method for that purpose.
- What if the fit is poor, can I modify the model?
- You can, but every change made in the same dataset weakens the confirmatory claim and has to be reported. Since the panel produces no modification indices, any revision should rest on theory and ideally be tested in a new sample.
References
- Kline, R. B. (2015). Principles and Practice of Structural Equation Modeling
- Hu, L., & Bentler, P. M. (1999). Cutoff Criteria for Fit Indexes in Covariance Structure Analysis
- Hair, J. F., Black, W. C., Babin, B. J., & Anderson, R. E. (2019). Multivariate Data Analysis
- semopy documentation
Try it with your own data
The free plan includes 50 analysis runs a month and needs no card.