BM21 Business Analytics · Module 5
Linear regression
Erasmus RSM
Line and coefficients
- Ordinary least squares: minimises the sum of squared residuals (SSR), not the absolute ones. Residual = observed minus predicted; the error term is unobservable
- Intercept = y when all x are zero. Slope b1 = change in y per +1 x, ceteris paribus, with units. Say "is associated with", not "causes"
Tests
- t-value = b/standard error. p-value = probability of an estimate at least as extreme if H0 is true; not the probability of H0. Not significant = no evidence, not "no effect"
- Confidence interval = b +/- about 2 x standard error; if it contains 0, not significant at 5%
- Prediction interval is wider than the confidence interval
Fit
- R-squared = SSE/SST = 1 - SSR/SST: share of explained variance, not causality. Rises with every predictor
- Adjusted R-squared = 1 - (1 - R2)(n - 1)/(n - k - 1): compare models with this
- F-test: H0 all slopes zero. Partial F-test: F = ((SSR_small - SSR_large)/q)/(SSR_large/(n - k - 1))
Dummy variables
- k categories gives k - 1 dummy variables; the omitted group is the reference category (the intercept belongs to it). Coefficient = difference with that group
Pitfalls
- Omitted variable bias: missing variable is related to both y and x; coefficient changes strongly
- Multicollinearity: larger standard errors, estimate stays unbiased. VIF = 1/(1 - R2_j), watch from about 5
- Extrapolation outside the range of x is unreliable
Forms of effects
- Quadratic term: marginal effect b1 + 2 b2 x
- Log transformation: log(y): about 100 x b percent per unit; log-log: elasticity
- Interaction term: effect of x1 = b1 + b3 x2; b1 holds at x2 = 0
- Standardized coefficient: compare predictors (taxes -0.351 stronger than rooms 0.245). Mediation: indirect = a x b
Reading R output
- Energy (n = 211): slope pCool 0.14, SE 0.1127, t = 1.242, p = 0.216; R2 0.0073 (adj 0.0026)
- Without 2 outliers: slope 0.378, p = 0.047
- Homes: lotsize -0.203 (t = -11.35), taxes and rooms not significant; R2 0.6384, adj 0.6214 = 1 - 0.3616 x 89/85
- Partial F (style): F = 6.385 (4 and 83 df), p = 0.0002: style adds. Interaction rooms x region: p = 0.58, AIC 1042.6 versus 1044.2: not needed
Question 7.2 (9 p, 250 words)
- Coefficients with units, ceteris paribus (2 p)
- p-values: significant or not, under H0 (2 p)
- Model fit: R-squared, RSE (2 p)
- Sample: bias, validity (3 p)
Key terms (never translate)
ordinary least squaresresidualerror terminterceptslopeceteris paribusR-squaredadjusted R-squaredstandard errort-valuep-valueconfidence intervalprediction intervaldummy variablereference categoryomitted variable biasmulticollinearityVIFstandardized coefficientinteraction termF-testpartial F-testmediationmoderationextrapolationlog transformationelasticityquadratic termunbiasedsimple linear regressionmultiple regressionregression coefficientSSTSSRcoefficient of determinationgoodness of fitF-statisticmodel assumptionsheteroskedasticitymodel specificationbiasefficiencyparsimonious modelmediation analysisnon-linear effectpolynomial termprediction