using if for regression

For questions regarding programming in the EViews programming language.

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

Posts: 15
Joined: Wed Dec 08, 2010 1:46 pm

using if for regression

Postby rbriceno » Tue Oct 25, 2011 9:22 am

Hello. I have a panel data with 337 cross sections and 256 time series. One of the things that I'm trying to do is to run regressions for some specific cross-sections. I tried with:

if id=1 then
equation liq c sap

but nothing happened. I'm not clear about the way if statement works, and I would like get some insight from you. I have a doub also about the wat the ifs can be combined (for example if id=1 and year=2009). Thanks.

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

Re: using if for regression

Postby EViews Gareth » Tue Oct 25, 2011 9:27 am

You need to use the smpl command to set the sample to be used for the equation.
Follow us on Twitter @IHSEViews

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 47 guests