OK, so I encounter the following error when I compute p-value. I calculate it as follows:
Code: Select all
'Calculates number of observations:
!number = @obs(series1)
'Calculates t-statistic:
!t = (@mean(series1)-@mean(series2))/(@stdev(series1)/@sqr({!number}))
'Calculates p-value for t-distribution with N-1 degrees of freedom:
'!p = @tdist(!t,({!number}-1))
I compare the values of
!t and
!p with those from Tests for Descriptive Stats / Simple Hypothesis Tests. While the t-statistic is the same for all series I test, there's a problem with p-value. In same cases the
!p returns the correct value, but in some the
!p takes a value of, for example, about 8, instead of 0. Is it a bug of EViews or am I doing something wrong?