Re: [R] look for help on nlm in R

From: Martin Maechler <>
Date: Sun 10 Jul 2005 - 01:51:38 EST

>>>>> "MaggieZ" == Zhu, Maggie <>
>>>>> on Thu, 7 Jul 2005 14:40:37 -0500 writes:

    MaggieZ> I had a hard time in learning nlm in R and appreciate any help.

    MaggieZ> I encounted the following error message from time
    MaggieZ> to time when I tried different starting parameter
    MaggieZ> values (three parameter values in this case) in

     >>  nlm(,p=c(0.1/40,0.1,2),hessian = FALSE,N.measure=object,h=20) 

     Error in f(x, ...) : only 0's may mix with negative subscripts 

    MaggieZ> Basically I know the three parameter values should all be positive numbers. So, how to select appropriate starting parameter values to prevent this kind of error message?

Maggie, it's a bug in the '' function that you are asking nlm() to minimize. So it would be best to show us your

BTW: "subscripts" are the `` i '' in x[i]

      in its the subscripts that become wrong in your function.

Martin Maechler, ETH Zurich mailing list PLEASE do read the posting guide! Received on Sun Jul 10 01:57:15 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:27 EST