ECON 371 Class Recording 10/20
Watch on YouTube →
Overview
ECON 371 shifts from linear regression to nonlinear models, showing how adding a squared predictor lets the marginal effect vary with X: the effect is β₁ + 2β₂X. The class uses fish growth, study hours, North Carolina test scores, COVID cases, and Stata to explain curvature, compare models with adjusted R² and significance tests, and calculate predictions and marginal effects.
Key takeaways
- In a quadratic regression, the marginal effect of X is β₁ + 2β₂X, so a numerical one-unit effect cannot be reported without specifying the starting value of X.
- A positive linear coefficient and negative squared coefficient imply an increasing relationship with diminishing marginal gains, as illustrated by age-related growth and study effort.
- Ordinary R² does not penalize adding predictors, so adjusted R² is the better fit statistic when comparing linear, quadratic, and cubic specifications.
- Use a joint F-test to assess whether multiple polynomial terms, such as X² and X³ together, add explanatory power relative to a restricted linear model.
- Nonlinear terms can also suffer omitted-variable bias: excluding relevant controls such as magnet and charter school indicators changed the estimated effort-squared coefficient in the test-score example.
- Stata can create a quadratic predictor either as a generated X-squared variable or with continuous-variable factor syntax; both approaches produce the same regression results.
Chapters
- A brief Canvas quiz, code 43.52, asks whether the practice exam represented the real exam and is used to record attendance.
- Professor Lantis says early exam grading looks poor and warns that rushing quizzes or skipping problem sets can create an inflated sense of understanding.
- A test statistic increasing should make its p-value decrease, a concept many students missed on the exam.
- Exam scores are expected to be posted the following day, with a possible curve discussed for Thursday.
- A linear model assumes the same change in predicted Y for every one-unit increase in X, whether X moves from 2 to 3 or 9 to 10.
- Economic examples such as marginal product of labor and marginal cost often have changing slopes rather than constant effects.
- When the true relationship is curved, a straight line can produce large, systematically positive or negative residuals across different ranges of X.
- A quadratic specification includes both X and X² alongside the intercept and any other regression controls.
- Differentiating the fitted equation gives the marginal effect β₁ + 2β₂X, rather than a single constant slope.
- At X = 0, the marginal effect starts at β₁; the sign of β₂ determines whether that marginal effect rises or falls as X increases.
- Fish length generally rises with age, but growth slows as fish mature, so age and length do not have a constant marginal relationship.
- A linear regression can still find a statistically significant positive association while misrepresenting the effect of an additional year at different ages.
- Adding a curved fitted relationship can better track the data and reduce the pattern of residuals produced by a straight line.
- A positive β₁ with a negative β₂ describes Y rising at a decreasing rate, as with height or fish growth slowing over time.
- A positive β₁ with a positive β₂ describes Y rising at an increasing rate.
- The quadratic term describes how the marginal effect changes; the linear term indicates the effect’s starting direction.
- A quadratic curve may eventually turn, but the turning point may lie outside the range of X values observed in the data.
- Adding X² always weakly increases ordinary R², so adjusted R² is the more appropriate fit statistic for comparing models with different numbers of predictors.
- A statistically significant coefficient on X² supports including the quadratic term; the usual checks are its p-value, confidence interval, and test statistic.
- For a North Carolina student test-score example, effort has a negative squared coefficient, consistent with study effort improving scores at a decreasing rate.
- In the example, the squared term supports a nonlinear model at the 90% and 95% confidence levels, but not at 99%.
- For exam scores against hours studied, the likely pattern is positive but diminishing returns: the first study hour may matter more than the twenty-first.
- A cubic model adds X² and X³, making curve interpretation more involved than the quadratic case.
- To assess whether the added terms in a cubic model matter together, compare it with the linear model using a joint F-test.
- The joint test uses the change in ordinary R² and the number of added restrictions, while adjusted R² helps compare explanatory fit.
- The student effort example links more reported effort to higher test scores, with diminishing returns represented by a negative squared-term coefficient.
- When comparing a cubic model with a linear model, both the squared and cubed terms must be assessed, including through a joint F-test.
- In the illustrated comparison, the cubic model’s adjusted R² falls and its squared and cubed terms have large p-values, while the quadratic model performs better.
- The quadratic model is preferred in that example because its adjusted R² is higher and its added squared term is statistically significant.
- Adjusted R² accounts for the number of predictors and indicates which model explains more variation after the penalty for added terms.
- A joint F-test answers a different question: whether multiple added coefficients are jointly zero.
- For a cubic specification compared with a linear one, the joint test covers the two added terms, X² and X³; adding a fourth-power term would make three restrictions.
- A higher adjusted R² is evidence of improved fit, but it is not the same as a joint significance test.
- If the true relationship is nonlinear and X² is omitted, the linear model leaves out a predictor with potential explanatory power.
- Because X² is constructed from X, it is related to the included predictor, creating an omitted-variable-bias analogy.
- The omitted squared term can affect the estimated coefficients and statistical significance, not just the model’s fit.
- One Stata approach is to generate a new variable by multiplying age by itself, then include age and age-squared in the regression.
- Stata’s factor-variable syntax, such as c.age##c.age, produces the same quadratic regression results without manually generating the squared variable.
- For a cubic term, multiply the predictor by itself twice or use the corresponding continuous-variable syntax.
- Explicit variable names can make regression output and joint-test commands easier to understand and present to audiences unfamiliar with Stata.
- In the effort and math-score example, the squared term is not significant at the 90% threshold even though adjusted R² rises slightly.
- A p-value near 0.12 is close to, but does not meet, the conventional 10% significance cutoff; evidence from fit statistics and coefficient tests can differ.
- Leaving out magnet and charter school indicators changes the estimated squared-term coefficient and its p-value, illustrating omitted-variable bias in a nonlinear multiple regression.
- The squared term can be biased when omitted factors, such as school type, covary with the pattern of returns to effort.
- The class models city COVID cases using population and population squared, reasoning that more residents create more opportunities for transmission.
- The example describes cases increasing at an increasing rate as population grows, corresponding to a positive squared-term coefficient.
- The reported model has an R² around 0.95, meaning population and its nonlinear term explain about 95% of the observed variation in cases in that dataset.
- The high R² is presented as an example of how a nonlinear predictor can substantially improve explanatory fit.
- To predict Y in a quadratic model, substitute the hypothetical X value into both terms and square X when calculating its contribution through X².
- The marginal effect is β₁ + 2β₂X, so calculating a numerical effect requires a specified starting value of X.
- In the population example, an additional resident has a different predicted effect in a city of 10,000 people than in a city of 100,000.
- Professor Lantis closes by reiterating that neither β₁ nor β₂ alone gives the one-unit effect; the combined marginal-effect formula is needed.
Transcript excerpt
0:00 All right. So, start out. I'm going to I'm publishing the same class quiz. Start with that here today. So, I've got it set to be due here in 9 minutes, so plenty of time to get on and get it done. In fact, you shouldn't need any more time than this. And I think the code I had set it was 44 .3, no, 43.52. So, you should be able to find that on the main page at 43.52. It's got a simple question, right? So, it just asks you, "Do you [clears throat] think the practice exam was representative of the actual exam? Yes, no, or you didn't work through the practice exam."
0:48 All right. Um basically just using this to kind of get a response here, kind of give you credit for being in class today. We'll work through some, you know, we're starting a new topic, so I don't want to work through for Give you 20 questions that would be saved for like next next class or kind of next week, okay? So, this one's kind of a way for me to record attendance here today. Um also, I may not always use these at the end of the class. It's important to be here. I noticed a lot fewer people here today than last Thursday, all right? Um which is part of the problem, right? Before we jump into material here today, I've got most of the exams graded. It's not good, all right? Um I think it's twofold. I think there's a group of people who aren't attending class or are really paying attention and think they can learn the material on
1:35 their own, and I don't think that that's serving them well. I also think people are relying too much. I give you these problem sets for
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.