[R] 2 questions about mle() /optim() function in stats4

Ben Bolker bolker at ufl.edu
Wed Oct 7 19:07:25 CEST 2009




Muhtar Osman wrote:
> 
> Dear All,
> 
> There are two things about mle() that I wasn't so sure.
> 
> 1) can mle() handle vector based parameter? say
>     ll<-function(theta=rep(1,20)){..............}
>    I tried such function, it worked for "optim" but not for "mle".
> 

No.  mle2, in the bbmle package, can (sort of) handle these
kinds of functions.



> 2) is there a general suggestion for the maximum number of parameters
> allowed to use in mle() or optim()?
> 
> Thank you.
> Regards,
> 
> MJO
> 
> 

It depends, but I would generally say that using this kind of
general-purpose
optimization with more than 10-20 (20-50?) parameters is likely to be
slow ... on the other hand, my data sets are rarely big enough to support
models like that.
-- 
View this message in context: http://www.nabble.com/2-questions-about-mle%28%29--optim%28%29-function-in-stats4-tp25790283p25790576.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list