curve fitting an exponential function

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

curve fitting an exponential function

wdar
This post has NOT been accepted by the mailing list yet.
Hi all,

I expect that the relationship between a variable x and a function y should look like y = a - b*exp(-c*x^2). I employed the nls function but was unable to  define the exponential term (it produced error). If I use x instead of x^2, the predicted curve is not fitting at all.  Does any of you have a piece of advice? Or is there a better curve fitting tool in r?

Thanks,
Waltenegus
Reply | Threaded
Open this post in threaded view
|

Re: curve fitting an exponential function

giuseppe calamita
Hi Waltenegus,
you should consider to show us your code and the data you used to fit the curve. If you can't or if you prefer you can simply show the code and some sample data on which the code can be run.
You'll find nice and useful tool in nlstools package.

Hope this help

Giuseppe
Giuseppe Calamita
PhD at CNR-IMAA Italian National Council of Research - Institute of Methodologies for Environmental Analysis,  Tito Scalo -Potenza ITALY