Short and easy question about "makeresids"

For questions regarding programming in the EViews programming language.

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

malyang713
Posts: 7
Joined: Thu Mar 06, 2014 5:14 pm

Short and easy question about "makeresids"

Postby malyang713 » Thu Mar 06, 2014 5:27 pm

Hello,
I have very short and easy question about makeresids command, especially for VAR object.


When I control the sample, for example,

smpl if w < 1

I construct a VAR object following:
var v01.ls 1 1 a b c @ w

Assume there are 100 observations satisfying that condition.

Additionally, I control the sample other way, for example,

smpl if w > 1
var v02.ls 1 1 a b c @ w

I wish to make residuals each way and merge it. So I used makeresids command.
In short, I typed at program window this way.

smpl if w < 1
var v01.ls 1 1 a b c @ w
v01.makeresids a1 b1 c1

smpl if w > 1
var v02.ls 1 1 a b c @ w
v02.makeresids a2 b2 c2

The problem is, although the condition is alternative, the residual series overlaps.
(When I did it by click, it works well, the series does not overlap)
As I should use program command because 'for loop' also should be used.
Last edited by malyang713 on Sun Mar 09, 2014 5:47 pm, edited 1 time in total.

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

Re: Short and easy question about "makeresids"

Postby EViews Gareth » Fri Mar 07, 2014 10:36 am

Seems to work just fine:

Code: Select all

create u 1000 rndseed 1 series a=nrnd series b=nrnd series cc=nrnd series w = nrnd+1 smpl if w < 1 var v01.ls 1 1 a b c @ w v01.makeresids a1 b1 c1 smpl if w > 1 var v02.ls 1 1 a b c @ w v02.makeresids a2 b2 c2 smpl @all show a1 a2

malyang713
Posts: 7
Joined: Thu Mar 06, 2014 5:14 pm

Re: Short and easy question about "makeresids"

Postby malyang713 » Sun Mar 09, 2014 5:05 pm

Thank you Gareth,
I see the problem is because of rewrite. I appended 'delete' command and it works well.

Thank to you again!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests