Multiple Regression with Interactions & Non-Linear Effects

Advanced

Build on multiple regression by adding interaction terms (moderation effects) and quadratic terms (non-linear relationships). Understand how the effect of one predictor depends on another, or how relationships curve rather than staying linear.

👨‍🏫 Professor Mode: Guided Learning Experience

New to interaction effects? Enable Professor Mode for step-by-step guidance through moderation, quadratics, and simple slopes!

OVERVIEW & WHAT THIS TOOL SOLVES

Standard multiple regression assumes every marketing lever works with the exact same straight-line slope across all customer segments and spend levels. In real campaigns, effects depend on context—ad spend may pay off strongly during peak season but stall off-season (an interaction), or price increases may boost revenue up to a sweet spot before triggering customer defection (a quadratic curve). MLR Interactions & Quadratic Regression extends linear regression to test moderation and curvature so you can tailor strategy by segment and pinpoint optimal operating points.

🎯 Questions It Answers

  • Does the effectiveness of our focal marketing lever depend on another variable like customer segment, channel, or season (moderation)?
  • Does our predictor follow a curved relationship with diminishing returns or an inverted-U sweet spot (quadratic effect)?
  • At what exact level of the moderator is our focal predictor statistically significant (simple slopes)?

📂 What Data You Need

  • Case-Level CSV: One row per observation (customer, store, campaign, or week).
  • 1 Continuous Outcome: Numeric dependent variable (e.g., revenue, conversion rate, satisfaction score).
  • 2+ Predictors: Continuous or categorical variables to serve as your focal predictor, moderator, or quadratic term.

💡 What You'll Discover

  • Interaction & Curvature Tests: Statistical significance and incremental R-squared added by the interaction or squared term.
  • Simple Slopes & Fan Plots: Visual slopes at Low (−1 SD), Average (Mean), and High (+1 SD) moderator levels or across categories.
  • Optimal Turning Point: The exact predictor value where a quadratic curve peaks or bottoms out, checked against your observed data range.
🔍 Key Nuances: Mean-Centering, Simple Slopes & Turning Points
  • Why Mean-Centering Matters (Enabled by Default): When you include an interaction term, the lower-order "main effect" of a predictor represents its slope when the moderator equals zero. Mean-centering shifts zero to the sample average so every main effect reads naturally as the effect at average moderator levels and reduces collinearity between raw variables and their product term.
  • Probing Interactions with Simple Slopes: A significant interaction tells you the slopes differ, not where the focal predictor is significantly different from zero. Use the Simple Slopes breakdown (−1 SD, Mean, +1 SD for continuous moderators, or per group for categorical moderators) to see where your lever works vs. stalls.
  • Checking Quadratic Turning Points: Always verify whether the calculated peak or trough falls inside your observed data range. If the vertex lies outside your sample range, the relationship is simply curving monotonically within your data rather than reversing direction.
  • Educational Focus (One Special Term at a Time): To keep plots and simple-slope tables crystal clear, this tool fits one interaction or quadratic term per model run alongside your control variables.
📐 Under the Hood: Model Equations & Variable Definitions
1. Moderated Regression (Two-Way Interaction Model)
\[ Y_i = \beta_0 + \beta_1 X_{1i} + \beta_2 X_{2i} + \beta_3 (X_{1i} \times X_{2i}) + \varepsilon_i, \qquad \frac{\partial \hat{Y}}{\partial X_1} = \beta_1 + \beta_3 X_2 \]
💬 Read it in plain English: Because of the product term X1 × X2, the effective slope of focal predictor X1 is no longer a fixed number—it starts at β1 and shifts by β3 for every 1-unit change in moderator X2.
Yi, X1i, X2i
Outcome, Focal Predictor & Moderator YOUR DATA ⓘ
Outcome Yi, focal predictor X1i, and moderating context variable X2i for row i.
β1, β2
Conditional Main Effects ESTIMATED ⓘ
Slope of X1 when X2 = 0 (β1) and slope of X2 when X1 = 0 (β2).
β3
Interaction (Moderation) Coefficient INFERENCE ⓘ
How much the slope of X1 on Y changes for each 1-unit increase in moderator X2.
β0, εi
Intercept & Residual Error OUTPUT ⓘ
Baseline outcome β0 and unexplained residual εi for row i.
2. Quadratic Regression & Optimal Turning Point
\[ Y_i = \beta_0 + \beta_1 X_i + \beta_2 X_i^2 + \varepsilon_i, \qquad X^* = -\frac{\beta_1}{2\beta_2} \]
💬 Read it in plain English: Adding a squared predictor term (Xi2) bends the regression line into a parabola; a negative β2 creates an inverted-U curve that peaks at X* = −β1 / (2β2).
Xi2
Squared Predictor Term YOUR DATA ⓘ
Quadratic term capturing acceleration, diminishing returns, or saturation in predictor X.
β2
Curvature Coefficient ESTIMATED ⓘ
Governs the direction and steepness of curvature: β2 < 0 yields an inverted-U peak; β2 > 0 yields a U-shaped trough.
X*
Optimal Vertex (Turning Point) OUTPUT ⓘ
Exact predictor level where expected outcome Y reaches its maximum (when β2 < 0) or minimum (when β2 > 0).

DATA SOURCE

📚

Use a Case Study

Use presets to explore realistic scenarios demonstrating interactions and non-linear effects in marketing, pricing, and gaming contexts. Each scenario can be downloaded, edited in Excel, and re-uploaded.

📂

Upload Your Data

Upload a CSV file with raw case-level data. Include one outcome variable and multiple predictors (numeric or categorical).

Drag & Drop raw data file (.csv, .tsv, .txt, .xls, .xlsx)

Include headers; at least one numeric outcome and 2+ predictors.

No file uploaded.

INPUTS & SETTINGS

Confidence Level & Reporting

Set the significance level for hypothesis tests and confidence intervals.

Advanced Analysis Settings

Centering improves interpretability and reduces multicollinearity. Main effects then represent effects "at average levels" of other variables. Disable only if you have specific reasons.

Toggle visibility of shaded confidence intervals around predicted lines. Useful for assessing uncertainty in simple slopes.

VISUAL OUTPUT

Interaction / Effect Plot

Interpretation Aid

SUMMARY STATISTICS

Summary Statistics

How to Use Summary Statistics

Review these before interpreting regression coefficients — they provide the context needed to judge practical significance:

  • Mean & Median: If they differ substantially, the distribution is skewed — regression coefficients (which minimize squared errors) may be pulled toward outliers. Consider whether a log transform is appropriate.
  • Std. Dev.: Used to evaluate practical significance. A coefficient of 0.5 on a predictor with SD = 100 is very different from a coefficient of 0.5 on a predictor with SD = 1. Use standardized betas (from ml_regression) for comparisons across predictors.
  • Min / Max: Check that your data range is plausible. Extreme outliers can severely distort regression results. Also confirms the range over which interaction plots are valid — predictions outside [Min, Max] are extrapolations.
  • Variables marked with *: Were mean-centered in the model. Their raw means are shown here so you can convert centered predictions back to original units.

Outcome & Continuous Predictors

Variable Mean Median Std. Dev. Min Max
Provide data to see summary statistics.

Categorical Predictors (% by level)

Predictor Level Percent
Provide data to see level percentages.

TEST RESULTS

Regression Equation

Provide data to see the fitted regression equation.

How to Read This Equation

The regression equation shows the mathematical relationship the model has learned. Each term contributes to the predicted outcome (Ŷ):

  • Intercept (β₀): The predicted outcome when all predictors are at zero (or at their means if mean-centering is enabled). Often not directly meaningful on its own.
  • Main effects (βᵢ × Xᵢ): The effect of each predictor, holding all others constant. With an interaction in the model, these "main effects" represent the predictor's effect when the other interacting variable is at zero (or its mean, if centered).
  • Interaction term (βᵢⱼ × Xᵢ × Xⱼ): Captures how the effect of one predictor changes depending on the level of another. Even a small interaction coefficient can be substantively important.
  • Quadratic term (β × X²): Captures curvature — whether the relationship accelerates or decelerates.

Mean-centering note: When centering is enabled, predictor values in the equation are deviations from the mean, not raw values. To make a prediction, subtract each variable's mean before plugging in. The mean-centering note above the equation (when visible) provides the means you need.

R-squared:–
Adj. R-squared:–
Model F:–
Model p-value:–
RMSE:–
MAE:–
Sample size (n):–
Alpha:–
Overall Model F (α):–(omnibus test; see Model Fit Comparison for interaction)
What Do These Model-Fit Metrics Mean?

R² (R-squared): The proportion of variance in the outcome explained by all predictors together. R² = 0.40 means the model accounts for 40% of the outcome's variability. Higher is better, but adding more predictors always increases R² — so use Adj. R² to compare models of different sizes.

Adj. R² (Adjusted R-squared): R² penalized for the number of predictors. This is the preferred fit measure when comparing models with different numbers of terms. If adding a predictor doesn't meaningfully improve fit, Adj. R² will decrease or stay flat.

Model F & p-value: The omnibus F-test checks whether the full model (all predictors together) explains significantly more variance than a model with no predictors at all. A significant p-value (< α) means at least one predictor is useful — but does not tell you which one, or whether the interaction term specifically is significant. For that, see the Model Fit Comparison card below.

RMSE (Root Mean Squared Error): The typical prediction error in the same units as your outcome, computed as √(SSE/n). E.g., if outcome is revenue in dollars and RMSE = 12.4, predictions are off by roughly $12.40 on average (with larger errors weighted more). Lower is better. Note this is not the same as the residual standard error, √(SSE/(n−k−1)), which is what the coefficient standard errors below are built from; the residual standard error is always the larger of the two.

MAE (Mean Absolute Error): Like RMSE but without squaring — the average absolute error in outcome units. Less sensitive to outliers than RMSE. If MAE ≪ RMSE, there are a few large errors pulling RMSE up.

Sample size (n): Number of complete observations used. Missing data on any variable reduces n. Rules of thumb: n ≥ 10–20 per predictor term for stable estimates; n ≥ 50+ for reliable interaction effects.

Decision (omnibus): Based on the overall model p-value vs. your chosen α. "Reject H₀" means the full model explains a statistically significant amount of variance. This does not imply the interaction is significant — check the coefficient table and Model Fit Comparison.

APA-Style Statistical Reporting

About APA Reporting

APA (American Psychological Association) format is the standard for reporting regression results in academic and professional research. It reports F-statistics as F(df₁, df₂) = value, p = value; coefficients as b = value, SE = value, t(df) = value, p = value; and R² as a measure of overall fit. When submitting to journals or writing research reports, use this section as your template — but always double-check against the specific journal's style guide.

Managerial Interpretation

About the Managerial Summary

This section translates statistical results into plain-language strategic insights. It highlights what the model implies for decision-making — e.g., whether to segment strategies by moderator level, where diminishing returns occur, or which predictors drive the outcome most. Always combine these insights with domain knowledge and consider whether results replicate on held-out data before acting.

Coefficient Estimates

Predictor Term Estimate Std. Error t p-value Lower CI Upper CI
Provide data to see coefficient estimates.
Coefficient Interpretation Guide

How to read each column:

  • Predictor / Term: The variable or derived term (main effect, interaction, or quadratic). Interaction terms are labeled "X₁ × X₂"; quadratic terms use "X²".
  • Estimate (b): The unstandardized regression coefficient — the predicted change in the outcome for a one-unit increase in that term, holding all others constant. For interaction terms, it represents how much the effect of the focal predictor changes per unit of the moderator.
  • Std. Error: The precision of the estimate. Larger SE = more uncertainty. SE is used to compute the t-statistic and confidence interval.
  • t: The test statistic = Estimate / SE. Used to determine if the coefficient is significantly different from zero.
  • p-value: The probability of observing a t-statistic this large (in either direction) if the true coefficient were zero. Highlighted in blue when p < α (statistically significant). Remember: significance ≠ importance — always consider effect size.
  • CI Lower / Upper: The confidence interval for the estimate. If this interval does not include zero, the coefficient is significant at your chosen α level. Wider intervals = more uncertainty. Use these to judge practical significance — a significant p-value with a tiny coefficient may not be actionable.

Interaction coefficient caution: With mean-centering enabled, interaction coefficients are interpreted "at average levels" of the other variable. Without centering, the intercept and main effects change substantially but the interaction coefficient itself does not.

Categorical predictors: Dummy-coded against a reference level (shown in parentheses). Each coefficient represents the mean difference between that level and the reference, holding continuous predictors constant.

Diagnostics & Assumption Checks

Run the analysis to see checks on multicollinearity, residual patterns, and model fit.

How to Interpret These Diagnostics

Multicollinearity (VIF — Variance Inflation Factor):

  • VIF = 1: No correlation with other predictors (ideal).
  • VIF 1–5: Moderate correlation — generally acceptable.
  • VIF 5–10: High correlation — coefficients become less stable; SEs inflate. Interpret individual coefficients cautiously.
  • VIF > 10: Severe multicollinearity — coefficient estimates may be unreliable. Consider removing a collinear predictor, combining variables, or using ridge regression. Note: interaction and quadratic terms are inherently correlated with their components — this is why mean-centering is recommended. VIF for interaction terms will typically be elevated even after centering; this is expected and not a crisis unless VIF exceeds 10–15.

Residual Checks:

  • Mean of residuals ≈ 0: Any departure from 0 indicates a systematic bias in predictions (this should always be ≈ 0 for OLS).
  • Std. dev. of residuals: This is approximately RMSE — the typical size of prediction errors in outcome units.

Residuals vs. Fitted plot: Look for (a) a flat, horizontal scatter with no curve — curvature suggests a missing non-linear term; (b) roughly equal spread at all fitted levels — a funnel shape (heteroscedasticity) means variance grows with the outcome, which can inflate or deflate SEs; (c) no extreme outliers far from the bulk — single influential points can distort all coefficients.

Residuals vs. Fitted

Actual vs. Fitted

Interpretation Aid

Each point compares an observed outcome to its predicted value. Points near the 45° line indicate better fit. Systematic curves or funnel shapes suggest model misspecification or heteroscedasticity.