On Sat, 26 Jul 2014, David van Herick wrote:
>
> No, in fact what you get from my script is the bottom part of the Cholesky
> factor. If you want to have the corresponding values for the correlation
> matrix, you should adapt the following hansl snippet:...
Just a follow-up. After correcting to get the correlation matrix instead
of the bottom part of the Cholesky factor, gretl's trivariate probit script
appears to match Limdep with a LOT of uniform draws (and slightly fewer :)
halton draws). However, to replicate Limdep's results (or pretty close,
anyway), it took a little longer than I said before, but peanuts compared
to Limdep.
It's important to note that, when you use GHK, you should never expect
results to match exactly; this is obvious if you use uniforms (with or
without variance reduction techniques), but is also true when using
deterministic sequences: there is a million details that can make a small
difference. One, for example, is the precision of the inverse normal CDF
in the tails, which can be very different from one implemetation to
another.
Ot, to put it shortly: when using GHK, there are no "benchmark" values to
be matched exactly, except in toy cases.
Gretl took 91 seconds (and my 8-core CPU was shaking at 96.5% during
that
>> time - nice job on efficiency).
>
>
> You should thank Allin for that, he did a very fine job at parallelising
> GHK.
Thanks Allin - the speed gain from parallelising is quite nice.
I got an "analytical scores" trivariate probit model to work. However, the
results only match Limdep to 3-4 decimal places using Genz's tvnl algorithm
(and OPG for the covariance matrix), and that's for a relatively small
sample (1200 from the example script). Yes, I know that's not terrible
considering the nature of multivariate normals CDFs, but it clearly won't
do. I am now starting to understand the reason for the GHK simulator,
but...I'm determined to find an even faster (and hopefully as accurate, of
course) solution, unless I'm just hitting my head against the wall, like
the many who have thought about this before me.
Note that you can use analytical derivatives with GHK. In fact, our GHK
routine will give you the derivatives of the probability with respect to
all arguments; computing the derivatives wrt the parameters of your model
is simply a matter of applying the chain rule in a suitable way (I'm not
saying it's great fun, but it's possible).
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------