ECON 371 Class Recording 10/27
Watch on YouTube →
Overview
The class develops ways to model nonlinear economic relationships using logarithmic and polynomial specifications, with emphasis on interpreting coefficients and choosing models without comparing incompatible R-squared values. Stata examples with happiness, hours worked, age, and children demonstrate marginal effects, turning points, joint significance tests, and the Davidson-MacKinnon fitted-value comparison.
Key takeaways
- In a linear-log model, a 1% increase in X changes predicted Y by approximately beta divided by 100 units; in a log-linear model, a one-unit increase in X changes Y by approximately 100 beta percent.
- R-squared comparisons require the same dependent variable because logging Y changes its variation; adjusted R-squared additionally accounts for differences in the number of predictors.
- For a quadratic regression, the marginal effect is beta1 + 2 beta2 X, and the turning point occurs at negative beta1 divided by 2 beta2; the happiness example's estimate is about 73 weekly work hours.
- Joint hypothesis tests evaluate whether added linear or logarithmic terms are jointly useful; in the example, logged hours and age fail the test with p = 0.47, while the linear terms are jointly significant.
- The Davidson-MacKinnon approach compares competing specifications by testing whether one model's fitted values add explanatory power to the other, and it requires both models to use the same dependent variable.
- Stata's margins, dydx() and marginsplot commands can calculate and graph marginal effects across values of X, making nonlinear patterns and turning points easier to inspect.
Chapters
- The upcoming quiz covers logarithmic and other nonlinear relationships, with practice problems and a problem set posted for the material.
- Interaction terms are identified as the next topic, scheduled to begin later in class or on Thursday.
- The class resumes nonlinear specifications, including squared and cubed terms.
- A linear-log model uses the natural log of X while keeping Y in its original units.
- For GPA predicted by logged high-school ranking, a 1% increase in ranking corresponds approximately to a change of beta divided by 100 GPA units.
- Percentage changes can be more meaningful than raw unit changes when comparing, for example, GDP growth from 1 to 2 billion versus 10 to 11 billion.
- In a log-linear model, logged Y is predicted from X in levels, so a one-unit increase in X corresponds approximately to a beta times 100 percent change in Y.
- In a log-log model, both variables are logged and beta directly represents the predicted percentage change in Y for a 1% change in X.
- The coefficient conversions depend on whether the logged variable is Y, X, or both.
- R-squared measures explained variation in the dependent variable, so it cannot directly compare regressions that use different dependent variables, such as Y and ln(Y).
- When models share the same dependent variable and predictor count, either R-squared or adjusted R-squared can compare fit; with different predictor counts, use adjusted R-squared.
- Taking a natural log changes the dependent variable's variation, and ordinary dummy variables cannot be logged because ln(0) is undefined.
- For a model with predictors such as high-school ranking and SAT score, compare linear and logged predictor forms only when the dependent variable stays the same.
- Joint hypothesis tests can assess whether multiple linear terms or multiple logarithmic terms have coefficients jointly equal to zero.
- If dependent variables differ, statistical fit measures cannot settle the choice; economic reasoning must guide whether unit changes or percentage changes make more sense.
- A Stata regression predicts self-reported happiness using hours worked, number of children, and age.
- Adding hours worked squared produces a positive linear coefficient and negative squared coefficient, suggesting happiness rises at a decreasing rate as work hours increase.
- The quadratic model's adjusted R-squared is slightly higher than the linear model's, while the squared term is significant at the 90% and 95% levels in the example.
- For happiness regressed on hours worked and hours worked squared, the marginal effect is beta1 plus two times beta2 times hours worked.
- The effect of one additional work hour depends on the starting number of hours, so Stata calculations at 40 and 80 hours produce different marginal effects.
- Setting the marginal effect to zero gives the quadratic turning point, negative beta1 divided by two beta2; the example estimates it at about 73 hours per week.
- Stata creates logged variables for happiness, hours worked, and age, while observations with missing values are omitted from regressions that use them.
- The quadratic model has a slightly higher adjusted R-squared than the linear model in the happiness example, while the linear-log model's adjusted R-squared is lower.
- A lower p-value for one coefficient does not by itself establish a better model; compare fit measures only when the dependent variable is the same.
- The Stata test command evaluates whether several coefficients are jointly zero, assessing whether a set of added terms improves explanatory power.
- In the example, logged hours and age have a joint-test p-value of 0.47, so the class fails to reject that the logged terms add no predictive power.
- The corresponding test for linear hours and age has a low p-value, supporting their joint inclusion; if both or neither sets pass, try another specification such as a quadratic model.
- The Davidson-MacKinnon procedure estimates one model, saves its fitted Y values, then adds those values to a regression using the competing specification.
- A statistically significant coefficient on the competing model's fitted values indicates that those predictions add explanatory information and favors that model under the class's decision rule.
- The comparison requires the same dependent variable, because fitted values for Y and ln(Y) are in different units and cannot be directly tested this way.
- Stata's predict command with the xb option saves fitted values from the estimated regression for each observation.
- In the demonstration, adding linear-model predictions to the linear-log regression yields a statistically significant fitted-value coefficient, favoring the linear specification.
- Reversing the test by adding linear-log predictions to the linear regression produces an insignificant coefficient, consistent with that conclusion.
- Adding a squared term can change the linear coefficient because the quadratic model's marginal effect includes both the linear coefficient and the squared-term coefficient times X.
- Adding a regressor cannot lower ordinary R-squared, so adjusted R-squared is needed to assess whether a quadratic model improves fit after accounting for the extra term.
- For comparisons with a linear-linear model, a linear-log model shares the dependent variable and predictor count, while a squared model needs adjusted R-squared and models using ln(Y) are not directly comparable.
- A misspecified straight line can violate the conditional-mean assumption: at some X values, prediction errors may all fall on one side rather than averaging to zero.
- In the happiness example, adding squared and cubed hours terms improves adjusted R-squared; the squared and cubed terms are jointly significant at p = 0.005, and the cubed term alone has p = 0.002.
- Stata's factor-variable syntax allows margins, dydx() to calculate marginal effects across hours worked, and marginsplot visualizes their decline toward zero near the 73-hour turning point.
Transcript excerpt
0:00 So, we left off um thinking about non-linear relationships. So, we're down here. We'll kind of finish up these slides today. Uh so, here's kind of all the files that I might be using if we switch over to Stata. You've got those uh practice problems up. So, after today, that next quiz will just be over the non-linear relationships. So, I'll be posting it as soon as I get back to my office. It's due at the end of the day on Friday. Got these practice problems that doing should be available as soon as we're done today. We'll cover all the material you need for that quiz. Um I also posted up kind of the next problem set. And what we'll be using there. So, whoop.
0:49 So, if we kind of look here, go all the way down here, this is going to be everything we talked about today using logarithmic terms. So, this should just be everything that we cover up through today as well. So, quiz, problem set, everything we covered last week up through today. The next thing that I think we'll probably be able to start today, if not, we're definitely going to start with on Thursday, is it's a different kind of type of non-linear relationship. It's called We're going to look at interaction terms. So, if we don't start that today, we'll definitely start with that on Thursday. We'll kind of see how far we get, okay? Other than that, um don't think I have anything else kind of mention in terms of logistics before we get into the material. Any questions for me? So, you still want your exams? I didn't
1:36 bring them with me today, but you can stop by office hours to get those. I'll try to remember Thursday to bring them
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
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.