[R] Puzzled on nlm

Laura Holt lauraholt_983 at hotmail.com
Mon Oct 11 08:06:22 CEST 2004

Dear R People:

Here is a function to minimized:
function(x,a) {
  x[1] <- a[1]*x[2] + a[3] - a[2]*(a[1]-a[2])*a[3]
  x[2] <- a[1]*x[1] - a[2]*a[3]

Here is my first try:
Error in f(x, ...) : Argument "a" is missing, with no default

Error in nlm(mfun1, c(1, 1), a = c(0.8, 0.5, 1)) :
        invalid function value in 'nlm' optimizer

I am stumped.  I'm sure that it's something really small that I'm 

Thanks in advance for any help.

Laura Holt
mailto: lauraholt_983 at hotmail.com

More information about the R-help mailing list