- Learn
- Business & Economics
- Economics
- Econometrics 1
- Functional Form and Dummy Variables
Functional Form and Dummy Variables in Regression
IntermediateLesson 4 of 8 in Econometrics 1 Course
What you will learn
- Write and interpret regressions with the natural logarithm of the outcome, of a regressor or of both, and decide when logs suit the data.
- Interpret coefficients in log-level, level-log and log-log modelsRead each coefficient as a percentage change per unit, a change per percent or an elasticity, and know when the approximation is close enough.
- Decide when to use logs and how units change the estimatesChoose between levels and logs from the nature of each variable, handle zeros and negative values, and see how rescaling a variable changes some estimates and leaves others unchanged.
- Interpret coefficients in log-level, level-log and log-log models
- Use quadratic terms and interactions so that the effect of one variable can change with its own level or with another variable, and report those effects correctly.
- Use quadratics to model changing marginal effectsEstimate a quadratic, compute the marginal effect at chosen values and the turning point, test whether the curvature matters and report a meaningful summary effect.
- Interpret interaction terms between continuous variablesInclude the product of two regressors, compute how the effect of one depends on the other, center the variables for easier reading and test the interaction.
- Use quadratics to model changing marginal effects
- Judge competing models with adjusted R-squared, information criteria and economic reasoning, and turn an estimated equation into predictions with honest intervals.
- Compare models with adjusted R-squaredCompute adjusted R-squared, see why it can fall when a regressor is added, use it and information criteria to choose between nonnested models, and avoid reading too much into goodness of fit.
- Build confidence and prediction intervalsPredict the outcome at chosen regressor values, give a confidence interval for the average outcome and a wider prediction interval for one new unit.
- Predict from a log model and analyze residualsTurn a prediction of log(y) into a prediction of y, compare the fit of models for y and for log(y), and use residuals to find unusual observations.
- Compare models with adjusted R-squared
- Code categories as 0/1 variables, interpret intercept and slope differences between groups and test whether groups follow the same regression.
- Interpret a single dummy variableDefine a dummy, choose the base group, read its coefficient as a group difference with other factors held fixed and convert it to an exact percentage in log models.
- Use several dummies for categories and ordered informationCode a variable with g categories as g−1 dummies, read each coefficient against the base group, change the base, test whether the categories matter and handle ordered categories.
- Interact dummies with other variablesLet groups differ in slopes as well as intercepts, interpret dummy-by-dummy and dummy-by-continuous interactions, and test which differences matter.
- Test for differences between groups with the Chow testTest whether one regression holds for two groups, compute the Chow F statistic from sums of squared residuals and choose between the full and the slopes-only version.
- Interpret a single dummy variable
- Regress a 0/1 outcome on explanatory variables, read the coefficients as changes in probability and recognize where the linear probability model breaks down.
- Estimate and interpret a linear probability modelWrite the model for a binary outcome, read coefficients in percentage points, compute predicted probabilities and judge how well the model classifies.
- Recognize the limits of the linear probability modelSpot predicted probabilities outside 0 and 1, implausible constant effects and built-in heteroskedasticity, and use the model where it works well.
- Estimate and interpret a linear probability model
Functional Form and Dummy Variables study guide
1Use logarithms to model percentage effects and elasticities
An extra year of education is measured in years, while a wage increase is often described as a percentage. Logs let one regression connect those two kinds of change. Learn how the position of a log changes the meaning of a coefficient, when an approximation needs an exact calculation, and how the data’s zeros, units and economic meaning guide the choice of form. Keep the outcome scale in view when comparing fitted models.
1.1 Read effects in levels and logs
A coefficient gets its meaning from the variables on both sides of the equation. Before interpreting its size, identify whether each variable is in levels or natural logs. In a multiple regression, keep the other regressors fixed throughout the comparison.
Match the form to the effect
| Form | Equation for the fitted relationship | Reading for a small change |
|---|---|---|
| Level-level | units | |
| Log-level | ||
| Level-log | units | |
| Log-log |
The natural log turns ratios into differences. Going from 100 to 105 gives a log change of 0.0488, so multiplying by 100 gives 4.88, close to the actual 5% change. Going from 100 to 150 gives 0.405, so the same approximation gives only 40.5% for a 50% change.
Work a log-level comparison
Suppose , where education is in years. One more year changes the fitted log wage by 0.075. This is approximately 7.5% higher wage: the coefficient is a semi-elasticity, a percentage effect per unit of a level regressor.
For a finite change, exponentiate the change in the fitted log:
One year gives . Four years gives , which is meaningfully larger than 30%. A log change of −0.30 gives −25.92%; equal and opposite log changes do not produce equal and opposite percentage changes. The exact calculation is especially useful when the absolute log change exceeds about 0.1.
Separate an elasticity from a change in points
In , 0.25 is an elasticity. A 1% increase in sales goes with approximately 0.25% higher salary. For a 10% increase, the exact effect is . A demand elasticity of −1.2 similarly gives for a 10% price increase. Elasticities have no units.
A level-log model keeps the outcome in units. With , a 1% income increase adds approximately 0.12 test points. A 10% increase adds points; doubling income adds points.
If an outcome is itself a percentage, its level changes are percentage points. Unemployment moving from 8% to 10% rises by 2 points and by 25% relative to its original rate.
Keep the log base straight
Here, log means natural log. Replacing natural logs with base-10 logs divides a log-level slope by 2.303 and multiplies a level-log slope by 2.303. A log-log slope stays the same if both logs change base together. A transformation changes the measurement of an effect; a causal reading still requires regressors unrelated to unobserved determinants in the error.
Key Takeaways
- Identify both variable forms before attaching units or percentages to a coefficient.
- A log-level coefficient gives an approximate percentage effect of per unit.
- Use for an exact finite percentage change.
- A log-log slope is an elasticity; a level-log slope gives outcome units per proportional change.
- Percentage points measure differences between rates; percent changes use a starting value.
- Changing log bases changes semi-elasticity readings; changing form does not establish causality.
1.2 Choose logs and keep track of units
Choosing a functional form begins with the kind of change the question asks about. A constant addition suggests levels. A constant proportional change suggests logs. The observed values must also permit the transformation.
Decide what a log represents
Strictly positive wages, prices, sales and large counts often enter in logs. Education, experience and age usually stay in years. Rates and proportions can enter either way, but levels are common because their effects then have a direct percentage-point reading.
Positive money amounts often have a long right tail: a few firms or households have much larger values than most. Logging compresses that tail and can make the spread more even. It may reduce the influence of very large values and bring the distribution closer to normal. Inspect the data; these improvements are tendencies, not automatic results of pressing a log command.
Deal with zeros before estimating
The natural log of zero or a negative value is undefined. Donations can be zero; profits can be negative. Dropping those observations changes which population the regression describes. If zero donors differ systematically from positive donors, interpreting the remaining sample as all households can be misleading.
The transformation keeps zeros, but changes the relationship being modeled. Near zero, a coefficient in this model is not a percentage effect on the original outcome. When many values are zero, a level model or a model designed for such outcomes is usually more useful. A dummy takes values zero and one and stays in levels.
Rescale levels without changing the evidence
If the dependent variable is divided by 1,000, every coefficient and its standard error is divided by 1,000. A sales equation in thousands of currency units reports smaller numbers because its outcome unit is larger. Each t statistic is unchanged because its numerator and denominator shrink together.
If only a level regressor is multiplied by a constant, its slope and standard error are divided by that constant. For example, replacing kilometers by meters multiplies distance by 1,000. A slope of −2 per kilometer becomes −0.002 per meter. The other coefficients, t statistics, p-values and stay the same. This rule refers to rescaling one regressor column; if a model also contains its powers or products, transform those terms consistently.
Rescale logged variables
For a logged outcome, multiplying its original units by 100 adds to the intercept. The slopes stay the same because every logged outcome shifts by the same amount. For a logged regressor, multiplying the original variable by a positive constant shifts its log and changes the intercept, leaving its slope unchanged. A floor-area elasticity is therefore the same with area recorded in square meters or square centimeters.
A level regressor in a log-level model still has units. The semi-elasticity per kilometer is 1,000 times the semi-elasticity per meter.
Judge forms on a common outcome
The of a wage regression measures variation in wages; the of a log-wage regression measures variation in log wages. Their numerical sizes cannot choose between the models. Convert the log model's predictions back to wage units with the appropriate mean correction before comparing prediction errors. Use economic reasoning to choose plausible forms and residual plots to look for missed patterns. Logs do not repair omitted-variable bias or reverse causality.
Key Takeaways
- Use logs for proportional relationships and strictly positive variables.
- Zeros and negatives cannot enter an ordinary natural log; dropping them changes the sample.
- Coefficients on do not generally give percentage effects on small values of .
- Rescaling a level variable changes coefficients and standard errors together, leaving t statistics unchanged.
- Rescaling a logged variable changes the intercept, leaving its slope unchanged.
- Compare predictions of the same outcome, not values for different outcome transformations.
2Model nonlinear and interacting effects
Experience can raise wages strongly at first and weakly later, while fertilizer can work better when there is more rain. Quadratics and interactions describe these changing effects within an OLS regression. Work from the full fitted expression to find slopes, finite changes and useful reference points. The same expression also tells you which coefficient restrictions answer a question about curvature or dependence between effects.
2.1 Find slopes and turning points in quadratics
A straight-line slope cannot describe an effect that grows or fades as the regressor changes. A quadratic adds the square of that regressor. OLS can estimate it because the unknown coefficients still enter linearly.
Read the slope of the whole expression
For , the marginal effect is
The coefficient on the unsquared term is the slope at zero. It is not the slope everywhere. Consider hourly wage in currency units:
The slope is . It equals 0.24 at 10 years and 0.08 at 20 years. Experience still raises fitted wage at both values, but each additional year has a smaller marginal effect.
Distinguish a slope from a whole step
At 10 years the fitted wage is 8.200. At 11 it is 8.432, a rise of 0.232. The derivative at 10 is 0.24 and describes a very small change near that point. For a quadratic, the exact one-unit change equals the slope at the midpoint: . For larger changes, subtract the two fitted values.
Locate the peak or minimum
Set the slope equal to zero:
Here the turning point is 25 years and the fitted wage is 10.00. A negative squared-term coefficient makes this a maximum; a positive one makes the turning point a minimum. Check the observed range before reporting a reversal. If few workers have more than 25 years of experience, the falling side of this fitted curve has little data behind it.
Choose the test that answers the question
A t test of tests curvature. An F test of tests whether experience contributes at all. Correlation between experience and its square can make individual estimates imprecise; it does not make a quadratic ineligible for OLS.
Report slopes at meaningful values, such as quartiles. The average partial effect averages the observation-specific slopes. For a quadratic it equals the slope at the sample mean. At mean experience of 15 years it is currency units per hour for a marginal extra year.
Combine curvature with a logged outcome
Suppose the fitted log price includes . The slope at six rooms is 0.17 log units per room, approximately 17%. A whole room changes the slope along the way. From six to seven rooms the fitted log changes by , giving . From seven to eight the exact increase is 41.91%.
A cubic adds a third-power term and gives slope . Test the highest power, or added powers jointly, to judge whether the extra flexibility is supported.
Key Takeaways
- A quadratic is nonlinear in the regressor and linear in its coefficients.
- The marginal effect is ; finite changes come from subtracting fitted values.
- The turning point is and needs support within the observed range.
- Test the square for curvature and both terms jointly for any contribution of the regressor.
- The quadratic APE equals the slope evaluated at the sample mean.
- With log outcomes, compute the finite change in the fitted log before exponentiating.
- Added polynomial powers can be tested individually or jointly.
2.2 Let one effect depend on another variable
An interaction models a relationship in which the effect of one regressor depends on the level of another. Form the product of the two variables and include both original variables in the regression.
Work out both partial effects
In , hold the second variable fixed while changing the first. Both terms containing the first variable change, so
The interaction coefficient is the change in one marginal effect when the other regressor increases by one unit.
Follow an agricultural example
Let yield be tonnes per hectare, fertilizer be kilograms per hectare, and rainfall be centimeters during the growing season:
The fertilizer effect is . At rainfall of 20, 40 and 60 cm it equals 0.014, 0.016 and 0.018 tonnes per hectare per extra kilogram of fertilizer per hectare. At fixed rainfall of 40 cm, adding 100 kg per hectare raises fitted yield by 1.6 tonnes per hectare. The equation is linear in fertilizer once rainfall is fixed, so that comparison is exact for this fitted form.
A positive interaction means the inputs reinforce each other's effects. It does not determine either effect's sign: each effect also includes its main coefficient. The fertilizer coefficient 0.012 describes a season with zero rain, which may be far outside the sample.
Center the variables to move the reference point
Define centered fertilizer as fertilizer minus 100 and centered rainfall as rainfall minus 40, their sample means. Regress yield on these two centered variables and their product, keeping an intercept. The fertilizer coefficient becomes . The rainfall coefficient becomes . The new intercept is the fitted yield at both means, 3.9.
Centering leaves the interaction coefficient, fitted values and unchanged. It also provides the standard error for an effect at that reference point directly from the relevant main coefficient's output.
Keep tests and restrictions clear
A t test of asks whether the first effect varies with the second variable. An F test of asks whether the first variable contributes at all. A small t statistic on the main effect only concerns the other variable's zero point.
Dropping the first main effect forces its partial effect to zero when the second regressor is zero and changes the model. Report effects at useful values or average them: here the average fertilizer effect is its effect at mean rainfall. For interactions with logs or powers, first differentiate the full fitted expression, then evaluate it at the values of interest.
Key Takeaways
- An interaction makes each variable’s effect depend on the other variable.
- The coefficient on a product measures the change in a marginal effect per unit of the other regressor.
- Main coefficients refer to the other variable’s zero point; centering moves that point.
- Centering preserves fitted values, interaction coefficients and .
- Test the product for dependence of effects; test the main and product terms jointly for any contribution.
3Compare specifications and make predictions
A model that fits more closely is not always the model that best answers an economic question. Compare fit with a charge for extra parameters, then distinguish the targets behind a point prediction and its interval. Returning a log prediction to original units requires care because a mean and an exponentiated fitted log are different quantities. Residuals help locate observations that the fitted relationship leaves unexplained.
3.1 Compare fit while accounting for model size
Adding regressors gives OLS more ways to fit the same observations. The residual sum of squares cannot rise, so ordinary R-squared cannot fall. Choosing every new term that raises it would always favor the largest candidate model.
Charge for extra parameters
With an intercept, . Adjusted R-squared replaces the two sums of squares by their degrees-of-freedom-adjusted values:
Here is the sample size and counts slopes, excluding the intercept. With 100 observations, four slopes and , adjusted R-squared is 0.2705. A fifth slope that raises R-squared only to 0.305 lowers the adjusted measure to 0.2680. If R-squared reaches 0.310, the adjusted measure rises to 0.2733. The improvement in fit must offset the lost residual degree of freedom.
Adjusted R-squared can be negative. With 20 observations, eight slopes and R-squared of 0.30, it is −0.209. This signals poor fit after the size adjustment; it is not a negative share of explained variation.
Relate the adjustment to a test
Adding one regressor raises adjusted R-squared exactly when its conventional OLS t statistic has absolute value above one. For several added terms, the corresponding conventional F statistic must exceed one. These are weaker thresholds than a 5% significance test. A new term with a t statistic of 1.5 improves adjusted R-squared while remaining statistically insignificant at 5% in a large sample.
Compare different specifications
Models are nonnested when neither can be obtained by restrictions on the other. A log-salary model with log sales and one with sales plus sales squared are an example. A direct nested-model F test does not compare these two, but adjusted R-squared can help if both use the same dependent variable and observations.
Information criteria also balance fit and size. Let the parameter count be , including the intercept:
Prefer the smaller value. At sample sizes of at least eight, BIC has the larger penalty per parameter. With 200 observations, a four-parameter model with SSR 500 has AIC 0.956 and BIC 1.022. A six-parameter model with SSR 485 has AIC 0.946 and BIC 1.045. AIC favors the larger model while BIC favors the smaller one. Small differences provide limited evidence.
Match controls to the question
Fit is separate from causal validity. A high R-squared cannot establish causality, and a low one does not make OLS biased. To estimate a tax's total effect on traffic deaths, controlling for the consumption through which the tax works blocks part of that effect. This is overcontrolling.
A control that predicts the outcome and is unrelated to the regressor of interest can reduce error variance and usually improve precision; sample correlation and lost degrees of freedom can still increase a reported standard error. Begin with economic reasoning, test nested restrictions, compare suitable nonnested alternatives and inspect residual patterns. Report the specifications considered; selecting the smallest p-value from many attempts overstates the evidence.
Key Takeaways
- Ordinary cannot decrease when regressors are added on the same sample.
- Adjusted penalizes lost residual degrees of freedom and can be negative.
- The improvement rule uses conventional OLS tests: absolute t above one, or group F above one.
- Compare nonnested models only on the same outcome and observations.
- Smaller AIC or BIC is preferred; BIC penalizes size more when .
- Choose controls for the causal question, not just for fit.
3.2 Give intervals for a mean and for one outcome
A fitted equation gives one point prediction at chosen regressor values. The interval around it depends on what you want to predict: the average outcome at those values or one new observation.
Set the prediction target
For chosen values , calculate
This estimates the conditional mean, . It also predicts one new outcome, but that outcome includes its own unobserved deviation: . Even perfect knowledge of the mean would not reveal that person's error.
Find uncertainty in the fitted mean
Prediction software combines all coefficient variances and covariances to calculate . An equivalent method is to subtract each chosen value from its regressor and re-estimate with an intercept. The new intercept equals the fitted mean at the chosen values; its standard error is the required prediction standard error. Center all design columns consistently, including any powers and products used in the fitted model.
Under the usual homoskedastic OLS formula, the fitted mean's standard error is smallest at the vector of sample regressor means. Combinations far from the sample center generally have more estimation uncertainty. Correlations between regressors matter, so distance is measured jointly, not by looking at one variable alone.
Calculate the two intervals
For the standard normal-error, constant-variance model, a 95% confidence interval for the conditional mean is
Here the t value leaves 2.5% in the upper tail. For a new independent observation, add its error variance:
The 95% prediction interval is . The regression standard error describes the unexplained spread of individual outcomes.
Suppose a score model uses 200 observations and three slopes. At the chosen characteristics, the fitted score is 52.0, its standard error is 0.8, and the regression standard error is 6.0. The residual degrees of freedom are 196 and the critical value is 1.972.
The mean interval is , or approximately 50.42 to 53.58 points. The prediction standard error is . The individual interval is approximately 40.06 to 63.94 points. Using the narrow mean interval for a particular student would ignore nearly all of the uncertainty.
Know what greater sample size fixes
As the estimation sample grows, uncertainty in the conditional mean shrinks. The new individual's unobserved error remains, so the prediction interval approaches a width governed by on each side. Normal errors and constant conditional variance justify the individual interval above. If error variance changes across regressor values, one common variance gives the wrong width in some regions. At values beyond the data, the fitted form itself may fail; a computed interval does not resolve that extrapolation problem.
Key Takeaways
- A mean interval reflects coefficient estimation uncertainty.
- An individual prediction interval also includes the new observation’s error variance.
- Add variances before taking the square root: .
- An individual interval stays wide even when the mean is estimated precisely.
- The standard individual interval requires normal errors with constant variance and a reliable functional form.
3.3 Return log predictions to outcome units
A regression for log spending predicts log spending. Exponentiating its fitted value brings the scale back to spending units, but a further step is needed to predict average spending. This matters when predictions will be summed into a total.
Explain the missing factor
Write the model as . Then , so
A zero mean for the log error does not make the mean of its exponential equal to one. Exponentiation is curved: positive log errors raise the outcome more than equal negative log errors lower it. Simply using therefore misses a factor in the conditional mean.
If the error is normal with constant variance and independent of the regressors, the uncorrected exponential estimates the conditional median. The factor for the mean is .
Apply the normal correction
A house-price equation gives a fitted log price of 11.80 and a regression standard error of 0.30. First exponentiate the fitted log: currency units. Square the standard error and halve it: . The correction factor is . Carrying unrounded values gives a mean prediction of about 139386 currency units.
The variance belongs in the correction, not the standard error itself. Using would overcorrect this prediction.
Estimate a smearing factor
Normality is not required for a smearing estimate. Take the log regression's residuals, exponentiate each one and average:
A factor of 1.05 gives about 139915 currency units in the house example. With an intercept, residuals average zero and their average exponential is at least one. A further way to estimate a common factor is the slope from regressing the original outcome on the exponentiated fitted log without an intercept.
A common correction assumes the error distribution does not change with the regressors. If log-error spread differs by group, one pooled factor can mispredict particular groups. The absence of a normality assumption does not remove this requirement for a common factor.
Compare predictions on the same scale
To compare level and log models, convert the log-model predictions to outcome units. Squared correlation between outcomes and predictions measures how well their variation tracks. A value of 0.66, compared with a level-model R-squared of 0.62, favors the log model on that particular measure. Correlation ignores a common scale error, so compare mean squared prediction errors to judge accuracy in original outcome units.
Read residuals against the correct reference
A level residual is observed minus fitted outcome. A negative log residual of −0.15 means the observed outcome is below the exponentiated fitted log value. Its reference is the uncorrected exponential, not the corrected mean. Large residuals can flag unusual observations, but they also contain omitted characteristics and measurement error. A house selling below its fitted value may have an unrecorded defect.
Key Takeaways
- Exponentiating a fitted log omits the factor needed for a mean.
- The normal correction is .
- Smearing averages exponentiated log residuals and avoids assuming normality.
- One common correction factor requires a stable error distribution across regressor values.
- Correlation measures tracking; mean squared error detects mistakes in prediction scale.
- A log residual compares the observed outcome with the exponentiated fitted log.
4Represent qualitative information with dummy variables
Groups such as regions, union members and program participants carry information that a numerical slope alone cannot represent. Indicators turn that information into comparisons with a clear base group. Interactions let the comparisons change across other characteristics. Build group equations, compare categories and use joint restrictions to test whether one regression can describe two groups.
4.1 Read a dummy as a group comparison
Qualitative information can enter a regression through a dummy, also called an indicator or binary variable. Code membership as one and nonmembership as zero. A name such as union or treated makes the direction of the comparison visible.
Read the two fitted lines
Consider . Set union to zero to obtain the nonunion line. Set it to one to obtain the union line:
| Group | Intercept | Education slope |
|---|---|---|
| Nonunion, the base | ||
| Union |
The dummy coefficient is the union-minus-nonunion wage gap at the same education. Because the slopes are equal, these fitted lines are parallel.
For , a worker with 12 years of education has predicted hourly wage 10.20 currency units outside a union and 11.60 in a union. The gap is 1.40 at every education level. The negative intercept describes zero years of education, outside the relevant data, and need not have a useful economic interpretation.
Leave a base group
With an intercept, including both union and nonunion creates perfect collinearity: their values add to one for every observation. The regression cannot distinguish the intercept from the two group indicators. Omit one dummy; its group becomes the base group. A model without an intercept can instead include both indicators and estimate a separate intercept for each group.
With only one dummy and an intercept, the intercept is the base group's sample mean and the dummy coefficient is the difference between sample group means. The dummy's sample mean is itself a group share: if 0.35 is the mean of union, 35% of the observations are union members. The usual common-variance t test on the coefficient is the corresponding equal-means test. Adding controls changes the comparison to groups with the same recorded characteristics.
Convert a log gap to a percentage
With log wage as the outcome, a dummy coefficient of 0.18 means an approximate 18% union premium. The exact fitted percentage gap is . This compares the exponentiated fitted log values; it also compares conditional means when both groups have the same retransformation factor. A coefficient of −0.20 gives −18.13%, not −20%.
Reversing the comparison changes the denominator. If union wages are 19.72% above nonunion wages, nonunion wages are below union wages. The percentage gaps are not symmetric.
Interpret a treatment indicator
A treatment dummy can mark job-training participation. Its coefficient measures a causal effect when treatment is unrelated to unobserved determinants given the controls. Random assignment provides that independence; use pretreatment characteristics for adjustment. With voluntary participation, motivation may raise both participation and later wages, inflating the apparent benefit. Controls can reduce such differences without necessarily removing them.
Key Takeaways
- A dummy equals one for the named condition and zero otherwise.
- With an intercept and one dummy, its coefficient compares that group with the omitted base.
- A dummy without interactions shifts the intercept and leaves slopes equal.
- Including every category dummy with an intercept causes perfect collinearity.
- For a log outcome, the exact fitted percentage gap is .
- A treatment coefficient needs independence from unobserved determinants for a causal reading.
4.2 Code categories and compare their effects
A category label such as region has no natural numerical distance. Use a set of indicators so that a regression can estimate its group differences without assuming a meaningful spacing between labels.
Choose one reference category
For a classification with mutually exclusive categories, include dummies alongside an intercept. The omitted category is the base. Each coefficient compares its category with that base, holding the other regressors fixed. Coding north as one, east as two and so on would impose both an order and equal steps in the effect.
Suppose a log-wage equation uses north as the base and estimates east 0.04, south −0.06 and west 0.10. South versus north has a log gap of −0.06 and an exact fitted percentage gap of . West versus south requires subtraction: , giving . Adding the coefficients would compare the wrong quantities.
Change the base to get a direct comparison
If south becomes the base, the intercept falls by 0.06. The new coefficients are north 0.06, east 0.10 and west 0.16. These are alternative coordinates for the same fitted relationships. Fitted values, R-squared and slopes on other variables do not change.
To test west against south, re-estimating with south as the base provides the west-minus-south coefficient and its standard error directly. The separate standard errors from the old regression are not enough to calculate the uncertainty of their difference: the covariance between the two coefficient estimates matters too.
Test the classification jointly
With four regions, test all three dummy coefficients equal to zero using an F test. This asks whether any regional difference contributes after controlling for the other regressors. Individual t tests ask narrower questions, each against the base. They can all be insignificant while a joint test rejects. With three restrictions and 495 residual degrees of freedom, the 5% critical F value is about 2.62.
Several classifications can enter together. A model with region dummies and industry dummies has one base for each. Without products between them, it imposes the same regional gaps in every industry. Different regional gaps across industries need interactions.
Decide how to use ordered information
An ordinal variable has a meaningful order but not necessarily meaningful distances. A credit rating from zero through four is an example. Using it as one numerical regressor assumes each one-level move has the same effect. Dummies allow a separate effect for each level.
Against rating zero, coefficients 0.08, 0.16, 0.24 and 0.32 match equal steps of 0.08. Coefficients 0.02, 0.05, 0.25 and 0.30 do not: the largest jump is between ratings two and three. Test the restrictions that all level effects are multiples of one step to assess the single-number model.
Age-band dummies similarly allow an irregular shape across age ranges. They discard within-band age variation and use a parameter for each included band. Finer categories offer flexibility but consume more degrees of freedom, which matters especially in a small sample.
Key Takeaways
- Use dummies for categories with an intercept.
- Subtract category coefficients to compare two non-base groups.
- Changing the base preserves predictions and provides a direct standard error for a new comparison.
- A joint F test asks whether a classification contributes at all.
- One numerical ordinal regressor imposes equal steps; category dummies relax that restriction.
4.3 Read group differences when slopes can differ
A single dummy allows an intercept shift. Interacting it with another variable allows the group gap to change. Write out the fitted expression for each group before interpreting a coefficient in isolation.
Combine two dummies
Suppose a fitted log-wage equation contains . Nonunion private-sector workers have all three terms equal to zero and form the base.
| Group | Fitted log gap from the base |
|---|---|
| Union, private | |
| Nonunion, public | |
| Union, public |
The interaction −0.09 is not the whole gap for union public-sector workers. It is the extra adjustment beyond the two main effects. The union gap is 0.12 in the private sector and in the public sector. Their difference is −0.09. Coding three of the four combined groups directly produces the same fitted values.
Let a continuous slope differ
For , substitute each value of the dummy:
- Group zero: .
- Group one: .
The group gap at a chosen value is . The interaction is the slope difference, and the dummy's main coefficient is the gap only at zero.
Consider . The education slopes are 0.085 for nonunion workers and 0.073 for union workers, approximately 8.5% and 7.3% per year.
At 12 years of education, the union log gap is . The exact fitted wage gap is . At 16 years it is 0.108 log units, or 11.40%. Reading 0.30 as the premium for all workers would miss the interaction.
Move the comparison to a useful value
Center education at 12 by using education minus 12 and its product with union. The dummy coefficient becomes 0.156, making the gap at 12 years visible directly. Predictions and the slope difference stay the same. The original lines cross at 25 years of education, outside typical schooling values; the positive gap over the observed range matters more than that extrapolated crossing.
Test the relevant group terms
A t test of asks whether the education slopes differ. An F test of asks whether the fitted group relationships differ at all. Correlated estimates can produce small individual t statistics alongside a significant joint F statistic.
Interacting the group dummy with every regressor gives each group its own intercept and slopes. Its fitted coefficients reproduce separate group regressions. Testing all these group terms together leads to the Chow test.
Key Takeaways
- Two dummies and their product describe four combined groups.
- A dummy-by-dummy product measures a difference between group gaps.
- A dummy-by-continuous product measures a slope difference.
- The group gap is , not just the dummy coefficient.
- Centering makes the dummy coefficient the gap at a meaningful value.
- Test slope differences separately from all group differences.
4.4 Test whether groups share one regression
The Chow test compares one regression for two groups with a model that lets each group have its own coefficients. The full test includes the intercept difference. A slopes-only test answers a different question by allowing that intercept difference under the null.
Define the two models
Use the same outcome, regressors and observations in every comparison. Let each group equation contain an intercept and slopes. The restricted pooled model estimates one set of coefficients. The unrestricted model estimates two sets, or coefficients. Thus the full null imposes equality restrictions.
Estimate the pooled model to obtain . Estimate each group separately to obtain and . The unrestricted SSR is their sum. The pooled restriction can only worsen fit or leave it unchanged.
Calculate the full statistic
The loss in fit per restriction is divided by the unrestricted error-variance estimate:
There are numerator and denominator degrees of freedom. Count the unrestricted parameters when finding the denominator.
For groups of 220 and 180 observations, three slopes, pooled SSR 1250 and separate SSRs 560 and 610, the unrestricted SSR is 1170. The restriction costs 80 SSR units. Divide by four restrictions to get 20; divide 1170 by 392 residual degrees of freedom to get the error-variance estimate. The resulting F statistic is 6.70, above the 5% critical value of about 2.39. The p-value is below 0.001, so the common-coefficient null is rejected.
Allow different intercepts under the null
For a slopes-only test, the restricted regression already contains a group dummy. This allows separate intercepts while imposing equal slopes. Its SSR replaces the fully pooled SSR in the numerator, and there are only restrictions. The unrestricted denominator is unchanged.
If that restricted SSR is 1205, the statistic is . The 5% critical value for three and 392 degrees of freedom is about 2.63. Equal slopes are rejected even after allowing an intercept shift. Using 1250 in this slopes-only calculation would charge an intercept restriction that this null does not impose.
Use a single interacted regression
Include the group dummy and its product with every regressor. A joint test that the dummy and all products equal zero reproduces the full Chow test. Test just the products to compare slopes with intercepts allowed to differ. For more than two groups, the full equality test has restrictions.
The classical SSR-based F test assumes homoskedastic errors with a common variance across groups; normal errors give its exact finite-sample F reference. If variances differ, use a heteroskedasticity-robust joint test of the group terms. Rejection identifies some difference, not its location. Inspect the relevant coefficients; failure to reject can reflect limited precision. The same equality idea applies to observations before and after a known break date.
Key Takeaways
- The full Chow null equates the intercept and all slopes across groups.
- With two groups, it imposes restrictions and leaves unrestricted residual degrees of freedom.
- Add separate-group SSRs to obtain the unrestricted SSR.
- A slopes-only test includes the group dummy under the null and tests only slopes.
- A fully interacted regression provides the same group comparison.
- Use a robust joint test when error variances differ; the classical SSR test requires a common variance.
5Model binary outcomes with the linear probability model
Employment, participation and approval are observed as yes-or-no outcomes, yet their probabilities can be modeled with OLS. Read a fitted value as a chance and a slope as a change in percentage points. The simplicity helps explain average effects, but it can also produce impossible probabilities and changing error variance. Check both the predictions and the uncertainty before deciding how well the model serves the question.
5.1 Interpret probabilities from an OLS regression
When an outcome is zero or one, its conditional mean is the chance of observing one. This lets an ordinary least-squares regression describe a probability directly. The resulting model is called the linear probability model, or LPM.
Translate a binary mean into a probability
For an employment indicator, zero means not employed and one means employed. The conditional average is . The LPM writes this probability as an intercept plus slopes times regressors:
Estimate the equation by OLS. A fitted value such as 0.68 represents a predicted probability of 68%, not an outcome of 0.68 for a person. Each actual outcome is still zero or one.
Read effects in percentage points
A slope of 0.04 means a one-unit increase in its regressor changes the probability by 0.04, or four percentage points. A probability rising from 0.50 to 0.54 rises by four points and by 8% relative to its starting value. Use points when reporting the slope's direct effect.
Consider the fitted employment equation
Education and age are in years, and train equals one for training participants. For age 30 and education 12, the prediction without training is . With training it is 0.68. The model assigns a 15-percentage-point training gap at every age and education level. Ten additional years of age reduce the prediction by five points.
Interpret dummy effects and averages
A dummy regressor compares probabilities between the group coded one and the group coded zero, holding the remaining regressors fixed. If it is the only regressor with an intercept, its coefficient is exactly the difference in the two sample shares with outcome one.
OLS with an intercept also makes residuals sum to zero. Consequently, the sample average fitted probability equals the sample share of ones. This equality describes an overall average; it does not establish accurate predictions for every subgroup.
Check classification for both outcomes
A common classification rule assigns one when the fitted probability is at least 0.5 and zero otherwise. Percent correctly predicted counts matches between these assignments and observed outcomes.
In a sample of 1000 people, suppose 600 have outcome one and 400 have outcome zero. If the model correctly classifies 510 of the ones and 250 of the zeros, it gets correct overall. The group-specific rates are 85% for ones and 62.5% for zeros. Reporting only the overall rate hides the weaker performance for zeros. Ordinary R-squared offers limited guidance for this binary-outcome task.
Separate prediction from a causal effect
The training coefficient is causal when participation is unrelated to unobserved determinants given the controls. Voluntary participants may be more motivated, and motivation may also improve employment prospects. The fitted probability gap then combines training with selection. The binary outcome does not change the usual requirements for interpreting regression coefficients causally.
Key Takeaways
- For a binary outcome, .
- LPM slopes measure probability changes; multiply by 100 to report percentage points.
- A fitted probability differs from the observed zero-or-one outcome.
- With an intercept, average fitted probability equals the sample share of ones.
- Report classification accuracy for both observed outcome groups.
- A treatment probability gap needs the usual independence condition for a causal interpretation.
5.2 Judge where a linear probability model works
The LPM is easy to estimate and explain because every slope gives a direct probability change. Its straight-line form also creates two problems: probabilities can escape their bounds, and individual-outcome variance generally changes with the probability.
Inspect predicted probabilities
In the employment equation , a 20-year-old participant with 20 years of education has fitted value 1.05. A 60-year-old nonparticipant with two years of education has fitted value −0.02. Neither is a valid probability. Count and report fitted values outside zero to one, and inspect where they occur.
A few invalid predictions in sparse parts of the sample need not erase useful estimates of average effects near its center. They do show that the equation cannot provide valid probabilities throughout that range.
Check how far a constant effect can extend
A slope of −0.26 on the number of children under six assigns the same 26-percentage-point reduction to each additional child. Four children would reduce the predicted probability by 1.04. No starting probability can absorb that drop while remaining within zero and one. The effect therefore cannot stay constant over that entire range.
Dummies for one child and two or more children allow different changes without requiring a straight line in the count. Such flexibility can improve the shape, but it still needs a check of the fitted probability bounds.
Use the binary variance formula
For a zero-or-one outcome with conditional probability ,
The regression error has the same conditional variance. It takes value when the outcome is one and when it is zero. At probability 0.5 its variance is 0.25; at 0.9 it is 0.09. A changing fitted probability generally means changing error variance: heteroskedasticity is built into the usual LPM setting.
Use heteroskedasticity-robust standard errors for inference. Conventional constant-variance standard errors and their associated t and F tests are unreliable here. The two-point error distribution is also nonnormal, so robust inference uses large-sample approximations.
Keep estimation and inference separate
Heteroskedasticity itself does not bias OLS coefficients. If the conditional mean is truly linear and the usual exogeneity condition holds, OLS estimates that linear probability relationship without bias. Unequal error variance changes uncertainty calculations. A misspecified conditional mean or omitted confounder is a separate source of trouble.
The LPM is often useful for average effects near the center of the regressor data. It is less reliable for predictions near zero or one and for combinations of characteristics in the tails. Nonlinear probability models such as logit and probit use an S-shaped function to keep predictions within the bounds and let effects flatten near the extremes. Near the middle, LPM slopes are often close to their average effects. Choose the model with the target in view: an average probability effect and an extreme individual probability demand different performance.
Key Takeaways
- Check and report fitted values outside zero to one.
- A constant probability effect cannot extend across a range that violates probability bounds.
- Binary conditional variance is and generally varies with regressors.
- Use robust standard errors and large-sample inference for an LPM.
- Unequal error variance does not itself bias OLS; a correct conditional mean and exogeneity still matter.
- Average effects near the data center are often more useful than tail predictions.
Functional Form and Dummy Variables examples
1Choose and interpret a log specification
11 steps
- 1IntroductionStart with the change you want to describe
A firm wants to know whether additional delivery distance adds a fixed cost or a fixed percentage of cost. Those are different relationships. A level-cost model describes the first; a log-cost model can describe the second.
Follow a fitted log-cost equation, calculate a finite change, and then check whether the units and observations support that reading.
- 2ExplanationIdentify the two scales
In a log-level model, the outcome is logged while the regressor remains in its original units. The coefficient measures a proportional outcome change per regressor unit.
For , with distance in kilometers, the slope means approximately 4% more cost per extra kilometer. It is not an addition of 0.04 currency units.
- 3ExampleFind the fitted log change first
Compare trips that differ by three kilometers, holding other characteristics fixed. The intercept cancels when the fitted equations are subtracted:
The calculation gives a change in the log, not yet the exact percentage cost change. Multiplying by 100 gives a 12% approximation.
- 4ExampleConvert the log difference into a percentage
A log difference of 0.12 means the ratio of the two fitted exponential values is , approximately.
Subtract one and multiply by 100:
The exact fitted increase exceeds the 12% approximation. Reversing the trip comparison uses a log change of −0.12 and gives an 11.31% decrease, because the starting cost is now different.
- 5ChallengeTry a negative log change
A fitted log-cost change is −0.16. What is the exact percentage change in fitted cost?
---reveal---
The −16% figure is the small-change approximation. Exponentiating returns a cost ratio of about 0.8521, which must be compared with one before it becomes a proportional change.
- 6ConnectionMove the log to the regressor
If cost stays in levels but distance is logged, a slope of 20 gives approximately 0.20 currency units per 1% distance increase. For a 10% rise, the exact addition is units.
If both cost and distance are logged, the slope is an elasticity. A slope of 0.4 means about 0.4% higher cost for 1% more distance.
- 7ExplanationCheck which observations permit logs
A strictly positive, right-skewed cost variable often suits a log model. But a zero cost has no natural log, and a negative amount cannot enter one either.
Removing zero-cost observations changes the sample to trips with positive costs. Before interpreting results for all trips, ask whether the excluded observations differ systematically. Adding one permits zeros but changes the quantity being logged and its coefficient’s meaning near zero.
- 8ExampleChange distance from kilometers to meters
The same equation records a slope of 0.04 per kilometer. A kilometer contains 1000 meters, so the slope per meter becomes .
A three-kilometer trip difference is now 3000 meters, producing the same fitted log change: . The coefficient’s standard error also divides by 1000, leaving its t statistic unchanged.
- 9Key InsightChanging outcome units shifts a logged intercept
Suppose original cost units are multiplied by 100 before taking logs. Every logged cost rises by .
The intercept rises by that amount, and the distance slope remains 0.04 per kilometer. The proportional relationship has not changed. This differs from rescaling a level outcome, which multiplies every coefficient and standard error by the outcome’s scale factor.
- 10ChallengeConnect rescaling with the effect reading
A log-cost regression changes distance from kilometers to meters. Its new slope is 0.00007. What is the approximate percentage effect of five extra kilometers, and does the unit change alter R-squared?
---reveal---
Five kilometers is 5000 meters, so the fitted log change is , approximately a 35% increase. R-squared is unchanged because the fitted log costs are unchanged.
- 11RecapChoose the form before reporting the effect
For a new equation, first identify the scales on both sides. Find the change in its fitted expression, then translate that change into outcome units or a percentage as appropriate.
Before using a log specification, inspect zeros and negative values. Before comparing it with a level specification, return predictions to the same outcome scale; their original R-squared values describe different variables.
2Work through changing marginal effects
13 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionLet a regression describe changing effects
- 2ExplanationDifferentiate the whole quadratic
- 3ExampleCalculate a whole-step change
- 4ExampleLocate the peak and check its support
- 5ChallengeChoose a test for a curved contribution
- 6TipMatch a summary to the data
- 7ExplanationForm a product to let effects depend on context
- 8ExampleEvaluate the effect where the observations are
- 9Key InsightCenter to make a main coefficient useful
- 10ChallengeRead the test with the correct reference point
- 11ConnectionA positive interaction is not a positive effect
- 12ChallengeCompare two kinds of changing slope
- 13RecapRead, evaluate and test the full effect
3Compare models and predict on the right scale
16 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionMake the prediction target explicit
- 2ExplanationGive added regressors a cost
- 3ExampleCompare an expanded equation
- 4ChallengeSeparate better fit from the causal question
- 5TipCompare suitable models with suitable criteria
- 6ExplanationSeparate a mean from one new household
- 7ExampleBuild the mean interval
- 8ExampleAdd the new household’s variation
- 9ChallengeDiagnose an interval that is too narrow
- 10ExplanationExponentiation changes the averaging problem
- 11ExampleApply the normal factor step by step
- 12Key InsightUse smearing without assuming normality
- 13ChallengeCompare predictions that differ only in scale
- 14ConnectionRead a residual against its own fitted scale
- 15ChallengeChoose a fair comparison across outcome forms
- 16RecapUse the result that matches the target
4Build and test group comparisons
19 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionTurn a category into a comparison
- 2ExplanationDefine the indicator and its base
- 3ExampleCalculate a gap with controls fixed
- 4TipAvoid a duplicate intercept column
- 5ChallengeReverse a percentage comparison
- 6ExplanationRepresent three regions with two indicators
- 7ExampleCompare two included regions
- 8ChallengeChange the base without changing fit
- 9Key InsightOrder does not establish equal distances
- 10ExplanationLet the group gap change with size
- 11ExampleEvaluate the gap at two sizes
- 12ConnectionRead a product of two indicators
- 13ChallengeChoose the test for any group difference
- 14ExplanationCount parameters before the Chow calculation
- 15ExampleAssemble restricted and unrestricted fit
- 16ChallengeAllow intercepts under the slope null
- 17TipCheck the variance assumption
- 18ChallengeConnect interactions to a whole-model comparison
- 19RecapKeep coding, comparison and restrictions aligned
5Read and check a linear probability model
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionModel the chance of a yes outcome
- 2ExplanationTranslate slopes into percentage points
- 3ExampleCalculate a probability and a gap
- 4ChallengeCheck both sides of classification
- 5ConnectionAn overall average does not establish causality
- 6ExampleFind where the straight line breaks a bound
- 7ExplanationWork out the binary error variance
- 8Key InsightChange inference without changing coefficients
- 9ChallengeCheck an effect across a wider range
- 10ChallengeChoose a model evaluation for the intended use
- 11RecapJudge the model against its job
Functional Form and Dummy Variables practice questions
Set 1: Apply effects and diagnose model choices10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Read coefficients and choose the right comparison10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Choose intervals, restrictions and probability summaries10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Connect transformations, comparisons and inference10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Reason through unfamiliar model comparisons10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Adjusted R-squared
Akaike information criterion
Average partial effect
B
Band dummy
Base group
Bayesian information criterion
Binary outcome
C
Centering
Chow test
Classification threshold
Coefficient covariance
Conditional mean
Conditional median
Constant probability effect
Cubic specification
D
Dummy variable
Dummy variable trap
Dummy-by-continuous interaction
Dummy-by-dummy interaction
E
Elasticity
Equal-step restriction
Extrapolation
F
Fully interacted regression
Functional form
H
Heteroskedasticity
I
Interaction term
J
Joint exclusion test
L
Level variable
Level-log model
Linear in parameters
Linear probability model
Log-level model
Log-log model
Log-one-plus transformation
M
Main effect
Marginal effect
Mean confidence interval
Mean squared error
N
Natural logarithm
Nonnested models
O
Ordinal variable
Overcontrolling
P
Percent correctly predicted
Percentage point
Point prediction
Prediction interval
Probability bounds
Q
Quadratic specification
R
R-squared
Reinforcing effects
Rescaling
Residual
Restricted model
Retransformation
Right-skewed distribution
Robust standard error
S
Self-selection
Semi-elasticity
Slope difference
Slopes-only test
Smearing factor
T
Treatment dummy
Turning point
U
Unordered category
Unrestricted model
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.