Page 1 of 1
dlog(x,y,z) returns NAs
Posted: Thu Feb 03, 2011 6:30 am
by nupogodi
am i wrong in something??
Code: Select all
wfcreate(wf=test,page=sht1) m 1998m1 2012m12
%a="myseries"
series {%a} = rnd+2 'this line works fine
series {%a} = log({%a}) 'this line works fine
series {%a} = d({%a},0,12) 'BUG! returns NAs, but should return values
series {%a} = dlog({%a},0,12) 'BUG! returns NAs, but should return values
Re: dlog(x,y,z) returns NAs
Posted: Thu Feb 03, 2011 8:52 am
by startz
There are two things going on here.
First, you are getting some NA's because you are asking for a difference where the lagged term starts before the data range. As an example, if you say
then your smpl needs to be set to begin with the second observation or later.
Second, there appears to be a bug in EView where the differencing operator equals zero. EViews acts, incorrectly, as if the argument equaled 1.
Re: dlog(x,y,z) returns NAs
Posted: Thu Feb 03, 2011 8:56 am
by EViews Gareth
Startz:
d(x,0,1) is not the same as d(x,1,1).
However, you are right that d(x,0)=d(x,1) in EViews. Perhaps this is a bug, but it isn't a big one :D
Re: dlog(x,y,z) returns NAs
Posted: Thu Feb 03, 2011 9:29 am
by startz
Startz:
d(x,0,1) is not the same as d(x,1,1).
Right, separate issues.
However, you are right that d(x,0)=d(x,1) in EViews. Perhaps this is a bug, but it isn't a big one :D
It's only a bug in the sense that EViews produces the wrong answer.
Re: dlog(x,y,z) returns NAs
Posted: Thu Feb 03, 2011 11:28 am
by EViews Gareth
True, it is just that is it completely unrelated to the initial post/question :D
The reason the user is getting NAs is because, as you pointed out, the difference doesn't exist for the first observation, which is not a bug at all.