Here's a simple reference on the definition of r-squared
<http://en.wikipedia.org/wiki/Coefficient_of_determination>
and given a curve fit to your data, it's easy to compute (and if you're using,
for example the Curve Fitting Toolbox, it's computed for you).
BUT: as I think people usually define the term, the power law family of curves
does not include the model y = constant as a special case (unless constant = 0),
and so interpreting r-squared for such a model fit is questionable, because
r-squared is basically a measure of how much "better" you've done by fitting
your model than you would have by just computing the mean of the y data.
Hope this helps.
- Peter Perkins
The MathWorks, Inc.
I noticed that the lsqcurvefit function in Matlab is programmed to fit
nonlinear functions, such as as power function. However, I can see how
calculating the R-squared value from the residuals may not be
appropriate for this model. Is there an alternative parameter for the
goodness of fit?
Cheng
Cheng, I may have misspoke:
Peter Perkins wrote:
>> BUT: as I think people usually define the term, the power law family of
>> curves does not include the model y = constant as a special case (unless
>> constant = 0), and so interpreting r-squared for such a model fit is
>> questionable, because r-squared is basically a measure of how much
>> "better" you've done by fitting your model than you would have by just
>> computing the mean of the y data.
If you're fitting a model like a*x^b, and estimating both a and b, then it does
include y = constant as a special case.
bg
On Sep 17, 8:47 am, Peter Perkins
<Peter.PerkinsRemoveT...@mathworks.com> wrote:
> lim...@gmail.com wrote:
> > Thank you for the helpful response.
>
> > I noticed that the lsqcurvefit function in Matlab is programmed to fit
> > nonlinear functions, such as aspowerfunction. However, I can see how
> > calculating theR-squaredvaluefrom the residuals may not be
> > appropriate for this model. Is there an alternative parameter for the
> > goodness of fit?
>
> Cheng, I may have misspoke:
>
> Peter Perkins wrote:
> >> BUT: as I think people usually define the term, thepowerlawfamily of
> >> curves does not include the model y = constant as a special case (unless
> >> constant = 0), and so interpretingr-squaredfor such a model fit is
> >> questionable, becauser-squaredis basically a measure of how much