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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.