Page 1 of 1

Short and easy question about "makeresids"

Posted: Thu Mar 06, 2014 5:27 pm
by malyang713
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.

Re: Short and easy question about "makeresids"

Posted: Fri Mar 07, 2014 10:36 am
by EViews Gareth
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

Re: Short and easy question about "makeresids"

Posted: Sun Mar 09, 2014 5:05 pm
by malyang713
Thank you Gareth,
I see the problem is because of rewrite. I appended 'delete' command and it works well.

Thank to you again!