[R] Problem with Newton_Raphson

2012-09-20 Thread Christopher Kelvin
Hello, I have being trying to estimate the parameters of the generalized exponential distribution. The random number generation for the GE distribution is x-(-log(1-U^(1/p1))/b), where U stands for uniform dist. The data i have generated to estimate the parameters is right censored and the code

Re: [R] Problem with Newton_Raphson

2012-09-20 Thread Berend Hasselman
On 20-09-2012, at 13:46, Christopher Kelvin wrote: Hello, I have being trying to estimate the parameters of the generalized exponential distribution. The random number generation for the GE distribution is x-(-log(1-U^(1/p1))/b), where U stands for uniform dist. The data i have generated

Re: [R] Problem with Newton_Raphson

2012-09-20 Thread Berend Hasselman
On 20-09-2012, at 15:17, Christopher Kelvin wrote: By your suggestion if i understand you, i have changed (p[1]) and (p[2]) and have also corrected the error sum(t), but if i run it, the parameters estimates are very large. Can you please run it and help me out? The code is given below.

Re: [R] Problem with Newton_Raphson

2012-09-20 Thread Berend Hasselman
On 20-09-2012, at 16:06, Berend Hasselman wrote: On 20-09-2012, at 15:17, Christopher Kelvin wrote: . A final remark on function z: - do not calculate things like n*sum(s) repeatedly: doing something like A-n*sum(s) and reusing A is more efficient. - same thing for

Re: [R] Problem with Newton_Raphson

2012-09-20 Thread Christopher Kelvin
Kelvin chris_kelvin2...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Thursday, September 20, 2012 8:52 PM Subject: Re: [R] Problem with Newton_Raphson On 20-09-2012, at 13:46, Christopher Kelvin wrote: Hello, I have being trying to estimate the parameters of the generalized

Re: [R] Problem with Newton_Raphson

2012-09-20 Thread Christopher Kelvin
: Re: [R] Problem with Newton_Raphson On 20-09-2012, at 15:17, Christopher Kelvin wrote: By your suggestion if i understand you, i have changed (p[1]) and (p[2]) and have also corrected the error sum(t), but if i run it, the parameters estimates are very large. Can you please run it and help