Hello Eviews forum members,
I am trying to run an OLS regression that needs to get the coefficients depends on the values of let's say variable s (s can be 0 and 1);
1) When I run OLS regression like below I kind of getting not correct coefficients
y c X1 (s=1) X1 (s=0)
which is not what I want.
2) when I put "if s=1" in sample section (i.e., 1/01/2001 9/09/2019 if s = 1) then I am getting correct results but I cannot have both if s=1 and if s=0 in one go.
I tried if else commands and some other options, I got errors.
The reason that I want all the coefficient in one run is because later I need to test a hypothesis that the two coefficient are equal (wald test).
I am trying it using "quick" tab -> estimate equation but later I will write the codes since I have 100 regressions to run.
Any help would be appreciated.
regression analysis - use of "if" and "else" commands
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: regression analysis - use of "if" and "else" commands
Code: Select all
y c x1*s1 x1*(1-s1)
Re: regression analysis - use of "if" and "else" commands
Thanks, @EViews Gareth, it works perfectly.
Who is online
Users browsing this forum: No registered users and 2 guests
