Independent calculations

Interaction terms checked after missing-value replacement

An interaction term combines variables to represent a relationship that changes with another variable. This comparison checks how QuickPLS replaces missing values, centres and scales the source variables, and then forms the term. The order matters: multiplying first and filling in missing products later can give a different answer.

Reviewed 14 November 2026
4.33e-15Largest difference in the two-way interaction comparison

What the comparison shows

The detailed test checks two-way interaction preparation and model refits. A separate record summarises selected conditional-process checks, where effects depend on other variables. Neither record establishes a complete external comparison for every grouped, weighted, higher-order or three-way model. Use the method-coverage page to find which combinations have their own checks.

Why does the order of preparation matter?

Mean replacement fills a missing value with the specified mean. Centring subtracts a mean, and scaling changes the units used for the calculation. When these prepared variables are multiplied to make an interaction, the result depends on doing those operations in the intended order.

The reference follows the same replacement, centring and scaling steps before forming the interaction. A conditional-process model can rely on this comparison only for the preparation and effect definitions that actually match. Agreement on a generated term does not by itself check all later effect estimates or uncertainty measures.

Which reference calculations were used?

The first record uses the listed cSEM and Python-library versions to check the saved generated-term calculation. The second records earlier conditional-process work. Their results are kept separate because the detailed comparison and the broader summary do not test the same set of outputs.

On a small screen, swipe the table sideways to see every column.

RecordQuickPLS build or result checkedReferenceComparison outcome
Generated two-way mean replacementSaved checks of mean replacement for missing values and refitting models with generated terms.cSEM 0.6.1, statsmodels 0.14.4, NumPy 1.26.4, SciPy 1.15.2Passed the comparisons documented for this record
Conditional process evidenceEvidence carried forward from 1.01.18/1.01.19See which mathematical and app-workflow checks were performedChecks of specified workflows or evidence from earlier versions; no full external comparison

Two-way interactions from the same missing-data example

The test uses a 24-row synthetic source. It includes 29 original or resampled datasets with available results and 2 all-missing samples without results. The comparison follows 15 named result targets and 18 probe predictions, which evaluate the fitted model at specified input values.

In the saved review, separate cSEM calculations supplied the first-stage model estimates, and statsmodels supplied the joint two-way regression. The comparison checks prepared inputs, generated terms and the listed model outputs. The unavailable samples test whether an unusable input is reported as unavailable instead of producing an answer.

  • The comparison excludes 145 fields used to report calculation progress. Those fields are not counted as checked scientific results.
  • The named two-way point effects and simple slopes are included. These checks do not establish three-way interactions, higher-order models, complete conditional-process analyses or inference summaries. A higher-order construct combines lower-level constructs into a broader concept and needs its own matching test.
What was checkedValue / scope
Compared numbers and missing-value statuses30849
Outside the stated tolerance0
Different scenario names in the comparison record31
Largest absolute difference4.32986979603811e-15

Joint-model coefficients, interaction effects and simple slopes

These are the fifteen checked targets for the original 24-row example. The joint model predicts Y from X, Z and W and includes both X × Z and X × W. Original missing indicators are replaced before the construct scores and interaction products are formed. Attached case and frequency weights are not used in this comparison.

The standardised-product coefficient uses the rescaled product as a predictor. The raw-product interaction coefficient divides that coefficient by the product’s sample standard deviation. This distinction matters when deriving the slope of X at a given moderator score. For X × W, the two coefficients are 0.17985898828899546 and 0.16478081967306876, respectively.

With Z held at zero, the X → Y point slope is 0.989180815626047 at W=-1 and 1.3187424549721845 at W=1. The table also shows the corresponding Z-moderated slopes with W held at zero. These are checked point calculations, not confidence intervals or a test of the difference between two slopes.

cSEM supplied the first-stage weights; statsmodels supplied the joint regression. Independent arithmetic checked the product scaling, slopes and predictions. Values are displayed to 15 significant digits, while differences use the saved numbers before that display rounding.

On a small screen, swipe the table sideways to see every column.

ResultQuickPLSReferenceAbsolute differenceComparison result
Joint model: intercept for Y-4.16333634234434e-171.21430643318376e-175.3776427755281e-17Pass
Joint model: W → Y-0.149283593321751-0.1492835933217523.33066907387547e-16Pass
Joint model: X → Y1.153961635299121.153961635299122.22044604925031e-16Pass
Joint model: Z → Y0.151904090905390.1519040909053917.49400541621981e-16Pass
Joint model: R² for Y0.8333232847615210.8333232847615210Pass
X × W: raw-product interaction coefficient0.1647808196730690.1647808196730682.77555756156289e-16Pass
X × Z: raw-product interaction coefficient-0.196471541179649-0.196471541179652.22044604925031e-16Pass
X → Y slope at W=-1, Z=00.9891808156260470.9891808156260471.11022302462516e-16Pass
X → Y slope at W=0, Z=01.153961635299121.153961635299122.22044604925031e-16Pass
X → Y slope at W=1, Z=01.318742454972181.318742454972184.44089209850063e-16Pass
X → Y slope at Z=-1, W=01.350433176478771.350433176478770Pass
X → Y slope at Z=0, W=01.153961635299121.153961635299122.22044604925031e-16Pass
X → Y slope at Z=1, W=00.9574900941194670.9574900941194664.44089209850063e-16Pass
X × W: standardised-product coefficient0.1798589882889950.1798589882889953.33066907387547e-16Pass
X × Z: standardised-product coefficient-0.243498599606482-0.2434985996064822.22044604925031e-16Pass
First-stage loadings from the original comparison

These loadings describe the constructs before interaction formation. They remain part of the supporting comparison, alongside the final interaction results above.

On a small screen, swipe the table sideways to see every column.

Quantity comparedQuickPLSReferenceAbsolute differenceComparison result
First-stage loading: w in W
Result identifierstage_one/outer_loadings/W/w
112.22044604925031e-16Pass
First-stage loading: x1 in X
Result identifierstage_one/outer_loadings/X/x1
0.9834765169729050.9834765169729052.22044604925031e-16Pass
First-stage loading: x2 in X
Result identifierstage_one/outer_loadings/X/x2
0.9855456334876090.9855456334876083.33066907387547e-16Pass
First-stage loading: y1 in Y
Result identifierstage_one/outer_loadings/Y/y1
0.984564636762410.984564636762411.11022302462516e-16Pass
First-stage loading: y2 in Y
Result identifierstage_one/outer_loadings/Y/y2
0.9839906282454170.9839906282454171.11022302462516e-16Pass
First-stage loading: z1 in Z
Result identifierstage_one/outer_loadings/Z/z1
0.9752591590357570.9752591590357571.11022302462516e-16Pass

Replacement means, product scaling and fixed predictions

The seven replacement means below come from the observed original indicators in this point sample. Each product then has its own mean and sample standard deviation, computed from the resulting first-stage scores. These values establish the preparation order behind the interaction coefficients.

The optional prediction table evaluates the saved joint equation at fixed X and moderator scores. It holds the other moderator at zero and retains both product-centering offsets. These are calculations at specified inputs, not held-out prediction accuracy.

On a small screen, swipe the table sideways to see every column.

ResultQuickPLSReferenceAbsolute differenceComparison result
w: mean used for missing-value replacement0.04696213391430.04696213391430Pass
x1: mean used for missing-value replacement-0.367121958996-0.3671219589965.55111512312578e-17Pass
x2: mean used for missing-value replacement-0.3808639391266-0.38086393912660Pass
y1: mean used for missing-value replacement-0.357575722076905-0.3575757220769055.55111512312578e-17Pass
y2: mean used for missing-value replacement-0.323321884564286-0.3233218845642865.55111512312578e-17Pass
z1: mean used for missing-value replacement0.169250559229450.169250559229452.77555756156289e-17Pass
z2: mean used for missing-value replacement0.10220238487130.10220238487130Pass
X × W: product mean-0.198558913192375-0.1985589131923751.11022302462516e-16Pass
X × W: product sample standard deviation1.091504391383911.091504391383912.22044604925031e-16Pass
X × Z: product mean0.2819020112350990.2819020112350995.55111512312578e-17Pass
X × Z: product sample standard deviation1.23935811845561.23935811845562.22044604925031e-16Pass
All eighteen checked fixed-input predictions

On a small screen, swipe the table sideways to see every column.

ResultQuickPLSReferenceAbsolute differenceComparison result
Predicted Y at X=-1, W=-1, Z=0-0.75179279922606-0.751792799226060Pass
Predicted Y at X=0, W=-1, Z=00.2373880163999870.2373880163999873.05311331771918e-16Pass
Predicted Y at X=1, W=-1, Z=01.226568832026031.226568832026032.22044604925031e-16Pass
Predicted Y at X=-1, W=0, Z=0-1.06585721222088-1.065857212220880Pass
Predicted Y at X=0, W=0, Z=00.08810442307823580.08810442307823581.38777878078145e-17Pass
Predicted Y at X=1, W=0, Z=01.242066058377351.242066058377354.44089209850063e-16Pass
Predicted Y at X=-1, W=1, Z=0-1.3799216252157-1.37992162521572.22044604925031e-16Pass
Predicted Y at X=0, W=1, Z=0-0.0611791702435155-0.06117917024351583.53883589099269e-16Pass
Predicted Y at X=1, W=1, Z=01.257563284728671.257563284728678.88178419700125e-16Pass
Predicted Y at X=-1, Z=-1, W=0-1.41423284430592-1.414232844305926.66133814775094e-16Pass
Predicted Y at X=0, Z=-1, W=0-0.0637996678271545-0.06379966782715537.63278329429795e-16Pass
Predicted Y at X=1, Z=-1, W=01.286633508651611.286633508651618.88178419700125e-16Pass
Predicted Y at X=-1, Z=0, W=0-1.06585721222088-1.065857212220880Pass
Predicted Y at X=0, Z=0, W=00.08810442307823580.08810442307823581.38777878078145e-17Pass
Predicted Y at X=1, Z=0, W=01.242066058377351.242066058377354.44089209850063e-16Pass
Predicted Y at X=-1, Z=1, W=0-0.71748158013584-0.7174815801358391.11022302462516e-15Pass
Predicted Y at X=0, Z=1, W=00.2400085139836260.2400085139836277.49400541621981e-16Pass
Predicted Y at X=1, Z=1, W=01.197498608103091.197498608103092.22044604925031e-16Pass

The separate conditional-process checks

This record concerns mean replacement in the identified source version and simulation checks for specific conditional-process settings. Such models allow an effect to depend on a moderator, a variable that changes the relationship being studied. The record summarises that earlier work; it is not another complete external comparison of the generated-term example above.

  • Weighted analyses, groups, higher-order constructs (HOC) and confidence intervals need separately identified tests. This record does not establish numerical agreement for the Store app.

The error limits for generated terms and model outputs

abs(native - aligned_reference) <= absolute_tolerance + relative_tolerance * abs(aligned_reference)

The formula compares QuickPLS with the reference after the definitions have been matched. It allows a fixed difference plus a difference proportional to the reference value. Different output types use the different limits shown below; some must match exactly. Unavailable results must occur in the same positions, rather than being replaced with numerical answers.

On a small screen, swipe the table sideways to see every column.

Absolute toleranceRelative toleranceNumeric or missing-value checksWhere the comparison rule was specified
1e-121e-126542Specified separately for each compared value
004854Specified separately for each compared value
1e-081e-0819453Specified separately for each compared value

What this comparison supports

The detailed result supports the checked preparation order and two-way calculations for the stated original and resampled inputs. The two unavailable samples are part of the check: correct handling means reporting that a result is unavailable, not forcing every sample to return an estimate.

Many compared values come from the same source dataset and its resamples. Their count is not a count of independent studies. Keep the selected conditional-process summary separate when deciding whether a more complex model has a matching comparison.

  • Read the output-specific error limits with the comparison values. Exact checks, decimal results and unavailable-result positions have different rules; a rounded table cannot show every small difference.

How to inspect the generated-term comparison

The JSON report records versions, settings and the compared samples. The CSV lets you inspect the available numerical results. Start with the source-variable preparation, then follow the first-stage estimates, generated terms and later outputs so that the order of operations remains clear.

A rerun requires the original dataset and the same missing-data rules, model, settings and software versions. These files document completed tests; the original dataset and app source code are not included.

Download the comparison results

See the values we checked, the differences we found and the software versions used. The download also identifies the original test files.

About these tests

These are QuickPLS development comparisons. Each record identifies the reference software or mathematical calculation, the tested build and the settings used.

How to understand these comparisons · Find checks for another method