On 10 Aug 2004, Peter Dalgaard wrote: > "Victoria Landsman" <[EMAIL PROTECTED]> writes: > > > Dear all, > > I'd like to find the mle esttimates using the mle function > > mle(negloglik, start = list(), fixed=list(), method="..."). > > I am using the L-BGFS-B method and I don't supply the gradient > > function. Is there a way to print the gradients found at the solution > > value? > > No. The "details" slot in an mle object is simply the return value > from optim(), and that doesn't provide the gradient. Might be an idea > to change that, though, since the gradient is obviously not zero where > the box constraints are active.
Not so easy, as optim does not return it and indeed the gradient is not known at R level (it is computed in the C code, for L-BFGS-B rather deep inside at that). It may not even have been computed at the final solution. We would need something similar to do_optimHess, or even to make use of that code as it does evaluate the gradient at the solution. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
