Ordinary least squares
Models the conditional mean of a continuous outcome as a linear function of explanatory variables.
regress y x1 x2, vce(robust)MODEL CHOICE BEGINS WITH THE QUESTION
Regression describes how an outcome varies with one or more explanatory variables. The appropriate model depends on the outcome, data structure, and whether the goal is description, prediction, or causal inference.
OUTCOME · DESIGN · ASSUMPTIONS · INTERPRETATIONMETHOD OVERVIEW
These are related tools, not interchangeable recipes. Select the design before reaching for the command.
Models the conditional mean of a continuous outcome as a linear function of explanatory variables.
regress y x1 x2, vce(robust)Estimate the probability of a binary outcome; multinomial and ordered models extend the framework.
logistic y x1 x2Model non-negative event counts, with negative binomial useful when variation exceeds the Poisson mean.
poisson y x, exposure(e) irrEstimates how predictors relate to a chosen conditional quantile rather than only the conditional mean.
qreg y x1 x2, quantile(.5)Uses an exogenous instrument to isolate variation in an endogenous explanatory variable.
ivregress 2sls y x1 (x2 = z)Uses variation across units and over time, often accounting for time-invariant unit characteristics.
xtreg y x1 x2, feCompares outcome changes over time between a treatment group and a comparison group.
regress y i.treat##i.postEstimates a local treatment effect when assignment changes discontinuously at a known threshold.
rdrobust y running, c(cutoff)QUICK ORIENTATION
PUT IT INTO PRACTICE