On Wed, Mar 18, 2009 at 7:43 PM, Berend Hasselman <b...@xs4all.nl> wrote:
>>> system.time(ans.nl <- nleqslv(x=p0, fn=broydt))[1]
>>
>> user.self
>>    8.17
>
> On my Imac 2.16Ghz and R 2.8.1 and Mac OS X 10.5.6
> this took approximately 5 seconds.
>
> Interesting is this experiment.
> I set the jacobian for a starting point with all x-values equal to -1 to a
> diagonal matrix with 7 on the diagonal
> (not a bad approximation).
>
> Solving the 1000 equation system now takes 1.4 seconds on my computer with
> Broyden and double dogleg in 26 iterations
> (only 1 jacobian is needed in the first iteration).
> So the overhead of calculating  the initial jacobian appears to be a
> bottleneck.

Thanks, Berend and Ravi. If you try with 10 000 variables, then
nleqslv seems to be running endlessly whereas with dfsane it takes
just 0.134 (same units as used by system.time).

Paul

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to