Unfortunately, this is not a robust implementation, and is derailed by
Error in uniroot(f, c(-1, 1)) :
f() values at end points not of opposite sign
--
View this message in context:
http://r.789695.n4.nabble.com/Code-to-calculate-internal-rate-of-return-tp864645p2231910.html
Sent from the R
> $f.root
> [1] 0.01035543
>
> $iter
> [1] 5
>
> $estim.prec
> [1] 6.103516e-05
>
>
> So the internal rate of return is 0.07329926 (z$root) = 7.33% (continuously
> compound).
>
>
> --- On Fri, 1/8/08, Thomas E <[EMAIL PROTECTED]> wrote:
>
0,1))
> z
$root
[1] 0.07329926
$f.root
[1] 0.01035543
$iter
[1] 5
$estim.prec
[1] 6.103516e-05
So the internal rate of return is 0.07329926 (z$root) = 7.33% (continuously
compound).
--- On Fri, 1/8/08, Thomas E <[EMAIL PROTECTED]> wrote:
> From: Thomas E <[EMAIL PROTECTED]&g
Hi all.
I am an R newbie and trying to grasp how the simple optimization routines in
R work. Specifically, I would like some guidance on how to set up a code to
calculate the internal rate of return on an investment project
(http://en.wikipedia.org/wiki/Internal_rate_of_return).
My main problem
4 matches
Mail list logo