Fixed Effects Industry and Year
Moderators: EViews Gareth, EViews Moderator
Fixed Effects Industry and Year
Hi, I have a quick question.
I am analyzing panel data and wanted to run fixed effect model on Eviews and therefore include industry and time (year) fixed effects. My workfile structure is currently dated panel. I know this question was probably asked soo many times, but i still couldn't understand how i have to do it.
I want to group my companies into different industries e.g. financial services= Industry1 energy=industry2 etc etc.? and the time into each year from 2006 2016.
Also is it possible to use industry and time fixed effects at the same time? or just one and then the other?
Thank you in advance!
I am analyzing panel data and wanted to run fixed effect model on Eviews and therefore include industry and time (year) fixed effects. My workfile structure is currently dated panel. I know this question was probably asked soo many times, but i still couldn't understand how i have to do it.
I want to group my companies into different industries e.g. financial services= Industry1 energy=industry2 etc etc.? and the time into each year from 2006 2016.
Also is it possible to use industry and time fixed effects at the same time? or just one and then the other?
Thank you in advance!

 Nonnormality and collinearity are NOT problems!
 Posts: 3399
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Fixed Effects Industry and Year
You can use industry and time fixed effects at the same time. If you set up your panel to be annual by industry, then EViews will do this for you under estimation options.
Alternatively, if you don't have too many industries you can just create your industry variable and then use @expand in the regression to get fixed effects, taking care about the dummy variable trap.
Alternatively, if you don't have too many industries you can just create your industry variable and then use @expand in the regression to get fixed effects, taking care about the dummy variable trap.
Re: Fixed Effects Industry and Year
Okay thank you very much.
Ah i have about 38 Industries, i think that would be a bit much. But every time i try to change it to industry Eviews creates an undated panel data again. What am I doing wrongs
Ah i have about 38 Industries, i think that would be a bit much. But every time i try to change it to industry Eviews creates an undated panel data again. What am I doing wrongs

 Nonnormality and collinearity are NOT problems!
 Posts: 3399
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Fixed Effects Industry and Year
38 industries should be no problem.
Re: Fixed Effects Industry and Year
Okay thank you. But as soon as I use the Industry i can’t transform it into a dated panel workfile Structure. Can I use dummies for the years?
Thanks in advance.
Thanks in advance.
Re: Fixed Effects Industry and Year
Hi,
If I interact dummy like industry year and time year, why it turns be near singular matrix? Or it's not allowed to interacting dummy like that?
If I interact dummy like industry year and time year, why it turns be near singular matrix? Or it's not allowed to interacting dummy like that?

 Nonnormality and collinearity are NOT problems!
 Posts: 3399
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Fixed Effects Industry and Year
You have probably fallen into the dummy variable trap.
Re: Fixed Effects Industry and Year
Nah, how to detect where the problem is or how to deal with this?
I want to control inflation but i dont have cpi data, so i interact regional dummy with year dummy
I want to control inflation but i dont have cpi data, so i interact regional dummy with year dummy

 Nonnormality and collinearity are NOT problems!
 Posts: 3399
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Fixed Effects Industry and Year
You'll probably have to post your data and the exact command that fails to get more advice.
Re: Fixed Effects Industry and Year
Ok, wait
Re: Fixed Effects Industry and Year
I want to estimate ECM with shock, the dependent variable is saving, the independent variable is household age, household age squared, housohold size, number of elder, number of children. I use the squared residual from Mincerian income equation as shock
if i didn't include the dummy interaction, it can give the result,
if i include interaction dummy to control inflation, it give "near singular matrix"
sc01 is regional
ifls is the time
if i didn't include the dummy interaction, it can give the result,
Code: Select all
smpl if jmliflssaving>0
equation lr.ls saving1 c hh_size head_age head_age^2 elder children
lr.makeresid lr_resid
equation mincertanpaf.ls lhh_income c head_age head_age^2 head_educ
mincertanpaf.makeresid mincertanpaf_resid
equation iecm1.ls d(saving1) d(hh_size) d(head_age) d(head_age^2) d(elder) d(children) hh_size(1) head_age(1) head_age(1)^2 elder(1) children(1) lr_resid(1) d(mincertanpaf_resid^2) mincertanpaf_resid(1)^2
show iecm1
if i include interaction dummy to control inflation, it give "near singular matrix"
Code: Select all
smpl if jmliflssaving>0
equation lrfi.ls saving1 c hh_size head_age head_age^2 elder children @expand(sc01, @dropfirst)*@expand(ifls, @dropfirst)
lrfi.makeresid lrfi_resid
show lrfi
equation mincerfi.ls lhh_income c head_age head_age^2 head_educ @expand(sc01, @dropfirst)*@expand(ifls, @dropfirst)
mincerfi.makeresid mincerfi_resid
show mincerfi
equation iecm5.ls d(saving1) d(hh_size) d(head_age) d(head_age^2) d(elder) d(children) hh_size(1) head_age(1) head_age(1)^2 elder(1) children(1) lrfi_resid(1) d(mincerfi_resid^2) mincerfi_resid(1)^2 @expand(sc01, @dropfirst)*@expand(ifls, @drop(1), @drop(2))
show iecm5
sc01 is regional
ifls is the time
 Attachments

 data_skripsi.wf1
 (48.44 MiB) Downloaded 19 times

 Nonnormality and collinearity are NOT problems!
 Posts: 3399
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Fixed Effects Industry and Year
Try using
To be honest I'm not sure what multiplying @expand terms does, although perhaps the EViews team could chime in.
Code: Select all
@expand(sc01, ifls, @dropfirst)
To be honest I'm not sure what multiplying @expand terms does, although perhaps the EViews team could chime in.
Re: Fixed Effects Industry and Year
It still give near singular matrix error

 Nonnormality and collinearity are NOT problems!
 Posts: 3399
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Fixed Effects Industry and Year
Code: Select all
equation mincerfi.ls lhh_income c head_age head_age^2 head_educ @expand(sc01,ifls, @dropfirst)
runs fine on my machine.
Who is online
Users browsing this forum: No registered users and 10 guests