Displaying 1 result from an estimated 1 matches for "cfitdfitdemo".
2012 Nov 01
1
fitting weibull curve to data using nls
...#39;m having trouble specifying and fitting the function with nls and was wondering if someone could help.
After some reading, I think the function specification I want is
y=c*(x/a)^(b-1)*e^(-(x/a)^b)
(from http://www.mathworks.se/products/statistics/demos.html?file=/products/demos/shipping/stats/cfitdfitdemo.html)
Where *a* scales curve along the horizontal axis, *b* defines the curve shape and *c* scales curve on y axis
However, when I try to fit this function using nls I get the following error: 'Error in exp^(-(temp/a)^b) : non-numeric argument to binary operator'
##example dataset
temp<...