Skip to content
Prev 158658 / 398500 Next

Help MLE

LFRC <feliperiehs <at> yahoo.com.br> writes:
Oh.  Oops.  Just change the sign ( r = -Y*log(comb)) or
set fnscale=-1 (see ?optim)
I got a little carried away, this is R Magic.
mle() expects the function to be written out with
a list of parameters ( func(param1,param2,param3) ),
while optim and constrOptim want the function to
have a single vector argument ( func(paramvec) ).
model2() is a wrapper that converts a vector p
into a list and passes it to the Model function.

  Ben Bolker