Instant PDF download, name-and-email checkout. Complete Book Bundle: every Economics, Statistics, Mathematics, Econometrics and Research Methods book
Econometrics

Eviews Regression with Dummy variables

To understand regression analysis with dummy variables, let us take an example of using dummy variable with structural changes in an economy. For example, the U.S. had a deep recession in 1981–1982, and a severe recession again in 2007–2009. When we use time-series data, structural changes like these affect our regression analysis. To check the effects of such structural changes, we use a particular dummy variable and then run our regression.

I am taking an example of the economy of Pakistan which had a structural change in 1993 Monetary policy. The data starts from 1976 to 2015. Source of the data is from State bank of Pakistan Statistical handbook.

Dummy variable Introduction

What is Regression analysis ?

Study smarter
Chapter 9 of the Econometrics Made Simple textbook covers dummy variables, the Chow test and structural change in time series, and Chapter 12 covers the autocorrelation that time-series regressions like this one usually have, with Python, R and Stata code. For the statistics groundwork, the Statistics Made Simple Complete Bundle adds a textbook plus 1,569 practice questions with worked answers.

Dummy model equation

To understand the structural changes of the economy we first have to create our model of dependent and independent variables. We know that the overall effect of the independent variable of CPI and Real GDP would cause an effect over the Money Supply (Broad Money, M2) of the Economy. Thus, we can write the equation in the following way:

dummy variable example

Data collection source

To understand the structural change in the Economy of Pakistan we take a time-series data from 1976 to 2015. The source of the data is from Handbook of Statistics of Pakistan Economy from State Bank of Pakistan. For the above equation the following data was collected:

  • MS = Broad Money M2 from 1976 to 2015
  • Inflation = CPI indices – Average general value is taken from 1976 to 2015
  • RGDP= Growth rate of the Economy from 1976 to 2015
Econometrics Made Simple textbook coverChapter 9 of Econometrics Made Simple covers structural-break dummies and the Chow test; Chapter 8 explains log-log models and elasticities.Get the textbook · $15

Log-log, Double log model usage

We will be using double-log at both ends of the equation. Econometricians use natural log for various reasons in regression analysis. The important reasons for taking a double log at both ends for this equation is as follows:

log dummy variable

  1. It makes a nonlinear equation to linear so that we are able to run the regression analysis.
  2. It is easier to figure out the impacts in percentage terms.
  3. In time-series data, a variable that grows exponentially has a linear trend once logged. (Logging does not remove the trend; it turns exponential growth into a straight line.)
  4. It often reduces skewness and heteroskedasticity in positive, right-skewed data. (Note that the normality assumption of classical linear regression models is about the error term, not about the variables themselves.)
  5. We take the log of the CPI index so that its coefficient is an elasticity: the percentage change in M2 for a 1% change in the price level. (The log of the CPI is not itself the inflation rate; the inflation rate is approximately the year-to-year change in log CPI.)

Regression Results of Double-Log Equation

regression of montary policy dummy variable

The regression was run in EViews 9.5 Student Lite with the command ls lnms c lncpi lnrgdp, shown at the top of the output. The same model in Python is smf.ols("np.log(ms) ~ np.log(cpi) + np.log(rgdp)", data=df).fit(), in R lm(log(ms) ~ log(cpi) + log(rgdp), data = df), and in Stata regress lnms lncpi lnrgdp after generating the logged variables.

Interpretation of the result

The p-value on LNCPI is high (0.73), so the CPI coefficient is not statistically significant: this regression finds no clear relationship between the price level and broad money in Pakistan.

For RGDP, the coefficient of −0.95 says that a 1% increase in real GDP is associated with a fall of about 0.95% in MS. Its p-value is 0.051, so it is significant at the 10% level but, strictly, not at the 5% level. The R2 is only 0.11, so this model explains little of the movement in M2. Let us add a structural change dummy variable to understand the effects.

Econometrics Made Simple Practice Questions coverPractise interpreting dummy and log coefficients: the Practice Questions book has worked answers for every question.Get 1,150+ questions · $9

Adding the structural change dummy variable (Differential Intercept dummy)

To understand the structural change of 1993 in the economy of Pakistan, we add a differential intercept dummy variable of MP93 in the equation. Note that we don’t take a log of Dummy variable in the equation. A dummy variable is coded 0 and 1, and the log of zero is undefined (the value is missing), while the log of one is zero. So if we logged the dummy, every observation with a 0 would be dropped, and the remaining observations would all have the value log(1) = 0: the “dummy” becomes a column of zeros, which cannot be estimated. Hence we don’t take a log of Dummy variable of Structural change of 1993 in our model.

log dummy variable

Where the monetary policy dummy MP93 is 0 from 1976 to 1992 and 1 from 1993 to 2015. In EViews the command is ls lnms c lncpi lnrgdp mp; in Python, R and Stata simply add mp to the list of regressors.

Regression with Dummy variable

regression with dummary variable eviews

Interpretation of Dummy variable

For the coefficient of real GDP, a 1% increase in RGDP is associated with a 0.09% increase in the money supply (broad money, the dependent variable). Its p-value is 0.73, so this effect is not statistically significant.

For the CPI, broad money M2 falls by about 0.03% when the price level rises by 1%. The p-value is 0.96, so there is no evidence of a relationship.

The coefficient on the 1993 monetary policy dummy is 2.92 and is highly significant (p < 0.001), which shows that the level of the money supply differs before and after 1993. Because the dependent variable is in logs, the exact effect is 100×(e2.92 − 1) ≈ 1,750%: after 1993, M2 is about 18.5 times what the model would otherwise predict. A shift that large is a warning sign. With no time trend in the model, the dummy also picks up the strong upward trend in M2, and the Durbin–Watson statistic of 0.31 signals strong positive autocorrelation. Adding a time trend, using autocorrelation-robust (Newey–West) standard errors and testing the break with a Chow test would be the next steps.

The R2 of 0.75 (75%) and adjusted R2 of 0.73 (73%) show that the model with the dummy explains about three-quarters of the variation in log M2, up from 0.11 without it. (Adjusted R2 is always below R2 when there are regressors, because it penalises extra variables.) Note that time-series regressions in levels often have a high R2 simply because the variables share trends, so a high R2 is not on its own evidence of a good model; cross-sectional regressions typically have lower R2.

Thus, the dummy for the 1993 change in monetary policy has a highly significant p-value, which suggests a structural change in the economy, subject to the trend and autocorrelation caveats above.

The forecast for the result is as follows:

forecast of dummy variable

The forecast clearly shows the structural change of the intercept dummy variable of 1993 in the equation.

Studying more than one subject? The Complete Book Bundle gives you every Economics, Statistics, Mathematics, Econometrics and Research Methods book from EconTutorials in one download.

Econometrics Made Simple bundle coverTextbook plus 1,150+ practice questions: get both Econometrics Made Simple books for $19 (was $24).Both books · $19
Econometrics Made Simple Complete Bundle: textbook and practice book
This topic has a full chapter in Econometrics Made Simple, with Python, R and Stata code and 1,161 worked practice questions in the bundle.Econometrics Made Simple Complete Bundle — Textbook + 1,161 Practice Questions
Get it for $19
E

The EconTutorials team writes clear, exam-focused lessons in economics and statistics for A-Level, IB, AP and university students, with more than 13 years of classroom teaching behind every guide and book in the Made Simple series.