Page 1 of 1

How to build Linear regression Model using Categorical Independent Variables

Posted: Sat Dec 24, 2016 11:55 pm
by Nawal_Kashyap
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

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

Posted: Sun Dec 25, 2016 2:20 pm
by startz
@expand(cars) @expand(area,@droplast)

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

Posted: Mon Dec 26, 2016 4:29 am
by Nawal_Kashyap
Thank you very much for your help!!
It work now.

But I am unable to include intercept term in this model

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

Posted: Mon Dec 26, 2016 4:30 am
by Nawal_Kashyap
I am using below code:
njcar @expand(adults) @expand(area, @droplast) @expand(cars, @droplast) @expand(age, @droplast) @expand(children, @droplast)

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

Posted: Mon Dec 26, 2016 8:40 am
by startz
dummy variable trap.

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

Posted: Mon Dec 26, 2016 9:54 am
by Nawal_Kashyap
Okay I got your point.
Thank you very much!!