ECON E371 Class Recording 11/05
Overview
Professor Lantis explains how continuous-by-continuous interaction terms make each variable’s marginal effect depend on the other variable, then derives conditional effects and turning points using examples involving worker happiness, children, and housing starts. The class also reviews Stata interaction syntax, evaluates interaction models with adjusted R-squared and coefficient significance, compares regression models with different transformations, and discusses practical interpretation and upcoming coursework.
Key takeaways
- For a model with X1, X2, and their product, the marginal effect of X1 is beta one plus beta three times X2; interaction effects therefore need a stated value of X2 to produce a specific estimate.
- A continuous-interaction turning point is found by setting the marginal effect to zero, producing negative beta one divided by beta three; coefficient signs determine whether the turning point is positive, but the value must also be plausible in the data.
- Adding a regressor always weakly raises ordinary R-squared, but adjusted R-squared can rise or fall because it penalizes model complexity.
- In the housing-start example, the mortgage-rate effect was estimated as 60.59 minus 22.56 times unemployment, crossing zero at roughly 2.69; evaluating this threshold helps reconcile an initially surprising positive coefficient with the expected negative relationship.
- R-squared comparisons require the same dependent variable: a linear-linear model can be compared with a linear-log model when Y is unchanged, but not directly with a model that logs Y.
- A squared term is an interaction of a variable with itself, while an interaction between two distinct variables makes each marginal effect depend on the other variable.
Chapters
- Practice questions through question 10 cover material available after class, including interaction terms; questions 11 to 13 wait until Tuesday’s material.
- The quiz will be posted after Tuesday’s class and is due at the end of the following Friday.
- A problem set focused on interaction terms is planned for the next morning, with a due date the following Tuesday; measurement error is reserved for later.
- The model includes both continuous variables individually and their product, X1 times X2, as an interaction term.
- The marginal effect of X1 is beta one plus beta three times X2, so its effect changes with the value of X2.
- For demand, an interaction between price and temperature can make the price effect on ice cream sales differ on hot and cold days.
- A log-log model can express the relationship in elasticities, while a linear-linear model describes changes in the demand curve’s slope.
- In the age, hours-worked, and happiness example, beta one alone describes age’s effect only when hours worked equals zero.
- Likewise, the coefficient on hours worked alone describes its effect only when age equals zero, which may not be a useful real-world reference point.
- The interaction coefficient tests whether the marginal effect of one variable depends on the other; its p-value in the example is near, but not within, conventional significance cutoffs.
- Adding an interaction term cannot lower ordinary R-squared because the model gains another regressor.
- Adjusted R-squared may rise or fall because the added-variable penalty competes with any additional variation explained.
- Professor Lantis recommends comparing adjusted R-squared, rather than ordinary R-squared alone, when judging whether the interaction improves the model.
- The marginal effect of age is beta one plus beta three times weekly hours worked.
- At 30 hours per week, one additional year of age is associated with an estimated happiness increase of about 0.06 points.
- At 60 hours per week, the estimated increase is about 0.02 points, illustrating how the same age change can have different effects at different work levels.
- Set the marginal effect, beta one plus beta three times the interacted variable, equal to zero to locate a turning point.
- Solving gives the conditional variable’s turning-point value as negative beta one divided by beta three.
- A positive turning point requires the main-effect and interaction coefficients to have opposite signs; the resulting value still needs to be checked against realistic data ranges.
- The marginal effect of hours worked is beta two plus beta three times age, so the age coefficient determines how the work-hours effect changes.
- The example estimates a turning point near 75 weekly work hours for the age effect on happiness, a value that is possible mathematically but unusually high in practice.
- Turning points for either variable use the main-effect coefficient of the variable whose marginal effect is being evaluated, divided by the interaction coefficient with a negative sign.
- For Stata factor-variable syntax, Professor Lantis corrects the dummy-variable interaction notation to use 1. rather than i.; continuous-by-continuous interactions use c. and c. with ##.
- A happiness regression with number of children and hours worked adds their interaction to test whether either variable’s effect depends on the other.
- In the children-by-hours example, adjusted R-squared falls slightly, from about 0.0015 to 0.0014, and the interaction p-value is 0.7, both indicating little support for the interaction.
- Adding controls such as age can change interaction estimates and significance, while omitted-variable bias for an interaction depends on how the omitted variable relates to both interacted variables.
- When both the main and interaction coefficients have the same sign, the calculated turning point is negative, which is not meaningful for many nonnegative variables such as hours worked.
- A squared term is a continuous interaction of a variable with itself, so the marginal effect of number of children depends on how many children there are.
- Unlike a squared-term turning point, a two-variable interaction’s marginal effect changes with the other variable’s value.
- The in-class quiz uses monthly U.S. housing-start data alongside mortgage rates and unemployment rates.
- The economic motivation is that lower mortgage rates may encourage home purchases, but high unemployment can limit how many people can afford a home.
- Ordinary R-squared is higher in the model with the interaction; adjusted R-squared is not guaranteed to be higher because it also accounts for the extra regressor.
- The estimated mortgage-rate marginal effect is 60.59 minus 22.56 times the unemployment rate.
- Setting that effect to zero gives an unemployment-rate turning point of approximately 2.69.
- Above about 2.69, the estimated effect of higher mortgage rates on housing starts is negative; below it, the estimate is positive.
- The example shows why coefficient signs alone are insufficient: interpreting the turning point against realistic unemployment rates makes the result more economically meaningful.
- For assignments, continue using controls from the previous model unless the question specifically focuses on omitted-variable bias or changes the specification.
- Professor Lantis recommends writing out the marginal-effect equation and solving it directly instead of memorizing a turning-point formula such as beta two divided by beta three.
- This approach clarifies which main-effect coefficient belongs in the calculation when switching between the two variables in a continuous interaction.
- R-squared measures explained variation in the dependent variable, so it can compare a linear-linear model with a linear-log model when both use the same Y.
- A model that logs Y changes the dependent variable’s variation, so its R-squared cannot be directly compared with a model using Y in levels.
- For comparisons across different dependent-variable transformations, the class discussed coefficient significance as a limited indicator, while noting it is not a perfect model-selection method.
- Log models cannot take the natural log of a 0/1 dummy variable, and squaring a dummy reproduces the same variable, creating perfect multicollinearity.
- Adding a squared term can make a previously significant linear coefficient insignificant while improving adjusted R-squared and capturing curvature more accurately.
- When evaluating a quadratic model, focus on the squared term’s significance and adjusted R-squared rather than assuming a change in the linear term’s significance means the model worsened.
- Professor Lantis emphasizes that statistical calculations must be connected to realistic contexts, such as whether a predicted turning point is plausible for work hours or unemployment.
- The next problem set is due the following Tuesday, and the interaction-term quiz will be posted after Tuesday’s class and due Friday.
Transcript excerpt
0:01 All right. So I [clears throat] think last class I had mentioned um putting the quiz out after today. That's not based off what we've covered and I'm guessing what we get through today. I'm going to hold off on that because some of the questions are going to be about the next thing we'll talk about which is measurement error. So you can start working through these practice problems and everything Let's see if we know exactly what the question is. But we should be able after today [clears throat] to work through almost all the questions here at least in terms of all the interaction term things. Um it's taking a while to load. This might be quicker.
0:51 There we go. So you should be able to work all the way through to question um 11. So 11, 12, and 13 will be stuff that we cover on Tuesday. So after Tuesday's class I'll then release the quiz and it'll be due at the end of the day next Friday. So that quiz um kind of pushing that due date a little, you know, pushing a little bit forward. Um I don't like to have like a hard and fast rule especially once we get to this point in the semester because we might move a little bit faster or slower at different points and so um you want to review these practice problems. You can kind of go up to question 10 after today's class and that quiz will cover all the material on Tuesday so that I'll post it Tuesday and it'll be due at the end of the day Friday. Okay?
1:37 I will also get the next problem set up tomorrow morning um possibly early afternoon. I want to kind of finalize a few things on it just based off of what
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Professor Lantis.