I recently programmed up some probit and logit routines in GSL and in
Matlab. (The Matlab machine is an i386 and the GSL machine is an
x86_64, both running linux) I then compared the output from each of
these to the output from some commercial statistical packages like SAS
and Stata.
The output from the Matlab code matches up with the commercial output
exactly -- the parameter estimates, maximizing value of the likelihood
function, etc. are identical. However, the GSL output tends to show a
slight improvement in the maximizing value of the likelihood function.
The improvement is not large, say a 0.1% difference, but the parameter
estimates are noticeably different (5-10%) due to the nonlinearity of
the function.
Just to check, I plugged the GSL parameter estimates into the Matlab
objective function. The value of the Matlab objective using the GSL
parameter estimates is indeed very slightly worse.
I thought that this might be due to differences in precision, but
Matlab/SAS/Stata all seem to do calculations in double, which is what I
used. I also thought that the choice of GSL minimizer might make a
difference, but the result holds under all GSL minimizers.
Obviously, I would like to think that the improvement in the maximizing
value of the likelihood function using GSL is real, but it's hard to go
up against Matlab/SAS/Stata. Anyone have any thoughts about why this
difference might exist, and whether the improvement is legit?
Regards,
AJ Bostian
PS: Can't beat GSL for speed, though. I blew through 20 iterations of a
probit problem in about 0.25 sec using GSL, compared to about 3 sec for
Matlab.
AJ Bostian
Dept. of Economics
University of Virginia
Rouss Hall 114
Charlottesville, VA 22904
Email: address@hidden