Re: [R] problem in using optim

2010-05-08 Thread Carol Gao
That was great! I tried as what you said, not as many warnings as before, and it seems that it converges. Thank you Berend. and thank you all! Carol On Sat, May 8, 2010 at 5:00 PM, Berend Hasselman wrote: > > > Carol Gao wrote: > > > > I have generated some random variable from generalised gam

Re: [R] problem in using optim

2010-05-08 Thread Berend Hasselman
Carol Gao wrote: > > I have generated some random variable from generalised gamma distribution, > and now I need to use them to test on my optim function. Please see below: > > *##Need to install package VGAM first before calling rggamma function > library(VGAM) > x <- rggamma(500,scale=gamma(1

Re: [R] problem in using optim

2010-05-07 Thread Carol Gao
f Carol Gao > Sent: Friday, May 07, 2010 5:53 AM > To: R-help@r-project.org > Subject: [R] problem in using optim > > Dear R users, > > When I was trying to use the function *optim* to get the MLEs, quite a few > warning messages showed up as below: > > Warning in l

Re: [R] problem in using optim

2010-05-07 Thread Ravi Varadhan
Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Carol Gao Sent: Friday, May 07, 2010 5:53 AM To: R-help@r-project.org Subject: [R] problem in using optim Dear R users, When I was trying to use the function *optim* to get the MLEs, quite a few

Re: [R] problem in using optim

2010-05-07 Thread Arun.stat
just check whether some values in the parameter space forcing the log() function to apply logarithm on negative values !!! -- View this message in context: http://r.789695.n4.nabble.com/problem-in-using-optim-tp2133938p2133942.html Sent from the R help mailing list archive at Nabble.com. __

[R] problem in using optim

2010-05-07 Thread Carol Gao
Dear R users, When I was trying to use the function *optim* to get the MLEs, quite a few warning messages showed up as below: Warning in log(psi * lam) : NaNs produced I am just wondering what does this mean? Was it something wrong with my likelihood function or was it sth wrong with the data?