<Previous version of Ox>

# Ox 3.00: new features and fixes

## New features and enhancements

### New functions

- `insertc`, `insertr`, `setbounds`, `outer`, `diagcat`
- `rangh`, `rangig`, `ranshuffle`, `ranpoissonprocess`, `ranbrownianmotion`
- `probbvn`, `probmvn` (bi- and tri-variate normal probabilities)
- `tailf`, `tailt` (non-central F, non-central t distributions), `densgh`, `densgig`
- `SolveQP` (quadratic programming)
- `maxc`, `maxcindex`, `minc`, `mincindex`, `sortcindex`
- new graphics functions: `DrawAcf`, `DrawHistogram`, `DrawXYZ`; extended: `DrawDensity`
- `dayofweek`, `dayofcalender`
- `chdir`, `getenv`, `fremove`, `getcwd`, `systemcall`
- `bessel` (fractional orders), `dawson`, `expint`
- `strfind` to find character in a string, `strfindr` for reverse searching, also to search for substring in a string; `strifind` and `strifindr` are case insensitive versions.

### Enhanced functions

- `probt`, `tailt`, `probf` more accurate for small probabilities. `probbeta`, `tailt`, `probf` more accurate for large a,b. Non-central distributions more accurate over larger range.
- `probt`, `tailt`, `quant` with non-integer df.
- `decqrmul` now works for reversed H; one argument version to compute Q. `decqr` now allows m < n. `decldlband` now sets diagonal of L to 1.
- `idiv` and `imod` can handle matrix arguments
- `vecfind`/`vecrfind` to search for specific value now work with missing values.
- Can write dht/dat file; use fread/fwrite on dht files; ability to fread 4-byte reals.

### Syntax enhancements

- `#import` can now also import `.ox` files. It will first try to find the `.oxo` file, and if that fails it will search for the `.ox` file.
- Ox can now run many Gauss files directly. Use `oxl -g` from the command line or OxGauss with Ox Professional.
- Now allowing `decl` in function header; also allowing declaration in for loop, as in:
  `for (decl i=0;...) s`
  which equals
  `{decl i=0; for (;...) s }`
- indexing string for reference: can index one beyond end, which returns 0.
- Optional warning for accessing matrix as vector (see oxwarning function)
- Parser recognizes `.NaN` and `.Inf`; relational operators now treat missing values properly.
- `new array[r][c]` and `new matrix[r]` now allowed.
- Moved power to above unary ops, so `-x^2` is now identical to `-(x^2)`. This change only affects code where the power is even: previously, the sign would disappear, but now the sign of the result is changed.
- x[][] and x[1][] now works for 1x0 matrix.
- concatenation for illegal types (functions etc.): casting lhs to array, so that concatenation will work.

### Run-time system

- Moved to `OX3PATH` environment variable instead of OXPATH. Setting default `OX3PATH` value under Windows based on location of oxwin.dll. Therefor installation program does not need to set `OX3PATH`, nor update the path anymore.
- Increased default stack size to -s2000,1000

### Ox classes

- Simulation class: added support for two-sided tests and saving of results.
- Numerous enhancements to `Modelbase` and OxPack.
- Several small labelling changes to `Simulation`/`PcNaive`/`PcFimlDgp` class for PcNaive.
- Added UnitRoot test to PcFiml class with Ericsson&MacKinnon 5%/1% critical values.

### New Packages

Financial Numerical Recipes
  Financial Numerical Recipes is an Ox port of the code written by Bernt Arne Ødegaard for advanced financial calculations. It contains the basic and some advanced algorithms for option pricing, and some algorithms dealing with term structure modeling and pricing of fixed income securities.
Lapack
  Lapack is a package for solving linear equations, linear least squares problems, eigenvalue problems, and singular value problems. This is a port to Ox of the main driver files for real and symmetric matrices from `lapack`, part of netlib.
Loess Package
  Loess is a package for smoothing of multivariate scattered data (LOESS); decompose time series into trend + seasonal + remainder (STL). This is a port to Ox of the port to Ox of the `loess` and `stl` code in netlib.

## Problems in version 2.20 which have been fixed in version 3.00:

- `cumulate(rann(0,1))` would crash
- `CloseDrawWindow` via OxRun did not clear graphics window
- `discretize` on empty matrix crashes
- problem with `decqr` if m < n
- `rank` of empty matrix gave runtime error
- `SetDraw(SET_PRINTPAGE, PAGE_USER, PAGE_LANDSCAPE, 600, 1300);` had documentation error, and would set both X and Y size to 1300.
- `sumsqrc`/`sumsqrr` of integer/double scalar would not take square. Integer power of negative integer could overflow.
- fixed minor problem with loading Excel 97/2000 files.
- fixed rare instance of infinite loop in axis division
- `LoadDta` didn't set specified sample
- `string == ""` could crash when running oxo file
- `Sample::ObsYear` and `Sample::ObsPeriod` incorrect for some negative indices.
- `print("%% crit")` now prints one %
- `x[][:-1]` returns whole matrix, but should give index error.
- int==string returns a value, but should fail like string==int
- Using '\\' in code which is skipped because of preprocessor statement would lead to scan errors.
- Fixed sign problem with eigenvectors of general matrix when there are isolated eigenvalues.
- `betafunc(1`,a,b) was wrong
- matrix[1][1] * matrix[r][c] didn't work
- `if (x[0])` wouldn't dereference one index, and always be true.
- In `sscan("9", "%2d", &i)`, the variable i would be set to 9. However, in `sscan("09", "%2d", &i)` "09" is treated as octal because it is prefixed with a zero. Now "i" is treated as "d", and x,u,o formats are also allowed.
- `as=as[2:3]` would not work for arrays (but `as1=as[2:3]` world work). Also solved problem with indexing of higher order arrays.
- This doesn't parse: `println(!!2);`
- Fixed `densgamma` for x --> 0 for nu <= 1

Ox version 3.00. © JA Doornik This file last changed
.