[R] Poor performance of "Optim"
yehengxin
xye78 at hotmail.com
Sun Oct 2 01:20:53 CEST 2011
What I tried is just a simple binary probit model. Create a random data and
use "optim" to maximize the log-likelihood function to estimate the
coefficients. (e.g. u = 0.1+0.2*x + e, e is standard normal. And y = (u >
0), y indicating a binary choice variable)
If I estimate coefficient of "x", I should be able to get a value close to
0.2 if sample is large enough. Say I got 0.18.
If I expand x by twice and reestimate the model, which coefficient should I
get? 0.09, right?
But with "optim", I got something different. When I do the same thing in
both Gauss and Matlab, I can exactly get 0.09, evidencing that the
coefficient estimator is reliable. But R's "optim" does not give me a
reliable estimator.
--
View this message in context: http://r.789695.n4.nabble.com/Poor-performance-of-Optim-tp3862229p3863969.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list