[R] non-linear solve?

Timur Elzhov Timur.Elzhov at jinr.ru
Mon Nov 1 16:17:22 CET 2004


From: <ivo_welch-rstat8783 at mailblocks.com>
Date: Tue 02 Nov 2004 - 00:55:31 EST

> hi: could someone please point me to a function that allows me to
> solve general non-linear functions?
>
> > irr.in <- function(r, c1, c2, c3 ) { return(c1+c2/(1+r) +
> c3/(1+r)^2); }
> > solve.nonlinear( irr.in, -100, 60, 70 );
>   0.189
>
>   If someone has written an irr function, this would be helpful,
>   too---though not difficult to write, either. thanks for any
>   pointers.
>
>   Regards,
>
>   /iaw

optim, nlm - for general optimization;
nls, nls.lm from `minpack.lm' package - for solving the least-squares problem.


--
WBR,
Timur




More information about the R-help mailing list