comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Calculating Error Estimates
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Calculating Error Estimates [message #12280] Wed, 15 July 1998 00:00 Go to previous message
Karl Young is currently offline  Karl Young
Messages: 31
Registered: April 1996
Member
Hi David,

> It is so hot in Colorado today that I think my brain has
> vapor locked. In any case, I can use some help. :-)

I was in Boulder last week for the World Shakuhachi Conference and Imust
admit it was a real joy to get back to foggy San Francisco

> Here is my problem. I have some experimental data. I
> have used CURVEFIT and my roll-your-own function to
> fit a curve through the data. What I want to do is
> display the experimental data on the plot, along with
> the curve. But I want to place error bars through
> the experimental data points. My question is this:
> how do I calculate the errors for the individual
> points so that I can place them on the plot with
> ERRPLOT?
>
> CURVEFIT returns to me a parameter called SIGMA,
> which contains the standard deviations of the returned
> values of the four coefficients in my fitting
> function. What I cannot seem to work out is how
> to use these standard deviations to obtain an
> error estimate for each individual experimental
> point.
>
> I realize this is basic error analysis, but even
> an hour spent refreshing myself with Bevington
> has not successfully stimulated this reptilian brain. :-(
>
> Let's just say I had too much fun on vacation...
>

Glad to hear you had a good vacation.

I recently had a similar problem, i.e. getting error estimates for
constrained min (not curvefit, but the solution is similar in both
cases).
Since I couldn't get information like derivative matrices out of
constrained min (like you can out of curvefit, since the source is
available) I checked with the folks at Windward Technology (the company
that supplies constrained min). They pointed me towards a nice source,
the book "Applied Regression Analysis" by Draper and Smith. In chapter
10 of that book they obtain a formula that is quite general for
nonlinear optimization problems, and should apply in your case. The
formula for the "confidence ellipsoid", i.e. what you can use for error
bounds is:

(P - Pfit)' Zfit' Zfit (P - Pfit) < p s^2 F(p,n-p,1-a)

where:

Pfit is the vector of parameters obtained from your fit
P is a vector of variables, which you can use to solve for the
bounds
Zfit is the Hessian or second derivative matrix with the fitted values

of the parameters plugged in (I think you can snag that right
out of
curvefit, i.e. you don't have to actually obtain the second
derivatives)
p is the number of parameters
n is the number of points fit
F is the F-distribution

and s^2 = S(Pfit)/(n-p)

with S(Pfit) just the sum of the squared errors between the data and
your function at Pfit.

If you need more details fell free to bug me.

-- KY

------------------------------------------------------------ -------
Karl Young Phone: (415) 750-2158 lab
UCSF (415) 750-9463 home
VA Medical Center, MRS Unit (114M) FAX: (415) 668-2864
4150 Clement Street Email:kyoung@itsa.ucsf.edu
San Francisco, CA 94121
------------------------------------------------------------ -------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Object Graphics:
Next Topic: Re: measuring areas

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:07:35 PDT 2025

Total time taken to generate the page: 0.00423 seconds