"kjetil brinchmann halvorsen" <[EMAIL PROTECTED]> writes: > On 16 Jan 2003 at 22:15, Yan Yu wrote: > > > HI, > > i have some prob when i try to use nls(). > > my data is 1D vector, I tried to use a polynomial function(order is 3) to > > fit it. > > the data series is stored in x. > > the a0, a1, a2, a3 below is coefficient, which i hope i can get from > > calls "nls" > > > > > z <- nls( ~ a0 + a1 * x + a2 * x * x + a3 * x * x * x, data = x ) > > You haven't given a response in the formula? nls could possibly give > a more informative error message.
and you didn't give starting estimates for the parameters and the model should not be fit with nls in the first place. A polynomial in x is a linear model in the coefficients a0, a1, a2, and a3 and should be fit with lm, not nls. ______________________________________________ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
