Displaying 1 result from an estimated 1 matches for "dydata".
Did you mean:
mydata
2008 Jun 05
1
nls() newbie convergence problem
...b0+b1*x1 + b2*x2
parms <- abs(b1*b2)^(1/3)
(y-pred)/parms
}
Fit the model
gmfit < -nls(~weight(y,x1,x2,b0,b1,b2), observe,list("starting value"))
in converting this to R, I left the weight function alone and replaced the
nls() with
gmfit <-
nls(~weight(y,x1,x2,b0,b1,b2),data=dydata,trace=TRUE,start=list(b0=1,b1=1,b2=1))
where dydata is the appropriate data.frame.
nls() quickly (6 iterations) finds the exact values from Draper & Yang for
b0, b1, and b2 but
despite reporting a discrepancy of only 3.760596e-29 by the 7th iteration,
it merrily goes on
to 50 iterations and t...