Check the difference between the correct series r2 and incorrect series r2p in the program below:
workfile c:\check.wf1 u 1 5
!r=-0.3
genr r2=!r*!r
genr r2p=!r^2
I was able to replicate this serious error in Eviews 5, 6 and 7!
Looking forward to your reply.
Negative values are handled strange when raised to a power
Moderators: EViews Gareth, EViews Moderator
-
nvangiersbergen
- Posts: 2
- Joined: Thu Jan 19, 2012 12:51 pm
Negative values are handled strange when raised to a power
Last edited by nvangiersbergen on Thu Jan 19, 2012 2:08 pm, edited 1 time in total.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Negative values are handled incorrect when raised to a p
This isn't a bug or an error, rather it is just the nature of text substitution, and text interpretation.
Note that the following is also true, and also not an error:
Note that the following is also true, and also not an error:
Code: Select all
series x1 = -3^2
series x2 = -3*-3
-
nvangiersbergen
- Posts: 2
- Joined: Thu Jan 19, 2012 12:51 pm
Re: Negative values are handled incorrect when raised to a p
Well, I find it strange that in the manual these variables are referred to as control variables.
In any other programming language, a variable squared, i.e. !r^2, would be interpreted as (!r)^2. Clearly, this is not the case in Eviews and frankly quite counterintuitive.
Apparently, control variables are treated as strings, i.e. a value as if you would enter them from the keyboard.
In any other programming language, a variable squared, i.e. !r^2, would be interpreted as (!r)^2. Clearly, this is not the case in Eviews and frankly quite counterintuitive.
Apparently, control variables are treated as strings, i.e. a value as if you would enter them from the keyboard.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Negative values are handled incorrect when raised to a p
I've made a note to make it more explicit in the manual.
Who is online
Users browsing this forum: No registered users and 2 guests
