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

Home » Public Forums » archive » Re: least square error for a regression
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: least square error for a regression [message #41037] Wed, 15 September 2004 20:50 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"yaj" <tgupta2000@hotmail.com> writes:
> Hello,
> I am fitting a function of the form
> ASin(wt + theta) + constant to a set of points. Instead of a readymade
> fitting routine from IDL (to avoid any potential problems with small numbers
> later), I use the three linear equations to minimize the least square error,
> then use an IDL function to solve the matrix equation. Could someone suggest
> a simple way to calculate the least squares error and goodness of fit using
> some higher level IDL functions ?

Pardon me for asking, but which "small numbers" problems are you
hoping to avoid? If you are able to linearize your problem yourself,
as you seem to have done, then I believe that a routine like CURVEFIT
or MPFIT should do just fine at estimating the parameters and
returning the uncertainties. And these routines have the added
benefit of tested by years of use.

Happy fitting,
Craig

http://cow.physics.wisc.edu/~craigm/idl/idl.html

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Previous Topic: OO IDL
Next Topic: Re: OO IDL

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

Current Time: Wed Oct 08 15:53:43 PDT 2025

Total time taken to generate the page: 0.00385 seconds