Lesson 1
OLS Assumptions and Gauss–Markov Theorem
Regression output (coefficients, standard errors, t-statistics and p-values) can only be trusted if the OLS assumptions hold. Violating an assumption either biases the coefficients or makes the standard errors, and therefore hypothesis tests, unreliable. Under the classical assumptions, the Gauss–Markov theorem states that OLS is the Best Linear Unbiased Estimator (BLUE).
The six assumptions
- Linearity in the parameters (correct functional form): transformations like x^2 or log x are allowed.
- Constant error variance (homoscedasticity).
- Independent errors (no autocorrelation).
- Normally distributed errors.
- No multicollinearity among the X variables.
- Exogeneity: violations include omitted variable bias.
- Consequences of violation: biased coefficients, or unreliable standard errors that invalidate t-tests and p-values.
Functional form
- Example: lung function vs age is curved, so a straight-line fit is wrong.
- Detect: a residual plot with a 'frowny' or 'smiley' pattern; likelihood ratio test.
- Effect: both coefficients and standard errors are unreliable.
- Fix: respecify the model, e.g. add age^2, which is still a linear regression.
Heteroscedasticity
- Example: expenditure vs income, where the spread grows as income rises.
- Effect: coefficients remain unbiased, but standard errors are unreliable.
- Detect: Goldfeld–Quandt and Breusch–Pagan tests.
- Fix: robust (White's) standard errors, weighting, or logging the variables.
Autocorrelation
- Occurs only in time-series data, where each error depends on previous ones (a 'snaking' residual pattern).
- Effect: coefficients remain unbiased, but standard errors are unreliable.
- Detect: the Durbin–Watson test (first order) and the Breusch–Godfrey test (higher orders).
- Fix: include omitted variables (e.g. the business cycle), or use a generalized difference equation (Cochrane–Orcutt, AR(1)).
Gauss–Markov theorem
- If linearity, exogeneity (zero mean error), homoscedasticity, no autocorrelation and no perfect multicollinearity hold, OLS is BLUE.
- BLUE means the lowest variance among all linear unbiased estimators.
- The normality of errors is not required for BLUE; it supports exact t and F tests in small samples.
Key terms
- Homoscedasticity
- Constant variance of the errors across all values of X.
- Autocorrelation
- Correlation of errors across successive time periods.
- Multicollinearity
- A high correlation among the explanatory variables.
- Bias
- A systematic difference between an estimator's expected value and the true parameter.
- Robust standard errors
- White's heteroscedasticity-corrected standard errors.
- BLUE
- Best Linear Unbiased Estimator: the minimum-variance linear unbiased estimator.
Lesson 2
R² vs Adjusted R² and Dummy Variables
Total variation in Y can be decomposed into explained and unexplained parts: TSS = ESS + RSS. R² = ESS/TSS measures the share of variation in Y explained by the regressors, but it never falls when variables are added, so adjusted R² corrects for degrees of freedom.
Decomposition of variance
- Fitted value: Yi_hat = b0_hat + b1_hat Xi; residual ei = Yi - Yi_hat.
- The regression line always passes through (X_bar, Y_bar).
- TSS = sum (Yi - Y_bar)^2: total variation of Y around its mean.
- ESS = sum (Yi_hat - Y_bar)^2: variation explained by the model.
- RSS = sum ei^2 = sum (Yi - Yi_hat)^2: unexplained variation (what OLS minimises).
- TSS = ESS + RSS.
- Example: Y_hat = 40 + 0.8X; at X = 120, Y_hat = 136; if actual Y = 140, residual = 4.
R² (coefficient of determination)
- R² = ESS/TSS = 1 - RSS/TSS = 1 - sum ei^2 / sum (Yi - Y_bar)^2.
- Interpretation: R² = 0.90 means 90% of the variation in Y is explained by variation in X.
- 0 <= R² <= 1; R² = 0 means X explains nothing; R² = 1 is a perfect fit (all points on the line).
- R² never decreases when more independent variables are added, so it can be inflated by adding irrelevant variables.
Adjusted R² (R-bar²)
- R-bar² = 1 - [sum ei^2/(n-k-1)] / [sum (Yi - Y_bar)^2/(n-1)], with k = number of independent variables (k+1 parameters).
- Equivalently R-bar² = 1 - (1 - R²)(n-1)/(n-k-1).
- Some books let k denote the number of parameters including the intercept, giving n-k; be clear which convention is used.
- Adjusted R² can rise, fall or stay the same when a variable is added, and can be negative.
- Use: keep adding variables only while adjusted R² rises.
- Interpretation: share of variation in Y explained by X after adjusting for degrees of freedom.
Key terms
- TSS
- Total sum of squares, sum of squared deviations of Y from its mean.
- ESS
- Explained sum of squares, sum of squared deviations of fitted Y from mean Y.
- RSS
- Residual sum of squares, sum of squared residuals.
- R²
- Proportion of variation in Y explained by the regressors, ESS/TSS.
- Adjusted R²
- R² corrected for degrees of freedom; penalises adding regressors.
- Degrees of freedom
- Number of observations in excess of the number of estimated coefficients.
Lesson 3
Heteroscedasticity, Autocorrelation (Durbin–Watson) and Multicollinearity (VIF)
Multicollinearity arises when two or more independent variables are highly correlated, making it hard to isolate each variable's individual effect. It can be perfect or imperfect, has several causes, and is detected using signs such as high R² with low t-ratios, pairwise correlations, auxiliary regressions, VIF and the condition index.
Meaning and types
- Multicollinearity: high correlation among independent variables (e.g. weight and height explaining BMI).
- Perfect multicollinearity: exact linear relationship (e.g. total pay and hourly wage moving proportionally).
- Imperfect multicollinearity: high but not exact correlation (e.g. study hours and note-review hours).
Causes
- Model misspecification (wrong variables included or excluded).
- Redundant variables providing overlapping information.
- Insufficient data: small samples or limited range of values.
- Dummy variable trap: use k-1 dummies for k categories; using all k creates perfect multicollinearity.
- Overdetermined models with too many regressors.
- Time series data with common trends.
Detection
- High R² but few significant t-ratios.
- High pairwise correlation coefficients between regressors.
- Auxiliary regression (one regressor on the others): high R² and significant F indicate multicollinearity.
- Frisch confluence analysis using bunch maps.
- VIF = 1/(1 - R²_j): VIF = 1 none; 1 to 5 moderate (acceptable); above 5 high; above 10 severe.
- Condition index = sqrt(lambda_max/lambda_min) from eigenvalues of the regressor matrix; large values indicate multicollinearity.
Key terms
- Multicollinearity
- High correlation among two or more independent variables.
- Perfect multicollinearity
- Exact linear relationship among regressors.
- VIF
- Variance inflation factor, 1/(1-R²_j), where R²_j is from the auxiliary regression of regressor j.
- Auxiliary regression
- Regression of one independent variable on the other independent variables.
- Dummy variable trap
- Including a dummy for every category with an intercept, causing perfect multicollinearity.
- Condition index
- Square root of ratio of largest to smallest eigenvalue of the regressor matrix.
