[R] In optim() function, second parameter in par() missing

colstat colstat at gmail.com
Fri Sep 16 00:47:45 CEST 2011

Hi, David
I happened to see this http://www.unc.edu/~monogan/computing/r/MLE_in_R.pdf
And they wrote optim(c(0,1),normal.lik1,y=y,method="BFGS")

But it doesn't actually work, like you mentioned, it only takes 2
parameters, is that the reason why.

R gives this error
> optim(par=parameters, normal.lik, x, method="BFGS")
Error in fn(par, ...) : argument "parameters" is missing, with no default

View this message in context: http://r.789695.n4.nabble.com/In-optim-function-parameter-in-par-missing-tp3791391p3816976.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list