Re: [R] Newton method iteration problem

2007-10-27 Thread Charles C. Berry
On Sat, 27 Oct 2007, kevinchang wrote: > > Thanks Chales for pointing out the errors. > I fixed an errorr and R accepted my "rootFinding" code. > But the problem right now is that my code will work only if the intialX > value is close enough to the solution. > Otherwise, R says there is missing tr

Re: [R] Newton method iteration problem

2007-10-27 Thread kevinchang
Thanks Chales for pointing out the errors. I fixed an errorr and R accepted my "rootFinding" code. But the problem right now is that my code will work only if the intialX value is close enough to the solution. Otherwise, R says there is missing true/false value in the codition test of while loop.

Re: [R] Newton method iteration problem

2007-10-26 Thread Charles C. Berry
On Fri, 26 Oct 2007, Charles C. Berry wrote: > On Fri, 26 Oct 2007, kevinchang wrote: > >> >> Hi all, >> >> I am coding for finding the root of f(x)= phi(x) -alpha where phi(x) is the >> cumulative density function and alpha is constant . The problem right now is >> I can't get the "initialX" rep

Re: [R] Newton method iteration problem

2007-10-26 Thread Charles C. Berry
On Fri, 26 Oct 2007, kevinchang wrote: > > Hi all, > > I am coding for finding the root of f(x)= phi(x) -alpha where phi(x) is the > cumulative density function and alpha is constant . The problem right now is > I can't get the "initialX" representing the root out of the while loop when > ending

[R] Newton method iteration problem

2007-10-26 Thread kevinchang
Hi all, I am coding for finding the root of f(x)= phi(x) -alpha where phi(x) is the cumulative density function and alpha is constant . The problem right now is I can't get the "initialX" representing the root out of the while loop when ending , it seems to me it disappear when the loop ends acc