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
Hi Ravi, 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.5)/gamma(3.5),d=0.5,k=1

Re: [R] problem in using optim

2010-05-07 Thread Ravi Varadhan
It probably means that your parameters are taking on values that are infeasible. You may have to impose constraints on your parameters to get a solution (e.g. bounds constraints). If you need better help, you have to send us a minimal, self-contained, reproducible example. Ravi. -Original Me

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. __