jbcheb(x,c,tj,tj1,r) is used to calculate Chebyshev approximation of the Jarque-Bera CDF.
Its input arguments are: x - point of calculation c - coefficient tj - j-th Chebyshev polynomial tj1 - previous (j-1)-th Chebyshev polynomial r - accumulator variable
This function adds c*x to r and updates tj and tj1 in such way, that tj1 is now equal to tj, and tj stores valye of (j+1)-th Chebyshev polynomial.
I agree that Jarque-Bera subpackage is awkward - it have only several comments and it is too big and too hard to read. Well, it was generated automatically as result of the very long Monte-Carlo simulation, and although it was planned to make this package more human-readable, these plans were not implemented yet.
|