[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Hilbert matrices Mata testing
Marcos <M.Delprato@westminster.ac.uk> writes,
> I found in the Mata manual Hilbert matrices. They are defined as a matrix H
> with elements H[i,j]=1/(i+j-1). As it says in the help (type help
> mf_hilbert): Hilbert matrices are notoriously ill conditioned, with near
> zero determinants.
> The help also adds Hilbert(n) and invHilbert(n) are used in testing Mata. I
> think that is intuitive as since they are ill matrices with very low
> determinants and nearly singular you could use them to test the quality of,
> for instance, Mata's solver (e.g., qrsolve, lusolve, qrinv) and different
> inverters (e.g., cholinv, invsym).
> Am I right? Could anybody supply an example of how Hilbert matrices are
> used to test Mata?
We at StataCorp have do-files used for testing Stata. One of the do-files
simply serves to call all othe others. Currently, there are 3,103 do-files
totalling 568,032 lines.
The part that tests Mata includes 325 files comprising 45,626 lines.
Here are a few lines from one of the files:
* For searches and help try: