help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Maximizing likelihood functions - GSL vs. Matlab


From: AJ Bostian
Subject: [Help-gsl] Maximizing likelihood functions - GSL vs. Matlab
Date: Sun, 30 May 2004 16:15:07 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040510

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]