On Fri, 20 Apr 2007, Marco Marini wrote:
I created an harmonic with the following command:
a1=sin(pi*time)
where time is a trend series. I expected a zero vector,
but the program returns something which is very close to
zero but not exactly, as shown in the tabulation
Obs b2
1981:1 1.22461e-016
1981:2 -2.44921e-016
1981:3 3.67382e-016
...
and in the graph, which is not a straight line at y=0.
I understand this is due to the numerical accuracy at which the
program works, but I wonder if it's possible to set an option to
show 0 whenever values are lower than a fixed level (say 10^-5).
You can construct a series that's screened for computer-numerical
noise if you wish, for example:
tmp = sin(pi*time)
NOISE = 1.99e-14
a1 = tmp * (abs(tmp) > NOISE)
Allin Cottrell