Software comparison

Regression: compare estimates and uncertainty with statsmodels

Linear regression models a numeric outcome. Binary logistic regression models the probability of an outcome with two categories. These tests compare QuickPLS with statsmodels, an independent Python package, using matching predictors, outcome coding, intercept choices and standard-error calculations.

Reviewed 14 November 2026
3.68e-11Largest difference in the first comparison

What the comparison shows

The checked outputs agree with statsmodels under the stated settings. They come from the earlier test program listed below. The logistic examples use two-sided, greater and less test alternatives; the greater case omits the intercept. They do not test every mode of the current Store app; separation, weighting, bootstrapping and other diagnostic settings need their own evidence.

Match the regression and its uncertainty calculation

The response is the outcome being modelled; predictors are the variables used to explain it. The programs must use the same coding and predictor order. They must also agree on whether to include an intercept, the model’s baseline term.

Standard errors describe the uncertainty of estimated coefficients. HC3 is an adjustment that allows unequal error variance, meaning the spread of residual errors can differ across observations. An HC3 result should be compared with the same adjustment in the reference.

For logistic regression, check which outcome category is treated as the event. Reversing that choice changes the coefficient interpretation. The likelihood, the expression used to fit the observed responses, must also describe the same model.

Which software produced these results?

Both comparisons used the earlier program for testing QuickPLS calculations and the statsmodels versions listed below. They checked the calculation code directly, not the current Microsoft Store application.

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

RecordQuickPLS build or result checkedReferenceComparison outcome
OLS HC3/regression-IPMA1.1.8 test executablestatsmodels 0.14.4Passed the comparisons documented for this record
Logistic regression directions1.1.8 test executablestatsmodels 0.14.4Passed the comparisons documented for this record

Check linear regression, HC3 uncertainty and regression IPMA

The test covers ordinary least squares (OLS), which minimises the squared differences between observed and fitted outcomes. It uses HC3 standard errors and also checks importance-performance analysis (IPMA) based on regression. IPMA considers a predictor’s estimated importance alongside its performance level.

  • The calculations used the historical 1.1.8 test executable, not the installed 1.01.19 release or the Store app.
  • The comparison aligns the constants used in AIC/BIC, model-comparison statistics that account for fit and complexity.
What was checkedValue / scope
Compared numbers and missing-value statuses139
Outside the stated tolerance0
Different scenario names in the comparison record1
Largest absolute difference3.68345354218036e-11

Linear regression coefficients and HC3 uncertainty

The outcome is y, with x and m specified as predictors and z as a control. The table includes every coefficient in this test model, with its HC3 standard error, test statistic, two-sided p-value and 95% confidence limits.

The x coefficient is 1.5454545454544162: conditional on m and z, a one-unit difference in x corresponds to that difference in fitted y under this model. Its recorded interval runs from 1.1497707190770767 to 1.9411383718317556. The z interval spans zero. Numerical agreement is checked for both kinds of result, regardless of statistical significance.

The saved values are shown to 15 significant digits. Differences use the original numbers before display rounding. The 139-check record also includes model-fit, regression-IPMA and input or missing-value checks; it is not a count of 139 coefficients.

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

ResultQuickPLSstatsmodelsAbsolute differenceComparison result
intercept: coefficient-0.0234848484847738-0.0234848484848649.01501095995627e-14Pass
intercept: standard error0.2856811807843850.2856811807845081.23345778035855e-13Pass
intercept: test statistic-0.0822064947375683-0.08220649473784842.80067635749504e-13Pass
intercept: two-sided p-value0.9365021064036820.9365021064034682.13828954542805e-13Pass
intercept: coefficient interval: lower-0.682266832723575-0.6822668327239493.73145958576515e-13Pass
intercept: coefficient interval: upper0.6352971357540280.6352971357542211.9284573937739e-13Pass
x: coefficient1.545454545454421.545454545454551.29674049276218e-13Pass
x: standard error0.1715885155350370.1715885155350673.03090885722668e-14Pass
x: test statistic9.006748153484969.006748153484138.34887714518118e-13Pass
x: two-sided p-value1.84293473752817e-051.84293473753632e-058.15116745801758e-17Pass
x: coefficient interval: lower1.149770719077081.149770719077146.06181771445335e-14Pass
x: coefficient interval: upper1.941138371831761.941138371831951.98729921407903e-13Pass
m: coefficient0.80454545454550.804545454545464.04121180963557e-14Pass
m: standard error0.3470912079138790.3470912079139183.86912724081867e-14Pass
m: test statistic2.317965526643722.317965526643353.74811293113453e-13Pass
m: two-sided p-value0.0490750421282280.04907504212825622.81719092498633e-14Pass
m: coefficient interval: lower0.004151693803084560.004151693802956551.28008714739281e-13Pass
m: coefficient interval: upper1.604939215287921.604939215287964.70734562441066e-14Pass
z: coefficient0.07272727272727050.07272727272727544.88498130835069e-15Pass
z: standard error0.121866759354880.1218667593549375.70099523145018e-14Pass
z: test statistic0.5967769481379780.5967769481377392.39142039504259e-13Pass
z: two-sided p-value0.5671569665489860.5671569665491411.55431223447522e-13Pass
z: coefficient interval: lower-0.208297978289014-0.208297978289141.25954802143724e-13Pass
z: coefficient interval: upper0.3537525237435550.3537525237436911.35724764760425e-13Pass
OLS model fit and comparison statistics

These are fitted-sample measures from the same regression. R² and adjusted R² differ in their adjustment for model complexity. The historical comparison aligned AIC/BIC constants before assessing agreement; these values should not be compared with a package using a different convention without the same adjustment.

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

ResultQuickPLSstatsmodelsAbsolute differenceComparison result
Adjusted R²0.9988514954410910.9988514954410910Pass
AIC-31.2424281617763-31.24242816177631.06581410364015e-14Pass
BIC-29.3028015626243-29.30280156262437.105427357601e-15Pass
F statistic3189.890679514913189.890679514873.68345354218036e-11Pass
R²0.9991647239571570.9991647239571570Pass
Root mean squared error0.1949326483012460.1949326483012461.11022302462516e-16Pass

Regression importance and performance

This is regression IPMA from the OLS test model, separate from the construct-based historical IPMA example. Importance is the corresponding unstandardised regression coefficient. Performance uses the configured ranges: 0 to 15 for x, 0 to 8 for m and 0 to 2 for z.

For x, importance is 1.5454545454544162 and performance is 43.333333333333336. Interpretation depends on the input units and declared range. The historical observed-range PLS IPMA uses a different definition and cannot supply a substitute reference for this calculation.

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

ResultQuickPLSstatsmodelsAbsolute differenceComparison result
x: importance1.545454545454421.545454545454551.29674049276218e-13Pass
x: performance43.333333333333343.33333333333330Pass
m: importance0.80454545454550.804545454545464.04121180963557e-14Pass
m: performance37.537.50Pass
z: importance0.07272727272727050.07272727272727544.88498130835069e-15Pass
z: performance50500Pass

Check test alternatives and a model without an intercept

The comparison covers three test cases with two-sided, greater and less alternatives. The greater case omits the intercept; all three name bin_y as the outcome and x, z and w as predictors. The calculation uses an unpenalised generalised linear model fitted by iteratively reweighted least squares (GLM/IRLS). Unpenalised means no extra shrinkage penalty is added to the fit.

IRLS updates a weighted least-squares calculation repeatedly to obtain the logistic estimates. These are algorithmic fitting weights; this description does not establish a test of user-supplied case weights.

  • These calculations used the historical 1.1.8 test executable.
What was checkedValue / scope
Compared numbers and missing-value statuses1899
Outside the stated tolerance0
Different scenario names in the comparison record3
Largest absolute difference2.84037200870557e-07

Logistic coefficients, odds ratios and 90% intervals

This table uses the test case named two_sided: outcome bin_y, predictors x, z and w, and an intercept. The saved confidence level is 90%. Each coefficient, standard error, test statistic, two-sided p-value, coefficient interval, odds ratio and odds-ratio interval is checked separately.

The coefficient of x is 1.0033956643544513 on the log-odds scale. Its odds ratio is 2.727527890546685, describing the multiplicative change in event odds for a one-unit difference in x, holding the other predictors fixed. This is not a probability increase. The 90% odds-ratio interval is 1.8975352557300182 to 3.9205639901789158.

These 36 displayed checks belong to the two-sided case, which has 637 numeric or missing-value comparisons in total. The full 1,899-check record also includes greater and less test alternatives; the greater case omits the intercept. Those alternatives do not mean that the event coding was reversed.

Values use 15 significant digits for display. The saved absolute differences are calculated before display rounding and are assessed with the recorded fixed-plus-relative tolerance.

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

ResultQuickPLSstatsmodelsAbsolute differenceComparison result
intercept: coefficient-0.0265782118205037-0.02657821182050013.53536644404073e-15Pass
intercept: standard error0.1930987458169980.1930987402711855.54581308653823e-09Pass
intercept: test statistic-0.137640520180758-0.1376405241337883.95302973688061e-09Pass
intercept: two-sided p-value0.890524529815480.8905245266911553.1243259090985e-09Pass
intercept: coefficient interval: lower-0.344197384237374-0.3441973751153199.12205438963198e-09Pass
intercept: coefficient interval: upper0.2910409605963660.2910409514743199.12204728420463e-09Pass
intercept: odds ratio0.9737718803856130.9737718803856163.44169137633799e-15Pass
intercept: odds-ratio interval: lower0.7087890104629130.7087890169285256.46561193473616e-09Pass
intercept: odds-ratio interval: upper1.337819380707441.337819368503791.22036516447821e-08Pass
x: coefficient1.003395664354451.003395664354441.11022302462516e-14Pass
x: standard error0.2205909682170430.2205909544424581.37745845285586e-08Pass
x: test statistic4.548670657119544.548670941156742.84037200870557e-07Pass
x: two-sided p-value5.39858540316018e-065.3985781174353e-067.28572487984722e-12Pass
x: coefficient interval: lower0.6405558102099110.6405558328670762.26571643668905e-08Pass
x: coefficient interval: upper1.366235518498991.36623549584182.2657186571351e-08Pass
x: odds ratio2.727527890546692.727527890546653.01980662698043e-14Pass
x: odds-ratio interval: lower1.897535255730021.897535298722794.29927686784737e-08Pass
x: odds-ratio interval: upper3.920563990178923.920563901349978.88289490852401e-08Pass
z: coefficient-0.499833530125641-0.4998335301256338.32667268468867e-15Pass
z: standard error0.2140955915951160.2140955819732939.62182297725711e-09Pass
z: test statistic-2.33462784731642-2.334627952238561.0492214430613e-07Pass
z: two-sided p-value0.01956287049879960.01956286501372995.48506964848094e-09Pass
z: coefficient interval: lower-0.851989440475189-0.851989424648691.5826498778182e-08Pass
z: coefficient interval: upper-0.147677619776093-0.1476776356025761.58264821248366e-08Pass
z: odds ratio0.6066316371999720.6066316371999774.9960036108132e-15Pass
z: odds-ratio interval: lower0.4265654606498750.4265654674009136.75103778435826e-09Pass
z: odds-ratio interval: upper0.8627091904986060.8627091768449551.3653651542711e-08Pass
w: coefficient0.4187197835948730.4187197835948694.21884749357559e-15Pass
w: standard error0.1999326753764140.1999326696767465.69966746022388e-09Pass
w: test statistic2.094303909086142.094303968790395.97042579819629e-08Pass
w: two-sided p-value0.0362329163399580.03623291102642865.31352935956297e-09Pass
w: coefficient interval: lower0.08985979735586740.08985980673098199.37511451803985e-09Pass
w: coefficient interval: upper0.7475797698338780.7475797604587559.37512290022369e-09Pass
w: odds ratio1.520014362147621.520014362147616.43929354282591e-15Pass
w: odds-ratio interval: lower1.094020888330961.094020898587531.02565711479485e-08Pass
w: odds-ratio interval: upper2.111882584490542.111882564691381.97991587569391e-08Pass
Logistic fit statistics for the same two-sided case

Likelihood and deviance describe the fitted binary-outcome model. Pseudo-R² is a different measure from the ordinary least-squares R²; they should not be treated as interchangeable percentages. All values below use the same outcome and intercept specification as the coefficient table.

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

ResultQuickPLSstatsmodelsAbsolute differenceComparison result
AIC167.031484873241167.0314848732415.6843418860808e-14Pass
BIC178.798054563679178.7980545636795.6843418860808e-14Pass
Deviance159.031484873241159.0314848732415.6843418860808e-14Pass
Likelihood-ratio chi-square35.021153283074935.02115328307534.2632564145606e-13Pass
Likelihood-ratio degrees of freedom330Pass
Likelihood-ratio p-value1.20577760664986e-071.20577760681232e-071.62458007607619e-17Pass
Log likelihood-79.5157424366207-79.51574243662072.8421709430404e-14Pass
Null deviance194.052638156316194.0526381563174.83169060316868e-13Pass
Pseudo-R²0.1804724409614270.1804724409614281.66533453693773e-15Pass

Error limits for linear regression and regression IPMA

The rule below applies after aligning the output definitions, including the HC3 uncertainty calculation and AIC/BIC constants. It checks numerical agreement for this test, not whether a regression specification is suitable for a research question.

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

In this formula, native is the QuickPLS value and aligned_reference is the reference value expressed using the same definition. abs means absolute value, so the sign does not affect the size of the difference. Absolute tolerance is a fixed allowance. Relative tolerance adds an allowance that grows with the size of the reference value. A separate check verifies whether a result is available or missing where expected; it does not estimate another effect.

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-071e-07139Comparison script

Error limits for the logistic examples

The logistic comparison uses both a fixed and a proportional allowance. A maximum absolute difference should therefore be read with the scale of the output and its assigned rule.

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

Use the same rule explained above: a fixed allowance plus one proportional to the reference value, with the limits in this table. Counts and missing-result checks are assessed separately from estimated values.

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-071e-071899Comparison script

What these checks tell you

These checks support the tested linear and logistic calculations under matching settings. They compare coefficient uncertainty as well as fitted estimates. They do not establish that the same model will be appropriate or well-behaved for every dataset.

Separation occurs when predictors perfectly distinguish the response categories and ordinary logistic estimates may not remain finite. That situation, case weighting, bootstrapping and additional diagnostics are outside the stated cases. Several checked rows can describe the same coefficient, so the totals are not counts of independent studies.

  • For linear regression, compare the same HC3 uncertainty method and the aligned model-comparison statistics.
  • For logistic regression, preserve the event category and intercept choice before comparing numbers.

Inspect the comparison files

Use the CSV to inspect coefficients, standard errors, probabilities and interval limits. The JSON report identifies the test executable, reference package, model choices and comparison rules.

Repeating a test requires its original dataset, response coding, predictor order, intercept setting and software versions. The downloads report completed comparisons and do not include the original datasets or application source code.

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