How to use dummy variables in a time-series regression?

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

NTUSenna
Posts: 4
Joined: Fri Mar 02, 2012 5:31 am

How to use dummy variables in a time-series regression?

Postby NTUSenna » Fri Mar 02, 2012 5:56 am

Hi, I'm new to eviews, though I do have some basic econometrics experience.

I'm looking to create a regression to measure the determinants of GDP growth given 5 variables: Investment, Savings, Government Expenditure, Exports and Interest Rates.
I am using annual data from 1960 to 2010 and would like to explore a pre-1997 and post-1997 era for analysing how the variables' influence changed in the two periods. But to improve the reliability of the results rather than split the data set into two regressions (1960-1997 and 1998-2010), I thought I could use dummy variables instead and allow me to keep a longer range of data.

Could I use dummy variables for each variable to control for the two periods i.e 1 = <1997 and 0 > 1997, and if so how?

Many thanks.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13611
Joined: Tue Sep 16, 2008 5:38 pm

Re: How to use dummy variables in a time-series regression?

Postby EViews Gareth » Fri Mar 02, 2012 8:53 am


NTUSenna
Posts: 4
Joined: Fri Mar 02, 2012 5:31 am

Re: How to use dummy variables in a time-series regression?

Postby NTUSenna » Fri Mar 16, 2012 4:31 am

Thanks for that, I managed to get two dummy variables working for use in regressions to test <1997 (dummy) and >1997 (dummy2) effects. The results I got was that the coefficients etc where just the opposite values for the two dummy variables.

Variable.......................................Coefficient Std. Error t-Statistic Prob.
INVESTMENT*DUMMY.......................-0.311363 0.235947 -1.319632 0.2045
INVESTMENT*DUMMY2..................... 0.311363 0.235947 1.319632 0.2045

This was a result of doing two estimations "gdpgrowth c investment (investment*dummy)" and "gdpgrowth c investment (investment*dummy2)"

Is this supposed to happen because it seems a bit simple results?

Thanks

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

How to use dummy variables in a time-series regression?

Postby startz » Fri Mar 16, 2012 6:51 am

Could you show the commands you used?

NTUSenna
Posts: 4
Joined: Fri Mar 02, 2012 5:31 am

Re: How to use dummy variables in a time-series regression?

Postby NTUSenna » Sat Mar 17, 2012 5:15 am

So for the dummy variables I created them with:

Code: Select all

dummy = @recode (@year <1997, 1, 0)

and

Code: Select all

dummy2 = @recode (@year <1997, 0, 1)
Then I ran two estimations to test the original variable and each dummy separately:

Code: Select all

gdpgrowth c savings (savings*dummy) investment (investment*dummy) govexp (govexp*dummy) exports (exports*dummy)

and

Code: Select all

gdpgrowth c savings (savings*dummy2) investment (investment*dummy2) govexp (govexp*dummy2) exports (exports*dummy2)

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

How to use dummy variables in a time-series regression?

Postby startz » Sat Mar 17, 2012 6:25 am

You're getting the right result. The first equation says the coefficient is 3 higher in the first period. The second says it's 3 lower in the second. Both mean the same thing.

NTUSenna
Posts: 4
Joined: Fri Mar 02, 2012 5:31 am

Re: How to use dummy variables in a time-series regression?

Postby NTUSenna » Mon Mar 26, 2012 2:47 am

Apologies for the late reply, but thank you for the assistance. I think I understand it now!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests