[R] problem with "nls" function
Carl Witthoft
carl at witthoft.com
Wed Jan 27 23:30:26 CET 2010
<quote>
From: hammadi jbeli <hammadi.jbeli_at_gmail.com>
Date: Tue, 26 Jan 2010 23:40:47 +0100
I have used R formulation style and I found this in some R documentations.
</quote>
Sorry, that makes no sense. I would recommend you go back to your
original dataset and pick a very small subset of it--with only 2
variables, for example. Then try running nls on that, so at least your
code line will be a manageable size.
Also, as people regularly remind me :-), post a *small* but reproducible
data set so we can see what sort of stuff you're feeding into these
functions.
{like, say,
L.minor.m1<-nls(Y~a_1_1*D_1+a_1_2*(exp(-gamma_1_F*stdS*(s_F-c_1_F)),
start=list(a_1_1=0.0593,a_2_1=-0.0822),trace=TRUE) }
Tho' I tend to suspect an attempt to fit that many independent
exp(gamma)'s is doomed to failure. If you can explain what the
underlying data represent, there may be a better, and vectorized, way to
find a fit function.
Carl
More information about the R-help
mailing list