Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13678

Re: "Error" definition for nonlinear fit deviating from data points

From craigloehle@gmail.com
Newsgroups comp.soft-sys.math.mathematica
Subject Re: "Error" definition for nonlinear fit deviating from data points
Date 2013-03-02 08:44 +0000
Message-ID <kgse5h$jb4$1@smc.vnet.net> (permalink)
References <kgmn8s$8he$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


On Wednesday, February 27, 2013 10:43:08 PM UTC-6, max.u...@bioss.uni-freiburg.de wrote:
> Hello,
>
>
>
> I am doing a fit to a series of data points with NonlinearModelFit. The fit works well but the fitted function does not exactly match the data. Now the standard error from the parameter confidence interval table is very small, which I understand.
>
>
>
> A simple example:
>
>
>
> data = Table[{x, x + Sin[x]}, {x, 0, 30, 0.01}];
>
> nlf = NonlinearModelFit[data, a*x, a, x];
>
> bf = a*x /. nlf["BestFitParameters"];
>
> Show[Plot[bf, {x, 0, 30}], ListPlot[data]]
>
> nlf[{"ParameterConfidenceIntervalTable"}]
>
>
>
> The last result shows a standard error of 0.00075, but the plot shows that the fit and the data deviate a lot. Is there a measure that reflects how the fit deviates from the data? Can this also be expressed as some type of "error" in the parameter estimate?
>
> I.e. is there a way to write a = 1.0 +- xxx where x reflects the deviation of fit and curve?
>
>
>
> Thanks a lot for your help,
>
>
>
> Max

The value of the fit you see is not the fit of the curve to the data but the error estimate of the parameter a which is constrained quite tightly by the sin wave.  The fit of the curve is obtained with nlf[{"RSquared"}] in your example.
Craig Loehle

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

"Error" definition for nonlinear fit deviating from data points max.ulbrich@bioss.uni-freiburg.de - 2013-02-28 04:43 +0000
  Re: "Error" definition for nonlinear fit deviating from data points craigloehle@gmail.com - 2013-03-02 08:44 +0000

csiph-web