Structural equation
Path Analysis
Estimates directed relationships among observed variables as one system of equations and reports indirect routes alongside the direct paths.
Method summary
Path analysis estimates a set of successive regression equations as one system instead of running them separately. A variable can be a predictor in one equation and an outcome in another, so a variable reaching another both directly and through an intervening third variable is represented within the same model. No latent constructs are built: every name in the model corresponds to a data column. The model is written as text in the panel, one line per outcome together with the variables predicting it in lavaan notation, with covariance lines added where correlated errors need declaring. There is no drawing canvas; the model is built from those lines alone. The output holds an estimate with a standard error for each path, the indirect routes extracted from the model, and fit indices for the model as a whole.
Which research questions does it answer?
- How does perceived price fairness reach repurchase intention through perceived value?
- Does workload connect to burnout directly, or does it travel through time pressure?
- Is the ordered relationship between ad recall, brand attitude and purchase intention consistent with the data?
- Do service speed and complaint volume show effects on satisfaction that are independent of one another?
When should you use it?
- When more than one outcome belongs in the same model and a variable plays both the predictor and the outcome role.
- When the ordering of the relationships comes from theory; path analysis tests an ordering rather than discovering one.
- When every variable is measured with a single indicator; with multi-item scales, structural equation modelling is better suited to bringing measurement error into the model.
- When a single statement about fit is wanted in place of several successive regressions, none of which says anything about how the whole model matches the data.
Required variable types
- Every name in the model: a numerically coded data column. Responses stored as text labels must be converted to numbers first.
- Which variable is an outcome and which a predictor comes from the lines you write, not from the data structure; the same column can stand on the left in one line and on the right in another.
- One row per participant; rows missing a value on any column used in the model do not enter the analysis.
Key assumptions
- The direction of the paths comes from theory
- Which variable predicts which cannot be settled by looking at the data. Two opposite directional assumptions can fit the same dataset about equally well, so the argument about direction is a theoretical and design argument.
- Enough observations
- The more variables the model contains, the more data it needs. Standard errors and fit indices estimated from few observations mislead.
- Linear, additive relationships
- Each equation treats the influence of its predictors as linear and additive. A curved relationship or an interaction between two predictors is not represented unless you build it.
- Omitted paths really are zero
- Every path you leave out of the model text is assumed to be zero. Omitting a relationship that exists does more than spoil the fit: it shifts the estimates of the paths you did write.
- Continuous, approximately normal variables
- Estimation assumes continuous measurement; ordinal items with two or three categories and pronounced skewness can bias the estimates.
How YouReply checks these assumptions
- The direction of the paths comes from theory: The panel does not check this assumption automatically; the researcher evaluates it.
- Enough observations: The engine requires at least five observations per variable and stops short of that, stating how many valid rows it found. That floor is a technical threshold; the guidance in the literature is considerably higher.
- Linear, additive relationships: The panel does not test the form of a relationship. If you suspect curvature, examine the pairs concerned with the correlation or regression methods separately.
- Omitted paths really are zero: The fit indices show how far the model matches the data, but no modification index is produced to say which path is missing.
- Continuous, approximately normal variables: No normality check is run and no estimator choice is offered; the model is fitted with the library's default estimation method.
How the analysis is run
- 1Drop the file containing every column the model will use into the panel.
- 2On the Data tab confirm that the columns read as numeric, that reverse-coded items have been turned round and that column names carry no spaces or special characters, since you will be typing those names into the model text exactly.
- 3On the Variable tab set the measurement level of the model's columns to scale and declare your missing-value codes.
- 4Choose path analysis on the Analysis tab; the search box finds it by name.
- 5In the paths field of the parameter form write one equation per line, outcome on the left and predictors on the right. Add covariance lines in the optional field if you need to declare correlated errors. There is no canvas on which to draw a diagram; the model is built from this text only.
- 6Run the analysis. The path table, the indirect effects, the total effects and the fit indices open as separate collapsible sections.
- 7Read the list of indirect effects from top to bottom: the engine finds every route that runs through the paths you declared, and choosing which ones you meant to test is your job.
- 8No method-specific chart is drawn here; the tables export to Excel. The computation credits card names the call and version, and bear in mind that running this requires the semopy library on the server.
Statistics and tables produced
- Path table
- For every regression relationship you declared: the estimate, its standard error, a p value and a significance flag at the 0.05 level.
- Indirect effects
- The chains the engine detects among the declared paths, each with the product of the two coefficients. No standard error, p value or interval sits beside these figures.
- Total effects
- A breakdown of the whole effect running from a predictor to an outcome, split into its direct and indirect parts. The total is the arithmetic sum of the coefficients involved.
- Fit indices
- Chi-square with its degrees of freedom and p value, plus CFI, TLI, RMSEA and SRMR.
- Fit labels and an overall verdict
- Each index is labelled excellent, acceptable or poor against thresholds of 0.95 and 0.90 for CFI and TLI and 0.05 and 0.08 for RMSEA and SRMR, and the labels are summarised into an overall verdict.
- Covariance estimates
- Estimates for the lines written in the optional covariance field. Leave that field empty and the section stays empty too.
Effect size and confidence intervals
- Path coefficients
- Each coefficient says how many units the outcome moves with a one-unit rise in the predictor. Because the coefficients are unstandardised, ranking paths across differently scaled variables by magnitude misleads; if you need that comparison, convert the variables to standard scores before the analysis.
- Magnitude of an indirect effect
- The product of the two coefficients in a chain gives the share that reaches the outcome through the intervening variable. Its ratio to the total effect suggests how much of the relationship travels that route, but since the uncertainty around the product is not reported, the ratio should not be presented as a firm measure.
- Fit indices
- As CFI and TLI approach one and RMSEA and SRMR approach zero, the model is said to capture the observed pattern of relationships. These figures concern the model as a whole and say nothing about the strength of individual paths: a model built from weak paths can still fit well.
- Explained variance
- R squared is not computed per equation. To see how much of an outcome is explained, run the same equation through the linear regression method separately.
No confidence interval is returned by this method. Path coefficients come with a standard error and a p value but no interval, while the indirect and total effects have neither a standard error nor a p value, because they are not estimated parameters but figures derived arithmetically from the coefficients. No bootstrapped interval is computed for an indirect effect. If you need to test one for significance, the mediation analysis method in the catalogue reports a Sobel test.
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
- Representative example: a retail brand asks how perceived service speed and price fairness connect to repurchase intention through perceived value. The model was written as two equations, with perceived value predicted by the two antecedents and intention predicted by perceived value and service speed. There were 412 complete responses.
- Variables
- Antecedents: perceived service speed (1-7), perceived price fairness (1-7) · Intervening variable: perceived value (1-7) · Outcome: repurchase intention (1-7)
- Example result
- In the perceived value equation, service speed gave an estimate of 0.34 (SE = 0.05, p < .001) and price fairness 0.41 (SE = 0.05, p < .001). In the intention equation, perceived value gave 0.52 (SE = 0.06, p < .001) and the direct path from service speed 0.09 (SE = 0.06, p = .118). The chains detected were service speed through perceived value to intention at 0.177 and price fairness through perceived value to intention at 0.213. The total effect of service speed on intention was 0.267, of which 0.09 is direct and 0.177 indirect. Fit: chi-square(1) = 2.41, p = .120; CFI = 0.993; TLI = 0.978; RMSEA = 0.041; SRMR = 0.018, with every index labelled excellent or acceptable.
- Interpretation
- Both antecedents explain perceived value, and perceived value relates strongly to intention. The direct path from service speed to intention is not significant, while the indirect share of the same variable is about twice its direct share, which looks as though the relationship largely travels through perceived value. The hedge in that sentence is deliberate: the figure of 0.177 carries no standard error and no p value, and the significance of the product is not tested in this output. The total of 0.267 is likewise a sum of two numbers rather than an estimated parameter. The fit indices say the model agrees with the observed pattern of relationships, which is not evidence that any single path is specified correctly. With cross-sectional data the direction of the paths rests on theory, and another ordering could fit about as well.
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.
General customer survey (synthetic)
A wide survey of three hundred respondents: two and three category grouping variables, continuous measures, a five point ordinal scale, a binary purchase outcome, a four category brand choice, three repeated measurements, paired binary questions, three raters, four price questions and deliberately empty cells.
- Rows
- 300
- Columns
- respondent_id, gender, education, region, age, income, satisfaction, service_score, price_score, quality_score, loyalty, nps_score, purchased, brand_choice, satisfaction_level, pre_score, post_score, measure_1, measure_2, measure_3, use_before, use_after, use_followup, rater_1, rater_2, rater_3, price_too_cheap, price_cheap, price_expensive, price_too_expensive, feedback_score, followup_rating
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: Do service and price perception feed satisfaction, and do satisfaction and quality perception in turn feed loyalty?
- Path equations
- satisfaction ~ service_score + price_score,loyalty ~ satisfaction + quality_score
- Valid observations
- 300
- Number of paths
- 4
- Model specification (measurement model)
- satisfaction ~ service_score + price_score loyalty ~ satisfaction + quality_score
Path coefficients
| Row | service_score | price_score |
|---|---|---|
| satisfaction | - | - |
| loyalty | - | - |
Indirect effects
| Row | a path (X to the mediator) | b path (mediator to Y) | Indirect effect |
|---|---|---|---|
| service_score -> satisfaction -> loyalty | 0.465 | 0.207 | 0.096 |
| price_score -> satisfaction -> loyalty | 0.155 | 0.207 | 0.032 |
Total effects
| Row | service_score | price_score |
|---|---|---|
| satisfaction | - | - |
| loyalty | - | - |
Fit indices
- Chi-square
- 4.02
- Chi-square degrees of freedom
- 9
- Chi-square p value
- 0.910
- Comparative fit index (CFI)
- 1.04
- Tucker-Lewis index (TLI)
- 1.06
- Root mean square error of approximation (RMSEA)
- 0
- Standardized root mean square residual (SRMR)
- -
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: 20260914
How to report the result
The path model was consistent with the data, chi-square(1) = 2.41, p = .120, CFI = .993, RMSEA = .041, SRMR = .018; service speed (estimate = 0.34, SE = 0.05, p < .001) and price fairness (estimate = 0.41, SE = 0.05, p < .001) predicted perceived value, which in turn predicted repurchase intention (estimate = 0.52, SE = 0.06, p < .001), while the direct path from service speed was not significant (estimate = 0.09, p = .118) and the indirect share computed as the product of coefficients was 0.177.
An example sentence close to APA style; the numbers are representative.
When you should not use it
- No standard error, p value or confidence interval is returned for the indirect and total effects; those figures are arithmetic results derived from the coefficients rather than estimates, and they cannot support a claim of significance.
- Chain detection is mechanical: the engine lists every route running through the declared paths, including ones you never intended to test theoretically, and reporting those turns into generating hypotheses from the data.
- R squared is not computed per equation, so this output cannot tell you how much of an outcome is explained.
- AIC and BIC are not returned for this method, so two competing path models cannot be compared on information criteria.
- There is no estimator choice and measurement error stays outside the model: fitting with the library default biases estimates for ordinal items with few categories and attenuates path coefficients for variables measured with a single item.
- No path diagram and no method-specific chart is produced, so a visual rendering of the model is something you have to prepare yourself.
What to use when the assumptions are not met
- Structural Equation Modeling (SEM)Why: When the variables are measured with multi-item scales; latent constructs are built and measurement error stays inside the model.
- Mediation AnalysisWhy: When the question narrows to the role of one intervening variable; that method also reports a Sobel test for the indirect effect.
- Linear Regression (OLS)Why: When there is only one outcome; it gives explained variance and coefficient intervals in more detail.
- Confirmatory Factor Analysis (CFA)Why: When the structure of the scales needs confirming first; the measurement side is tested before any path model.
Frequently asked questions
- When is path analysis better than running several regressions separately?
- When the model holds more than one outcome and a variable serves as a predictor in one equation and an outcome in another, path analysis estimates that structure in one pass, whereas separate regressions build each equation in ignorance of the others. Two practical gains follow. First, the fit of the whole model becomes a question you can ask: separate regressions never tell you whether the paths you omitted are really near zero, and the fit indices do. Second, the indirect routes are listed in the same output and the total effect arrives split into direct and indirect parts, a breakdown you would otherwise assemble by multiplying coefficients by hand. Where you have a single outcome and care about explained variance and coefficient intervals, regression gives the richer output.
- There are rows in the indirect effects list I did not expect. Why?
- Chain detection is mechanical. The engine looks at the paths you wrote and finds every route from one variable to another, without knowing which of those routes you meant to test. Chains that play no part in your hypothesis therefore appear, simply because the structure of the model makes them mathematically present. The remedy is to settle in writing, before the analysis, which indirect route you are testing, and to report that one. Picking the largest value from the list and presenting it as a finding is a familiar way of deriving hypotheses from data, and it lowers the odds of the finding replicating.
- Can I say the indirect effect is significant?
- Not on the basis of this output. The indirect effect appears as the product of two coefficients with no standard error, p value or interval beside it, and the total effect is similarly an arithmetic sum. Because the distribution of such a product is not symmetric, trying to judge significance yourself is unreliable too. Both constituent paths being significant is a supportive sign for the route but not a test of it. If you are going to make a mediation claim, the mediation analysis method in the catalogue at least supplies a Sobel test, and stronger evidence calls for a bootstrapped interval, which the panel does not compute.
- The fit indices look good. Is the model correct?
- Good fit says your model is consistent with the observed pattern of relationships, not that it is the only model that would be. A version with the directions reversed can fit the same data about as well, because cross-sectional measurement carries no information about direction. Fit also concerns the model as a whole: a model whose every path is weak can still fit well, so read the indices alongside the magnitude of the coefficients. When fit is poor, the absence of modification indices in the output means locating the missing path takes extra work, and every change you make in the same dataset has to be declared in the write-up.
References
- Kline, R. B. (2015). Principles and Practice of Structural Equation Modeling
- Field, A. (2018). Discovering Statistics Using IBM SPSS Statistics
- Tabachnick, B. G., & Fidell, L. S. (2019). Using Multivariate Statistics
- semopy documentation
Try it with your own data
The free plan includes 50 analysis runs a month and needs no card.