Contents
- What is multiple linear regression?
- Step 1: check the classical assumptions first
- Step 2: is the model significant? Read the F-test
- Step 3: which variables matter? Read the coefficients table
- A worked example
- Step 4: how much is explained? Read R-squared
- Why is R-squared low, and what can legitimately improve it?
- Step 5: from coefficients to elasticities
- Running multiple regression in Python
- Frequently asked questions
- What is the equation of multiple linear regression?
- In what order should regression output be read?
- What is the difference between B and Beta in the coefficients table?
- How many observations are needed for multiple regression?
- Can the F-test be significant while no coefficient is significant?
- References
Versi bahasa Indonesia: Penjelasan dan Tutorial Lengkap Regresi Berganda
Short answer: multiple linear regression relates one dependent variable (Y) to two or more independent variables (X) through the equation Y = a + b1X1 + b2X2 + … + bkXk + e. When reading the output of SPSS, Stata, R, or Python, the order matters: check the F-test for the overall model first, then the t-test of each coefficient, and only then R-squared or adjusted R-squared, after the classical assumptions have been checked.
| Step | Output to read | Question answered |
|---|---|---|
| 1 | Classical assumption tests | Is OLS appropriate for these data? |
| 2 | ANOVA table (F-test) | Do the predictors jointly explain Y? |
| 3 | Coefficients table (t-test) | Which predictors matter, and in which direction? |
| 4 | R-squared and adjusted R-squared | How much of the variation in Y is explained? |
| 5 | Elasticities or standardized coefficients | Which effect is largest in relative terms? |
What is multiple linear regression?
Multiple linear regression analyzes the relationship between one dependent variable and two or more independent variables. It differs from simple linear regression, which has only one independent variable. Each coefficient bj measures the change in Y for a one-unit increase in Xj, holding the other independent variables constant. This “holding constant” interpretation is the main reason for using multiple regression: it separates the effect of each variable from the effects of the others.
Consider a model of rice production. Production depends on land area, fertilizer, and labor. A simple regression of production on fertilizer alone would attribute to fertilizer part of the effect that actually belongs to land area, since larger farms use more fertilizer. Multiple regression includes land area in the same equation, so the fertilizer coefficient reflects the effect of fertilizer among farms of the same size. Thus, the method approximates the controlled comparison that an experiment would provide.
Step 1: check the classical assumptions first
Ordinary least squares (OLS) produces the best linear unbiased estimates only when several assumptions hold. The relationship should be linear in the parameters; the independent variables should not be highly correlated with one another (no severe multicollinearity); the residuals should have constant variance (homoscedasticity); the residuals should not be correlated with one another, which matters mainly for time series; and, for valid small-sample tests, the residuals should be approximately normal.
Reading the coefficients before these checks is a common shortcut, yet it leads to unreliable conclusions. A model with severe heteroscedasticity can show significant coefficients only because the standard errors are underestimated. Consequently, the assumption tests are the gate that determines whether the remaining output can be trusted.
Step 2: is the model significant? Read the F-test

The ANOVA table tests the null hypothesis that all slope coefficients are simultaneously zero. When the p-value (Sig.) of the F-test is below 0.05, at least one independent variable contributes to explaining Y, and the model as a whole is considered significant. When the F-test is not significant, individual significant coefficients should be interpreted with great caution, since the model as a whole does not outperform a model with only the intercept.
Step 3: which variables matter? Read the coefficients table
Once the model passes the F-test, the coefficients table shows which independent variables significantly affect the dependent variable. The table contains the unstandardized coefficients (B), their standard errors, the standardized coefficients (Beta), the t-values, and the p-values. A coefficient with p < 0.05 is considered statistically significant at the 5% level. The sign of B gives the direction: a positive sign means Y increases as X increases, while a negative sign means Y decreases as X increases.
The independent variables are usually measured on a ratio or interval scale. However, a categorical variable such as irrigation status (irrigated or rainfed) can be included as a dummy variable coded 0 and 1. Its coefficient then measures the difference in Y between the two categories, holding the other variables constant.
A worked example
An illustrative dataset of 60 rice farms gives the following estimated model, with production (Y, tons), land area (X1, hectares), urea (X2, kg), and labor (X3, labor days):
| Variable | B | Std. error | t | p |
|---|---|---|---|---|
| Constant | 0.412 | 0.305 | 1.35 | 0.182 |
| Land area (ha) | 4.105 | 0.612 | 6.71 | < 0.001 |
| Urea (kg) | 0.006 | 0.002 | 3.00 | 0.004 |
| Labor (labor days) | 0.004 | 0.005 | 0.80 | 0.427 |
The model is significant (F(3, 56) = 48.7; p < 0.001) with adjusted R² = 0.71. Land area has the strongest effect: each additional hectare raises production by 4.1 tons, holding urea and labor constant. Urea also has a positive and significant effect: an additional 100 kg raises production by 0.6 tons. Labor is not significant (p = 0.427), which suggests that, at the observed levels, additional labor does not raise production once land and fertilizer are accounted for. Thus, the results point to land and fertilizer as the binding constraints for these farms.
Step 4: how much is explained? Read R-squared
R-squared, the coefficient of determination, shows the proportion of the variation in Y explained by the independent variables. It ranges from 0 to 1. An R-squared of 0.60 means that 60% of the variation in Y is explained by the model and 40% remains in the error term. Adjusted R-squared corrects for the number of predictors and should be reported for multiple regression, since ordinary R-squared never decreases when a variable is added.
A small scene from a consultation hour captures the most frequent question. A student sits down with a laptop, opens the output, and asks how to raise an R-squared of 0.32. The supervisor first asks what kind of data were collected. The answer, a survey of 120 households, already explains most of the result: household data are noisy, and an R-squared of 0.32 is not unusual. The more useful question is whether the model is correctly specified.
Why is R-squared low, and what can legitimately improve it?
A low R-squared has no single cause, and each case requires its own diagnosis. Several legitimate sources should be examined. Firstly, the classical assumptions may be violated; a nonlinear relationship forced into a linear equation, for example, leaves systematic patterns in the residuals. Secondly, outliers or data-entry errors may distort the fit; each extreme observation should be checked against the questionnaire, corrected if it is an error, and retained if it is genuine, with a robustness check reported. Thirdly, important explanatory variables may be omitted; theory and field knowledge should guide which variables belong in the model. Fourthly, the functional form may be inappropriate; a logarithmic or quadratic specification often fits production and price data better than a linear one.
However, raising R-squared should never become the goal in itself. Adding variables without theoretical justification, or removing observations because they weaken the fit, produces a model that describes the sample but not the population. Consequently, the aim is a correctly specified model, and a moderate R-squared from a sound model is more valuable than a high R-squared from a manipulated one.
Step 5: from coefficients to elasticities
A regression coefficient describes the change in Y for a one-unit change in X. An elasticity describes the percentage change in Y for a 1% change in X, which makes effects comparable across variables with different units. In a log-log model, ln Y = a + b1 ln X1 + b2 ln X2 + e, each coefficient is directly an elasticity. For example, an elasticity of 0.25 for fertilizer means that a 10% increase in fertilizer raises production by about 2.5%. Elasticities are particularly useful for policy discussion, since policies are usually expressed as proportional changes rather than unit changes.
Running multiple regression in Python
import pandas as pd
import statsmodels.formula.api as smf
df = pd.read_csv("rice_farms.csv")
model = smf.ols("production ~ land + urea + labor", data=df).fit()
print(model.summary())
# Robust standard errors if heteroscedasticity is detected
robust = smf.ols("production ~ land + urea + labor", data=df).fit(cov_type="HC3")
print(robust.summary())
The summary reports the F-statistic, R-squared, adjusted R-squared, and the coefficients table in one output. The Durbin-Watson statistic and the Jarque-Bera normality test appear at the bottom, which helps with the assumption checks described above.
Related guides on Catatan Budi: R-squared vs adjusted vs predicted R-squared, variance inflation factor (VIF), heteroscedasticity: detection and fixes, and regression vs path analysis vs SEM.
Frequently asked questions
What is the equation of multiple linear regression?
The general equation is Y = a + b1X1 + b2X2 + … + bkXk + e, where a is the intercept, bj are the regression coefficients, and e is the error term. Each bj shows the change in Y for a one-unit increase in Xj, holding the other variables constant.
In what order should regression output be read?
Start with the assumption tests, then the ANOVA table (F-test), then the coefficients table (t-tests), and finally R-squared and adjusted R-squared.
What is the difference between B and Beta in the coefficients table?
B is the unstandardized coefficient in the original units of the variables. Beta is the standardized coefficient, expressed in standard deviations, which allows the relative strength of predictors measured in different units to be compared.
How many observations are needed for multiple regression?
A common rule of thumb is at least 10 to 20 observations per independent variable. A more precise answer comes from a power analysis based on the expected effect size.
Can the F-test be significant while no coefficient is significant?
Yes. This pattern typically indicates multicollinearity: the predictors jointly explain Y, but their individual effects cannot be separated. Checking the VIF values is the next step.
References
- Gujarati, D. N., and Porter, D. C. (2009). Basic Econometrics (5th ed.). McGraw-Hill.
- Hair, J. F., Black, W. C., Babin, B. J., and Anderson, R. E. (2019). Multivariate Data Analysis (8th ed.). Cengage.
- Wooldridge, J. M. (2020). Introductory Econometrics: A Modern Approach (7th ed.). Cengage.
Discussion
No comments yet. Have a question about this topic? Write it below and I will do my best to answer.