Dummy Variables

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

sarchi
Posts: 19
Joined: Wed Jan 24, 2018 9:10 am

Re: Dummy Variables

Postby sarchi » Tue Mar 06, 2018 7:40 am

HI,
I Think this Forum is so helpfullI , but now I am unable to find an answer about my problem.

I have a panel data set of bilateral tradeflows between EU Country and Africa between 2000-2016, resulting in about 476 cross-sections. Everything works just fine, but I, like others, encounter the Near Singular Matrix problem while adding some dummies.

I constructed them in Estimate Equation, with the following command: log(export) c log(GDP) log(Pop) log(distance) @expand(Embargo, sea access, EU countries). In my Excel have I : 1 for Embargo and 0 for dosent Embargo's Country, 1 for Sea access and 0 for dont access to sea also 1 for affiliation to EU and 0 for dont affiliation to EU.
Is my command wrong? What is it the correcte command for Dummy Variable in Estimate Equation?

Hope you can help me

Thanks!

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

Re: Dummy Variables

Postby startz » Tue Mar 06, 2018 7:52 am

Dummy variable trap. You can't have a constant and a complete set of dummies.

sarchi
Posts: 19
Joined: Wed Jan 24, 2018 9:10 am

Re: Dummy Variables

Postby sarchi » Tue Mar 06, 2018 8:10 am

that means I should use each variable separately in model and without constant?
for example:
log(export) log(gdb) log(pop) log(distance) @expand(Embargo)
is it correct?

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

Re: Dummy Variables

Postby startz » Tue Mar 06, 2018 8:41 am

That should work.

sarchi
Posts: 19
Joined: Wed Jan 24, 2018 9:10 am

Re: Dummy Variables

Postby sarchi » Thu Mar 08, 2018 3:23 am

Dummy Variables could not be logarithmiert?

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

Re: Dummy Variables

Postby startz » Thu Mar 08, 2018 7:03 am

A dummy variable is either 0 or 1.

zriley
Posts: 1
Joined: Thu Aug 09, 2018 6:23 am

Re: Dummy Variables

Postby zriley » Thu Aug 09, 2018 7:16 am

Hi,

I'm new to EViews, so apologies in advance if any of this is unclear. I'm in the midst of writing a finance dissertation, and need to run regressions with two dummy variables for some of my research.

I have the following series uploaded into EViews, all of which are sorted by the same dates (a 15 year daily time series): the daily average return of my sample, the daily dispersion of the returns measured using one method, and the daily dispersion of returns measured using a second method.

I want to determine whether, on days when the average/market return is extreme (top/bottom 1% or 5% of returns), dispersion increases or decreases (this is where two dummy variables comes into play), and how this differs for the two methods. I will run two separate regressions, one for each measure of dispersion. I've attached a picture of what my regression equation needs to look like (with an explanation of the dummy variables):
Regression.PNG
Regression.PNG (19.93 KiB) Viewed 10778 times
.

I will want to run the regressions at least twice, with the 'extreme lower tail' being tested at both the 1st and 5th percentile, potentially 10th as well. S(t) in the equation attached is the level of dispersion corresponding to the same day as the return.

Is anyone able to help me figure out how to do so? It doesn't seem like it should be too complicated but I'm just not sure where/how to start. Sorry this is so long, but thanks for any help.

EViews Matt
EViews Developer
Posts: 557
Joined: Thu Apr 25, 2013 7:48 pm

Re: Dummy Variables

Postby EViews Matt » Thu Aug 09, 2018 9:09 am

Hello,

You should be able to create your desired dummy variables using variations of the following command. This example command creates a dummy for the extreme low returns at the 5% threshold (daily average returns in series x),

Code: Select all

series D_L_05 = @ranks(x) / @obssmpl < .05

mariamgl
Posts: 1
Joined: Mon Dec 31, 2018 11:26 am

Re: Dummy Variables

Postby mariamgl » Mon Dec 31, 2018 11:35 am

hallo i want to run a regression like this:
y= c+d+ bx+kdx
, where d=dummies,
how can i run this regression via eviews?

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

Re: Dummy Variables

Postby EViews Gareth » Mon Dec 31, 2018 11:46 am

Just enter your equation as:

Code: Select all

y c dummy x dummy*x
Follow us on Twitter @IHSEViews


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 9 guests