I have problem with the dummy variables.

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

chun
Posts: 2
Joined: Thu Dec 01, 2011 11:50 pm

I have problem with the dummy variables.

Postby chun » Thu Jan 12, 2012 11:44 pm

Hello, I'm doing my thesis to see weather political instabilities affect FDI and I have some questions. I was gathered data from 31 countries between 1980 and 2008. I set FDI as countrol variable and there are five political dummy variables.
polity2, 1 means a country is autocracy and 0 means democracy.
inttot, 1 means there are interstate conflicts and o means there are no interstate conflicts.
civtot,1 means there are intrastate conflicts and o means there are no intrastate conflicts.
rights,1 means there are no freedom in the electoral process and o means there are freedom in the electoral process.
civil, 1 means there are no freedom in expression and o means there are freedom in expression.
I type down @expand(polity2,civtot,inttot, rights, civil) in the common coefficients box and this is the result I got.

Dependent Variable: FDI?
Method: Pooled Least Squares
Date: 01/13/12 Time: 12:34
Sample: 1980 2008
Included observations: 29
Cross-sections included: 30
Total pool (unbalanced) observations: 541
Cross sections without valid observations dropped

Variable Coefficient Std. Error t-Statistic Prob.

DEPR? 0.000239 0.002096 0.114142 0.9092
RGDPPC? 0.000299 0.000467 0.641920 0.5212
GDPPCLAG1? 5.52E-05 0.000125 0.442889 0.6580
INFL? -0.003827 0.004771 -0.802247 0.4228
TRADE? -0.138881 0.042912 -3.236377 0.0013
AID? 2.90E-09 6.92E-10 4.195268 0.0000
EDEBT? 0.000529 3.95E-05 13.39470 0.0000
EXR? -1.62E-10 5.95E-10 -0.272157 0.7856
POLITY2?=0,INTTOT?=0,CIVTOT?=0,RIGHTS?=0,CIVIL?=0 5.585604 1.125078 4.964636 0.0000
POLITY2?=1,INTTOT?=0,CIVTOT?=0,RIGHTS?=0,CIVIL?=0 -0.580929 5.925297 -0.098042 0.9219
POLITY2?=1,INTTOT?=0,CIVTOT?=0,RIGHTS?=1,CIVIL?=1 4.950566 1.446125 3.423332 0.0007

R-squared 0.305343 Mean dependent var 5.744005
Adjusted R-squared 0.292236 S.D. dependent var 13.66466
S.E. of regression 11.49590 Akaike info criterion 7.741981
Sum squared resid 70042.55 Schwarz criterion 7.829278
Log likelihood -2083.206 Hannan-Quinn criter. 7.776120
Durbin-Watson stat 0.563631

My question are;
1. Why are there only three combinations of the dummy set? I think it would be 5! like
POLITY2?=0,INTTOT?=0,CIVTOT?=0,RIGHTS?=0,CIVIL?=0
POLITY2?=0,INTTOT?=1,CIVTOT?=0,RIGHTS?=0,CIVIL?=0
POLITY2?=0,INTTOT?=1,CIVTOT?=1,RIGHTS?=0,CIVIL?=0
POLITY2?=0,INTTOT?=1,CIVTOT?=1,RIGHTS?=1,CIVIL?=0
and so on. Where are the other combinations?
2. Which political dummy variables does the coefficient belong to? 5.585 belongs to polity2 or the others.
3. What does the coefficient of the dummy variables mean?
Thank you so much, Chun

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

Re: I have problem with the dummy variables.

Postby EViews Gareth » Fri Jan 13, 2012 8:55 am

You should enter each dummy variable inside its own @expand statement:

Code: Select all

@expand(polity2) @expand(civtot) @expand(inttot) ...

chun
Posts: 2
Joined: Thu Dec 01, 2011 11:50 pm

Re: I have problem with the dummy variables.

Postby chun » Fri Jan 13, 2012 7:58 pm

I did it but the error message, " Near singular matrix", showed up.

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

I have problem with the dummy variables.

Postby EViews Gareth » Fri Jan 13, 2012 8:27 pm

Dummy variable trap

purishiru
Posts: 8
Joined: Mon Jun 04, 2012 5:53 am

Re: I have problem with the dummy variables.

Postby purishiru » Sat Jun 09, 2012 11:30 pm

my problem almost similar, although when i want to type @expand(mode), the box saying mode is not define appear.
what is wrong?

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

Re: I have problem with the dummy variables.

Postby EViews Gareth » Sun Jun 10, 2012 8:05 am

Do you have a variable called mode?

purishiru
Posts: 8
Joined: Mon Jun 04, 2012 5:53 am

Re: I have problem with the dummy variables.

Postby purishiru » Mon Jun 11, 2012 7:06 am

yes, it suppose to be a dummy consisting of exporting and joint venture as mode

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

Re: I have problem with the dummy variables.

Postby startz » Mon Jun 11, 2012 7:09 am

Post the exact command you used, and maybe your workfile.

purishiru
Posts: 8
Joined: Mon Jun 04, 2012 5:53 am

Re: I have problem with the dummy variables.

Postby purishiru » Tue Jun 12, 2012 12:00 am

i posted two of my workfile.
the thesis i am doing is using about 80 firms, divided further into 6 industry, of which sample is multinational firm. here in the workfile are mining (8 firm) and basic industry(20 firm). the purpose is i am doing research if the difference in entry mode impacts return.

I am using a pool (eviews 6) and whenever i put the independent variable in the common coefficient pool estimation, it wont work if either EXP (export) or JV (joint venture) is included, there goes "near singular matrix". so i resource to use @expand there. it shows JV not define.
If I change the excel into a sheet containing mode (where all export is 0 and all joint venture is 1) with the same procedure, is "Mode not define"

my first problem is the dummy. i need dummy for represent 3 modes: export, joint venture and FDI. as the dummy should be 0 and 1. e.g. the firm is export firm, than the dummy for export is 1; for joint venture is 0 ,- and vice versa, while FDI is represent by intercept. ( dummy variable trap is because c= d1+ d2 ? or am i wrong?)

i have tried basically almost every example posted in the forum. it is either i have done it wrong or maybe i have input it incorrectly. it shows either "variable (ROE, or JV, or MODE) not define", or "near singular matrix" or "Syntax error"

Hope all the info can help to find the best solution and thank you in advance!!
Attachments
sample per industry_basicindustrynchemicals_roe2_lngdp_lnsize.wf1
(88.04 KiB) Downloaded 534 times
sample per industry_mining_roe2_lnsize_gdp.wf1
(37.88 KiB) Downloaded 565 times

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

Re: I have problem with the dummy variables.

Postby startz » Tue Jun 12, 2012 5:47 am

The workfiles you posted do not have a series named "mode."

purishiru
Posts: 8
Joined: Mon Jun 04, 2012 5:53 am

Re: I have problem with the dummy variables.

Postby purishiru » Tue Jun 12, 2012 9:50 pm

Yes, those are two sample workfile where i try to separate the mode into two variable of jv and export
here is one of the workfile where the both joined as mode
Attachments
untitled.WF1
(20.69 KiB) Downloaded 546 times

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

Re: I have problem with the dummy variables.

Postby startz » Wed Jun 13, 2012 7:50 am

You need to show us exactly what you typed and/or include the equation in the workfile.

purishiru
Posts: 8
Joined: Mon Jun 04, 2012 5:53 am

Re: I have problem with the dummy variables.

Postby purishiru » Thu Jun 14, 2012 4:37 am

i used pool. so when the i click on estimate, i write the dependent (ROA) and the independents in the common coefficient space( c der? size? cpi? gdp? mode?)
i choose on balance panel and fixed effect, it gives near singular matrix

if i put on the common coefficient "c der? size? cpi? gdp? @expand (mode)? there, mode not define

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

Re: I have problem with the dummy variables.

Postby startz » Thu Jun 14, 2012 7:22 am

i used pool. so when the i click on estimate, i write the dependent (ROA) and the independents in the common coefficient space( c der? size? cpi? gdp? mode?)
i choose on balance panel and fixed effect, it gives near singular matrix

if i put on the common coefficient "c der? size? cpi? gdp? @expand (mode)? there, mode not define
mode is a dummy variable. I suspect the problem is that you have fallen into the dummy variable trap. You can't have fixed effects and a variable that is a constant for each cross section.

purishiru
Posts: 8
Joined: Mon Jun 04, 2012 5:53 am

Re: I have problem with the dummy variables.

Postby purishiru » Thu Jun 14, 2012 10:27 pm

if i delete c from the estimation coefficient, that would not work too. what should be done?


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests