[R] Maximizing a function - optim does not always converge

2008-10-14 Thread Mathew Rosales
Hello All,   I¢m  kinda new to R language and any help that I can get is greatly appreciated.   Basically, I want to find the values of the two parameters that will maximize the function and I¢m currently using the optim function to find these values.  My R code works fine but not all the time. 

Re: [R] maximizing a function

2007-10-28 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: > Hi list, > I would like to maximize a likelihood function to obtain estimates. The > problem is that i first have to have functions other functions that are in > the likelihood that depend on the parameters. I was thinking of using optim > but i do not know how to go

[R] maximizing a function

2007-10-28 Thread Nigel . Walker
Hi list, I would like to maximize a likelihood function to obtain estimates. The problem is that i first have to have functions other functions that are in the likelihood that depend on the parameters. I was thinking of using optim but i do not know how to go about starting. A example of what i