How to build Linear regression Model using Categorical Independent 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

Nawal_Kashyap
Posts: 4
Joined: Sat Dec 24, 2016 8:46 am

How to build Linear regression Model using Categorical Independent Variables

Postby Nawal_Kashyap » Sat Dec 24, 2016 11:55 pm

Hi All,

I want to build a linear regression model using categorical variables(independent) in Eviews.

I am struggling to understand how to use my all categorical variable in Eviews.

I am using the below code for the same:

dependent_varibale adults @expand(area, cars) age children.

But the problem is that by using @expand it is creating interaction of area and cars, which I don't want to use.

Request you to please help me on the same.

I would be very thankful to you

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

Re: How to build Linear regression Model using Categorical Independent Variables

Postby startz » Sun Dec 25, 2016 2:20 pm

@expand(cars) @expand(area,@droplast)

Nawal_Kashyap
Posts: 4
Joined: Sat Dec 24, 2016 8:46 am

Re: How to build Linear regression Model using Categorical Independent Variables

Postby Nawal_Kashyap » Mon Dec 26, 2016 4:29 am

Thank you very much for your help!!
It work now.

But I am unable to include intercept term in this model

Nawal_Kashyap
Posts: 4
Joined: Sat Dec 24, 2016 8:46 am

Re: How to build Linear regression Model using Categorical Independent Variables

Postby Nawal_Kashyap » Mon Dec 26, 2016 4:30 am

I am using below code:
njcar @expand(adults) @expand(area, @droplast) @expand(cars, @droplast) @expand(age, @droplast) @expand(children, @droplast)

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

Re: How to build Linear regression Model using Categorical Independent Variables

Postby startz » Mon Dec 26, 2016 8:40 am

dummy variable trap.

Nawal_Kashyap
Posts: 4
Joined: Sat Dec 24, 2016 8:46 am

Re: How to build Linear regression Model using Categorical Independent Variables

Postby Nawal_Kashyap » Mon Dec 26, 2016 9:54 am

Okay I got your point.
Thank you very much!!


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests