[R] Re: Is there a minimization function?

Bernardo Ribeiro bribeiro at softhome.net
Sat Nov 24 22:06:57 CET 2001

I was trying to minimize this function but got this error:

> L_function(alfa,beta,sigma2){
+ -1* (-n/2*log(sigma2))+0.5*sum((y-g(alfa,beta))^2)/sigma2
+ }
> inic_c(0.3893,0.507,0.00228)
> optim(inic,L)
Error in log(sigma2) : Argument "sigma2" is missing, with no default

    Any clues?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20011124/20e7e316/attachment.html

More information about the R-help mailing list