What does a plot of your data look like?
     plot(ndat$dist, ndat$vario.dNEE)
Anything remotely like a two-parameter single exponential rise to a maximum
from zero as shown on this webpage, for example?
http://www.graphpad.com/guides/prism/6/curve-fitting/index.htm?reg_classic_1assoc.htm

Jean


On Wed, Jun 19, 2013 at 6:28 AM, pakoun <pkount@bgc-jena.mpg.de> wrote:

> Hi all. Sorry for posting again such a topic but I went through previous
> posts but couldn't find a solution.
>
> I use the following code to fit an exponential model to my data. I have 4
> different datasets. For 3 datasets nls seems to work fine and I have no
> error messages. But for 1 dataset I am getting the "world known" singular
> gradient error.
>
>    xfit.dNEE <-
>
> nls(vario.dNEE~V*(1-exp(-1*dist/L)),data=ndat,start=list(V=vstart,L=lstart),trace=T)
>
> I tried also with different starting values but still the same error...
> Any help would be highly welcome.
>
> Thank you in advance.
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/nls-singular-gradient-as-always-tp4669859.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

