Re: [R] Problem with Newton_Raphson

2012-09-20 Thread Christopher Kelvin
Thank you very much for everything. Your suggestions were very helpful.  Chris - Original Message - From: Berend Hasselman To: Christopher Kelvin Cc: "r-help@r-project.org" Sent: Thursday, September 20, 2012 10:06 PM Subject: Re: [R] Problem with Newton_Raphson On 20-09-2

Re: [R] Problem with Newton_Raphson

2012-09-20 Thread Christopher Kelvin
ge - From: Berend Hasselman To: Christopher Kelvin Cc: "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 param

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 log(

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 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 > gene

[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