Dummy Variables
Moderators: EViews Gareth, EViews Moderator

 Nonnormality and collinearity are NOT problems!
 Posts: 3408
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Dummy Variables
How do you know which county an observation is from? (You may want to give an example of your data or post your workfile.)
Re: Dummy Variables
Hi ,
you can write genr X= 1*(year>=1990) + 0*(year<1990). i test this command and it works.
best,
Sabine
you can write genr X= 1*(year>=1990) + 0*(year<1990). i test this command and it works.
best,
Sabine
Re: Dummy Variables
Hello, I need help.
I am new in both eviews and econometrics. Help will very much appreciated.
1. I am doing a panel data study for my thesis, and one of my 5 variables is a dummy of a Mod, which consist of three : A,B, C. one of the three will be represented by intercept (C), however. so that leave another two.
the dummy is for Mod(A,B)
I have tried several ways suggested by the forum, but i keep getting error message.
if i use Genr  generate series by equation  enter @expand(Mod);  it show : @EXPAND is not a genr or series expresion function , if I put equation
e.g. roe c gdp cpi @expand(Mod) or roe gdp cpi @expand(Mod);  it says: syntax error
I have tried to write : roe c gdp cpi Group 01 @expand(Mod)
its not working.
2. I need it for a regression in which i am using a pool. can the dummy equation and pool use together? or maybe an alternative so the regression could work as one.
3. is it possible to have the dummy input together in imported excel and have it worked?
I can´t find these on internet.
can someone please help me out??
I am very new to this,as I have acquainted with eviews only for a month. It would be great help if the explanation can go step by step.
Thank you in advance for save me here!
I am new in both eviews and econometrics. Help will very much appreciated.
1. I am doing a panel data study for my thesis, and one of my 5 variables is a dummy of a Mod, which consist of three : A,B, C. one of the three will be represented by intercept (C), however. so that leave another two.
the dummy is for Mod(A,B)
I have tried several ways suggested by the forum, but i keep getting error message.
if i use Genr  generate series by equation  enter @expand(Mod);  it show : @EXPAND is not a genr or series expresion function , if I put equation
e.g. roe c gdp cpi @expand(Mod) or roe gdp cpi @expand(Mod);  it says: syntax error
I have tried to write : roe c gdp cpi Group 01 @expand(Mod)
its not working.
2. I need it for a regression in which i am using a pool. can the dummy equation and pool use together? or maybe an alternative so the regression could work as one.
3. is it possible to have the dummy input together in imported excel and have it worked?
I can´t find these on internet.
can someone please help me out??
I am very new to this,as I have acquainted with eviews only for a month. It would be great help if the explanation can go step by step.
Thank you in advance for save me here!
Re: Dummy Variables
Just a quick econometrics query: when creating date dummies, say monthly, wouldn't you need 11 dummies as opposed to 12 to avoid what's commonly called the 'dummy variable trap'? This seems to be the case since using the @expand(@monthly) command yielded to a popup saying that a nearsingular matrix is occuring when I test for a VAR.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11943
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Dummy Variables
Indeed, hence:
EViews Gareth wrote:Note that by default the @expand keyword will create a full set of dummies, thus you should not include a constant in your equation (since you'll create a singular matrix problem).
Alternatively, @expand lets you drop certain values from the expansion to avoid the singularity problem. You can use @dropfirst or @droplast to drop the first or the last categorisation. Thus:Code: Select all
Y C X @expand(sex, @dropfirst)
Would regress Y on a constant, X and SEX=M, and not SEX=F.
Follow us on Twitter @IHSEViews
Re: Dummy Variables
Thanks for your response. I'm estimating a univariate VAR as a first step to testing for linearity, in turn to see whether a smooth transition AR model is appropriate. The @droplast command worked, but if I also wanted to drop June (month 6), how would I input a code for that?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11943
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Dummy Variables
The Command Reference has full details on how to use @expand.
Follow us on Twitter @IHSEViews

 Posts: 2
 Joined: Sat Aug 18, 2012 3:29 pm
Re: Dummy Variables
Hi all,
I am fairly new at Eviews 7. I want to create dummy variables to consider seasonal effect on a daily data (7 days). Please help me.
I am fairly new at Eviews 7. I want to create dummy variables to consider seasonal effect on a daily data (7 days). Please help me.
Re: Dummy Variables
Dear Eviews users,
I'm also having problems creating a dummy in my panel data. In my Tweets and Quotesdf are the tweets of 98 stocks and the first differenced stock quotes. Now I want to establish a dummy for the Google tweets & stocks since I'm hoping that my data will then be normally distributed. Can someone help me? I already tried making a dummy but I didn't work.
Thanks in advance for your time, very much appreciated!
I'm also having problems creating a dummy in my panel data. In my Tweets and Quotesdf are the tweets of 98 stocks and the first differenced stock quotes. Now I want to establish a dummy for the Google tweets & stocks since I'm hoping that my data will then be normally distributed. Can someone help me? I already tried making a dummy but I didn't work.
Thanks in advance for your time, very much appreciated!
 Attachments

 Variables
 goog.png (75.7 KiB) Viewed 5985 times

 File
 Panel Data.jpg (104.93 KiB) Viewed 5985 times

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11943
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Dummy Variables
Not quite sure what you're trying to do?
Just create a dummy whenever the stock name is "GOOG"?
Just create a dummy whenever the stock name is "GOOG"?
Code: Select all
series dum = 0
smpl if var01="GOOG"
dum = 1
smpl @all
Follow us on Twitter @IHSEViews
Re: Dummy Variables
I would like to create dummy variable for 400 obs daily (7 day week) from 1990/01/01 to 04/02/1991.
1a dummy variable eqaul to 1 for 01/01/1990 to 31/01/1990 and equal 1 for 01/03/1990 to 31/03/1990...etc, and for monthly and quarterly ...etc date.
2a dummy variable for Nodated, dummy equal to 1 for 1 and 2 obs and 5 and 6 obs...etc.
best regrads.
1a dummy variable eqaul to 1 for 01/01/1990 to 31/01/1990 and equal 1 for 01/03/1990 to 31/03/1990...etc, and for monthly and quarterly ...etc date.
2a dummy variable for Nodated, dummy equal to 1 for 1 and 2 obs and 5 and 6 obs...etc.
best regrads.
 Attachments

 dum3_quarterly.png (71.65 KiB) Viewed 5856 times

 dum2_Nodated.png (58.73 KiB) Viewed 5856 times

 dum1_daily.png (72.91 KiB) Viewed 5856 times

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11943
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Dummy Variables
I have no idea, would you like to help me
best regards
best regards

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11943
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Dummy Variables
for the moment I have no idea.
Who is online
Users browsing this forum: No registered users and 13 guests