Interactions Between Independent Variables and Nonlinear Regression Models
Interaction Effects in Regression Models
Concept of Interaction Effects:
- An interaction occurs when the effect of a change in one independent variable on the dependent variable () depends on the value of another independent variable.
- Interaction terms allow regression specifications to capture conditional relationships and structural differences across subgroups or varying continuous scales.
Three Categorical Cases:
- Interactions between two binary variables.
- Interactions between a continuous variable and a binary variable.
- Interactions between two continuous variables.
Interactions Between Two Binary Variables
Baseline Model Without Interactions:
- Consider a population linear regression model relating log earnings to two binary explanatory variables:
- Variable definitions:
- : Natural logarithm of earnings for the individual.
- : Binary indicator where if the person graduated from college, and otherwise.
- : Binary indicator where if the person is female, and if male.
- Interpretation of baseline coefficients:
- : The effect on log earnings of graduating from college, holding sex constant.
- : The mean difference in log earnings between females and males, holding college schooling constant.
- Limitation of the baseline model:
- The specification assumes that the return to having a college degree is identical for men and women.
- It does not allow the effect of on to depend on the state of .
Binary Interaction Regression Model:
- To allow the market return of a college degree to differ between men and women, the model is augmented with an interaction term formed by the product of both binary regressors:
- Terminology:
- The regressor is termed the interaction term or interacted regressor.
- The complete equation is designated a binary variable interaction regression model.
- Interpretation of interaction coefficients:
- For men (): The effect of acquiring a college degree (a unit change in ) is .
- For women (): The effect of acquiring a college degree is .
- : The difference in the effect of acquiring a college degree for women compared to men.
Application: Student-Teacher Ratio and English Learners (Binary Variables)
Binary Variable Definitions:
- : Binary variable equal to if the student-teacher ratio is or more, and otherwise.
- : Binary variable equal to if the percentage of English learners is or more, and otherwise.
Interacted Regression Results:
- Estimated regression of test scores:
- Standard errors:
- Constant ():
- ():
- ():
- ():
- Summary statistic: .
Predicted Marginal Effects:
- Formula for predicted effect of moving from a low to high student-teacher ratio ( to ), holding English learner status constant:
- In districts with low English learners ():
- Test scores decline by points.
- In districts with high English learners ():
- Test scores decline by points.
Subgroup Sample Average Test Scores:
- Low student-teacher ratio, low English learners (, ):
- High student-teacher ratio, low English learners (, ):
- Low student-teacher ratio, high English learners (, ):
- High student-teacher ratio, high English learners (, ):
Interactions Between a Continuous and a Binary Variable

Theoretical Framework:
- Dependent variable: Log earnings, .
- Continuous explanatory variable: Work experience in years ().
- Binary explanatory variable: College degree status ( if college graduate, otherwise).
- Interactions between and give rise to three structural forms for the population regression function.
Specification 1: Different Intercepts, Same Slope:
- Population regression function:
- Regression line for nongraduates ():
- Intercept:
- Slope:
- Regression line for graduates ():
- Intercept:
- Slope:
- Substantive meaning:
- is the marginal effect on log earnings of an additional year of work experience, which is identical regardless of college graduation status.
- is the intercept shift, representing the mean effect of a college degree on log earnings holding years of experience constant.
Specification 2: Different Intercepts and Different Slopes:
- Population regression function:
- Regression line for nongraduates ():
- Intercept:
- Slope:
- Regression line for graduates ():
- Intercept:
- Slope:
- Substantive meaning:
- is the difference between the two intercepts.
- is the difference between the two slopes.
- is the return to an additional year of work experience for nongraduates.
- is the return to an additional year of work experience for college graduates.
Specification 3: Same Intercept, Different Slopes:
- Population regression function:
- Regression line for nongraduates ():
- Intercept:
- Slope:
- Regression line for graduates ():
- Intercept:
- Slope:
- Substantive meaning: Both groups share a common intercept at zero work experience, but accumulate earnings at different rates per year of experience.
Application: Continuous Student-Teacher Ratio and Binary English Learners
Model Framework:
- Continuous independent variable: Student-teacher ratio ().
- Binary independent variable: High percentage of English learners ( if percentage of English learners is greater than , and otherwise).
- Structure: Different intercepts and different slopes.
Estimated Regression Results:
- Fitted equation:
- Standard errors:
- Constant ():
- ():
- ():
- ():
- Summary statistic: .
Subgroup Regression Functions:
- Districts with low fraction of English learners ():
- Districts with high fraction of English learners ():
Interpretation:
- A reduction of the student-teacher ratio by unit increases test scores by points in districts with low fractions of English learners.
- A reduction of the student-teacher ratio by unit increases test scores by points in districts with high fractions of English learners.
- The difference in the marginal effect of student-teacher ratio between district types is points, corresponding to the interaction coefficient.
Interactions Between Two Continuous Variables
Model Formulation:
- Let and both be continuous independent variables.
- Example: is log earnings of the worker, is years of work experience, and is years of education.
- Standard linear regression restriction: Without interaction terms, the marginal effect of an additional year of experience is assumed independent of the level of education.
- Interaction model specification:
- Interaction term: The product regressor .
Marginal Effects Interpretation:
- Marginal effect of on : .
- Marginal effect of on : .
- The return to work experience depends on the quantity of education received, and the return to education depends on total accumulated work experience.
Logarithmic Transformations and Percentage Change Approximations
Exact Formula vs. Logarithmic Difference:
- Exact percentage change calculation:
- Logarithmic approximation formula:
Numerical Comparisons (Base Sales = 196):
- When sales change from to :
- Exact change:
- Approximation:
- When sales change from to :
- Exact change:
- Approximation:
- When sales change from to :
- Exact change:
- Approximation:
- When sales change from to :
- Exact change:
- Approximation:
- When sales change from to :
Behavior of Approximation:
- The logarithmic approximation is highly accurate for small percentage changes.
- The quality of the approximation systematically deteriorates as the percentage change becomes larger.
Alternative Exercise Specification (Base Sales = 243):
- Sales in 2018: .
- Sales in 2019 options evaluated: , , , and .
Hedonic Housing Price Model Analysis
Interpretation Principles for Semi-Log and Log-Log Regressions:
- Regressors in levels (): The estimated coefficient gives an approximate percentage effect on the dependent variable for a one-unit change in .
- Regressors in logarithms (): The estimated coefficient represents an elasticity.
- Binary regressors (): The exact percentage effect is computed via the formula:
Variable Definitions:
- : Sale price in dollars ().\n * \text{Size}: House size measured in square feet.\n * \text{Bedrooms}: Number of bedrooms.\n * \text{Pool}10 otherwise.\n * \text{View}10 otherwise.\n * \text{Condition}10 otherwise.\n\n* **Regression Results Summary Table:**\n\n| Regressor | (1) | (2) | (3) | (4) | (5) |\n| :--- | :--- | :--- | :--- | :--- | :--- |\n| \text{Size}0.000420.000038) | — | — | — | — |\n| \ln(\text{Size})0.690.0540.680.0870.572.030.690.055) |\n| [\ln(\text{Size})]^20.00780.14) | — |\n| \text{Bedrooms}0.00360.037) | — | — |\n| \text{Pool}0.0820.0320.0710.0340.0710.0340.0710.0360.0710.035) |\n| \text{View}0.0370.0290.0270.0280.0260.0260.0270.0290.0270.030) |\n| \text{Pool} \times \text{View}0.00220.10) |\n| \text{Condition}0.130.0450.120.0350.120.0350.120.0360.120.035) |\n| \text{Intercept}10.970.0696.600.396.630.537.027.506.600.40) |\n| **Summary Statistics** | | | | | |\n| \text{SER}0.10261.0231.020 |\n| \bar{R}^20.07100.07610.0814 |\n\n* **Empirical Questions Evaluated:**\n * Using column (1), expected change in price of adding 1500\text{ square feet}99\% confidence interval.\n * Using column (2), interpreting the elasticity coefficient on \ln(\text{Size}) and evaluating the price impact of doubling house size.\n * Using column (2), estimating the effect of \text{View}99\% confidence interval, and testing whether it is statistically different from zero.\n * Using column (3), evaluating the effect of adding two bedrooms, assessing its statistical significance, and comparing the relative importance of house size versus number of bedrooms.\n * Using column (4), evaluating whether the coefficient on \text{Condition} is statistically significant.\n * Using column (5), assessing whether the interaction term \text{Pool} \times \text{View} is statistically significant, and computing the marginal effect of adding a view for a house with a pool versus a house without a pool.\n\n# Academic Journal Demand and Elasticity Analysis\n\n* **Determinants of Journal Demand:**\n * Age interaction with price:\n * The demand for older journals is less elastic than for younger journals because the estimated interaction term between the natural log of journal age and price per citation is positive.\n * Linearity of demand curve:\n * The relationship between log price and log quantity is strictly linear because the estimated regression coefficients on log price squared and log price cubed are both statistically insignificant.\n * Effect of journal length:\n * Journals with more characters have higher overall demand, as evidenced by a positive and statistically significant coefficient estimate on the natural log of characters.\n\n* **Computing Price Elasticity for an 80-Year-Old Journal:**\n * General marginal effect equation:\n \text{Effect of } \ln(\text{Price per citation}) = [-0.899 + 0.141 \times \ln(\text{Age})] \times \ln(\text{Price per citation})\n * Evaluating at \text{Age} = 80:\n \text{Elasticity} = -0.899 + 0.141 \times \ln(80) = -0.28\n\n* **Standard Error Calculation:**\n * The standard error of the estimated elasticity is derived by dividing the absolute value of the point estimate (0.28F-statistic testing the linear hypothesis restriction:\n \beta_{\ln(\text{Price per citation})} + \ln(80) \times \beta_{\ln(\text{Age}) \times \ln(\text{Price per citation})} = 0\n\n* **Invariance Under Variable Rescaling:**\n * Log transformation property when dividing by a scaling constant a:\n \ln\left(\frac{\text{Characters}}{a}\right) = \ln(\text{Characters}) - \ln(a)\n * Impact on model estimates:\n * The estimated slope parameter associated with \text{Characters}$$ remains identical.
- The intercept (constant term) absorbs the added term and changes accordingly.
- : Sale price in dollars ().\n * \text{Size}: House size measured in square feet.\n * \text{Bedrooms}: Number of bedrooms.\n * \text{Pool}10 otherwise.\n * \text{View}10 otherwise.\n * \text{Condition}10 otherwise.\n\n* **Regression Results Summary Table:**\n\n| Regressor | (1) | (2) | (3) | (4) | (5) |\n| :--- | :--- | :--- | :--- | :--- | :--- |\n| \text{Size}0.000420.000038) | — | — | — | — |\n| \ln(\text{Size})0.690.0540.680.0870.572.030.690.055) |\n| [\ln(\text{Size})]^20.00780.14) | — |\n| \text{Bedrooms}0.00360.037) | — | — |\n| \text{Pool}0.0820.0320.0710.0340.0710.0340.0710.0360.0710.035) |\n| \text{View}0.0370.0290.0270.0280.0260.0260.0270.0290.0270.030) |\n| \text{Pool} \times \text{View}0.00220.10) |\n| \text{Condition}0.130.0450.120.0350.120.0350.120.0360.120.035) |\n| \text{Intercept}10.970.0696.600.396.630.537.027.506.600.40) |\n| **Summary Statistics** | | | | | |\n| \text{SER}0.10261.0231.020 |\n| \bar{R}^20.07100.07610.0814 |\n\n* **Empirical Questions Evaluated:**\n * Using column (1), expected change in price of adding 1500\text{ square feet}99\% confidence interval.\n * Using column (2), interpreting the elasticity coefficient on \ln(\text{Size}) and evaluating the price impact of doubling house size.\n * Using column (2), estimating the effect of \text{View}99\% confidence interval, and testing whether it is statistically different from zero.\n * Using column (3), evaluating the effect of adding two bedrooms, assessing its statistical significance, and comparing the relative importance of house size versus number of bedrooms.\n * Using column (4), evaluating whether the coefficient on \text{Condition} is statistically significant.\n * Using column (5), assessing whether the interaction term \text{Pool} \times \text{View} is statistically significant, and computing the marginal effect of adding a view for a house with a pool versus a house without a pool.\n\n# Academic Journal Demand and Elasticity Analysis\n\n* **Determinants of Journal Demand:**\n * Age interaction with price:\n * The demand for older journals is less elastic than for younger journals because the estimated interaction term between the natural log of journal age and price per citation is positive.\n * Linearity of demand curve:\n * The relationship between log price and log quantity is strictly linear because the estimated regression coefficients on log price squared and log price cubed are both statistically insignificant.\n * Effect of journal length:\n * Journals with more characters have higher overall demand, as evidenced by a positive and statistically significant coefficient estimate on the natural log of characters.\n\n* **Computing Price Elasticity for an 80-Year-Old Journal:**\n * General marginal effect equation:\n \text{Effect of } \ln(\text{Price per citation}) = [-0.899 + 0.141 \times \ln(\text{Age})] \times \ln(\text{Price per citation})\n * Evaluating at \text{Age} = 80:\n \text{Elasticity} = -0.899 + 0.141 \times \ln(80) = -0.28\n\n* **Standard Error Calculation:**\n * The standard error of the estimated elasticity is derived by dividing the absolute value of the point estimate (0.28F-statistic testing the linear hypothesis restriction:\n \beta_{\ln(\text{Price per citation})} + \ln(80) \times \beta_{\ln(\text{Age}) \times \ln(\text{Price per citation})} = 0\n\n* **Invariance Under Variable Rescaling:**\n * Log transformation property when dividing by a scaling constant a:\n \ln\left(\frac{\text{Characters}}{a}\right) = \ln(\text{Characters}) - \ln(a)\n * Impact on model estimates:\n * The estimated slope parameter associated with \text{Characters}$$ remains identical.