[R] nls() newbie convergence problem

2008-06-04 Thread Bernard Leemon
I'm sure this must be a nls() newbie question, but I'm stumped. I'm trying to do the example from Draper and Yang (1997). They give this snippet of S-Plus code: Specify the weight function: weight - function(y,x1,x2,b0,b1,b2) { pred - b0+b1*x1 + b2*x2 parms - abs(b1*b2)^(1/3) (y-pred)/parms }

Re: [R] nls() newbie convergence problem

2008-06-04 Thread Katharine Mullen
dydata x1 x2 y 1 9 27 248 2 9 22 213 3 4 23 190 4 11 16 183 5 -6 25 144 6 11 14 169 7 -4 13 72 8 2 8 73 9 10 13 156 10 8 30 263 11 12 10 147 12 -7 5 -2 13 0 10 75 14 12 0 77 15 9 8 115 16 12 24 245 17 34 23 370 18 12 1 84 19 10 37 324 20 26 30 371 weight -